The Professional-Managerial Class w/ Catherine Liu | The Jacobin Show - YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new features
"}c=qc(d+"",null);a.trident_.open(); a.trident_.write(oc(c));a.trident_.close();a.trident_.parentWindow.m=Ua(a.onTridentRpcMessage_,a);a.trident_.parentWindow.d=Ua(a.onTridentDone_,a,!0);a.trident_.parentWindow.rpcClose=Ua(a.onTridentDone_,a,!1);c=a.trident_.createElement("DIV");a.trident_.parentWindow.document.body.appendChild(c);d=ac(a.requestUri_.toString());d=Dc(Xb(d));d=qc("",null);tc(c,d);a.channelDebug_.info("TRIDENT REQ ("+a.rid_+") [ attempt "+a.retryId_+"]: GET\n"+a.requestUri_);a.channel_.notifyServerReachabilityEvent(1)}; e=Uq.prototype;e.onTridentRpcMessage_=function(a){Lq(Ua(this.onTridentRpcMessageAsync_,this,a),0)}; e.onTridentRpcMessageAsync_=function(a){if(!this.cancelled_){var b=this.channelDebug_;b.info("TRIDENT TEXT ("+this.rid_+"): "+b.redactResponse_(a));Zq(this);this.safeOnRequestData_(a);Xq(this)}}; e.onTridentDone_=function(a){Lq(Ua(this.onTridentDoneAsync_,this,a),0)}; e.onTridentDoneAsync_=function(a){this.cancelled_||(this.channelDebug_.info("TRIDENT TEXT ("+this.rid_+"): "+a?"success":"failure"),this.cleanup_(),this.successful_=a,this.channel_.onRequestComplete(this),this.channel_.notifyServerReachabilityEvent(4))}; e.cancel=function(){this.cancelled_=!0;this.cleanup_()}; var Xq=function(a){a.watchDogTimeoutTime_=Xa()+a.timeout_;a.startWatchDogTimer_(a.timeout_)}; Uq.prototype.startWatchDogTimer_=function(a){if(null!=this.watchDogTimerId_)throw Error("WatchDog timer not null");this.watchDogTimerId_=Lq(Ua(this.onWatchDogTimeout_,this),a)}; var Zq=function(a){a.watchDogTimerId_&&(t.clearTimeout(a.watchDogTimerId_),a.watchDogTimerId_=null)}; Uq.prototype.onWatchDogTimeout_=function(){this.watchDogTimerId_=null;var a=Xa();0<=a-this.watchDogTimeoutTime_?this.handleTimeout_():(this.channelDebug_.warning("WatchDog timer called too early"),this.startWatchDogTimer_(this.watchDogTimeoutTime_-a))}; Uq.prototype.handleTimeout_=function(){this.channelDebug_.timeoutResponse(this.requestUri_);2!=this.type_&&this.channel_.notifyServerReachabilityEvent(3);this.cleanup_();this.lastError_=2;Nq(18);$q(this)}; var $q=function(a){if(!a.channel_.isClosed()&&!a.cancelled_)a.channel_.onRequestComplete(a)}; e=Uq.prototype;e.cleanup_=function(){Zq(this);Qg(this.readyStateChangeThrottle_);this.readyStateChangeThrottle_=null;this.pollingTimer_.stop();this.eventHandler_.removeAll();if(this.xmlHttp_){var a=this.xmlHttp_;this.xmlHttp_=null;a.abort();a.dispose()}this.trident_&&(this.trident_=null)}; e.getLastError=function(){return this.lastError_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getSessionId=function(){return this.sid_}; e.safeOnRequestData_=function(a){try{this.channel_.onRequestData(this,a),this.channel_.notifyServerReachabilityEvent(4)}catch(b){}};var br=function(){this.logger_=null}; e=br.prototype;e.getLogger=function(){return this.logger_}; e.browserOfflineResponse=function(a){this.info("BROWSER_OFFLINE: "+a)}; e.xmlHttpChannelRequest=function(a,b,c,d,f){this.info("XMLHTTP REQ ("+c+") [attempt "+d+"]: "+a+"\n"+b+"\n"+this.maybeRedactPostData_(f))}; e.xmlHttpChannelResponseMetaData=function(a,b,c,d,f,h){this.info("XMLHTTP RESP ("+c+") [ attempt "+d+"]: "+a+"\n"+b+"\n"+f+" "+h)}; e.xmlHttpChannelResponseText=function(a,b,c){this.info("XMLHTTP TEXT ("+a+"): "+this.redactResponse_(b)+(c?" "+c:""))}; e.timeoutResponse=function(a){this.info("TIMEOUT: "+a)}; e.debug=function(a){this.info(a)}; e.dumpException=function(){}; e.info=function(){}; e.warning=function(){}; e.severe=function(){}; e.redactResponse_=function(a){if(!a||"y2f%"==a)return a;try{var b=JSON.parse(a);if(b)for(var c=0;ca.length||(a=a[1],!Array.isArray(a)||1>a.length))){var b=a[0];if("noop"!=b&&"stop"!=b)for(b=1;bb)throw Error("Bad port number "+b);a.port_=b}else a.port_=null;return a}; kq.prototype.getPath=function(){return this.path_}; kq.prototype.setPath=function(a,b){er(this);this.path_=b?ir(a,!0):a;return this}; kq.prototype.hasPath=function(){return!!this.path_}; kq.prototype.hasQuery=function(){return""!==this.queryData_.toString()}; var gr=function(a,b,c){er(a);b instanceof jr?(a.queryData_=b,a.queryData_.setIgnoreCase(a.ignoreCase_)):(c||(b=kr(b,roa)),a.queryData_=new jr(b,a.ignoreCase_));return a}; kq.prototype.setQuery=function(a,b){return gr(this,a,b)}; kq.prototype.getDecodedQuery=function(){return ir(this.queryData_.toString())}; kq.prototype.getQuery=function(){return this.queryData_.toString()}; var ar=function(a,b,c){er(a);a.queryData_.set(b,c);return a},Yq=function(a,b,c){er(a); Array.isArray(c)||(c=[String(c)]);soa(a.queryData_,b,c)}; kq.prototype.getParameterValues=function(a){return this.queryData_.getValues(a)}; var lr=function(a,b){return a.queryData_.get(b)},hr=function(a,b,c){er(a); a.fragment_=c?ir(b):b;return a}; kq.prototype.hasSameDomainAs=function(a){return(!this.domain_&&!a.domain_||this.domain_==a.domain_)&&(null==this.port_&&null==a.port_||this.port_==a.port_)}; var Wq=function(a){er(a);ar(a,"zx",Ic());return a}; kq.prototype.removeParameter=function(a){er(this);this.queryData_.remove(a);return this}; kq.prototype.setReadOnly=function(a){this.isReadOnly_=a;return this}; kq.prototype.isReadOnly=function(){return this.isReadOnly_}; var er=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri")}; kq.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)}; var mr=function(a){return a instanceof kq?a.clone():new kq(a,void 0)},toa=function(a,b,c,d){var f=new kq(null,void 0); a&&f.setScheme(a);b&&jq(f,b);c&&fr(f,c);d&&f.setPath(d);return f},ir=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},kr=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,uoa),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},uoa=function(a){a=a.charCodeAt(0); return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},noa=/[#\/\?@]/g,poa=/[#\?:]/g,ooa=/[#\?]/g,roa=/[#\?@]/g,qoa=/#/g,jr=function(a,b){this.count_=this.keyMap_=null; this.encodedQuery_=a||null;this.ignoreCase_=!!b},nr=function(a){a.keyMap_||(a.keyMap_=new tj,a.count_=0,a.encodedQuery_&&Gd(a.encodedQuery_,function(b,c){a.add(Cc(b),c)}))}; e=jr.prototype;e.getCount=function(){nr(this);return this.count_}; e.add=function(a,b){nr(this);this.encodedQuery_=null;a=or(this,a);var c=this.keyMap_.get(a);c||this.keyMap_.set(a,c=[]);c.push(b);this.count_+=1;return this}; e.remove=function(a){nr(this);a=or(this,a);return this.keyMap_.containsKey(a)?(this.encodedQuery_=null,this.count_-=this.keyMap_.get(a).length,this.keyMap_.remove(a)):!1}; e.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0}; e.isEmpty=function(){nr(this);return 0==this.count_}; e.containsKey=function(a){nr(this);a=or(this,a);return this.keyMap_.containsKey(a)}; e.containsValue=function(a){var b=this.getValues();return nb(b,a)}; e.forEach=function(a,b){nr(this);this.keyMap_.forEach(function(c,d){eb(c,function(f){a.call(b,f,d,this)},this)},this)}; e.getKeys=function(){nr(this);for(var a=this.keyMap_.getValues(),b=this.keyMap_.getKeys(),c=[],d=0;da)this.lastStatusCode_=200,this.request_.cancel(),this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Nq(12),wr(this.channel_,this,!0)}else Nq(8),this.firstTime_=this.lastTime_=Xa(),this.receivedIntermediateResult_=!1}; e.onRequestComplete=function(){this.lastStatusCode_=this.request_.getLastStatusCode();this.request_.successful_?0==this.state_?(this.channelDebug_.debug("TestConnection: request complete for initial check"),this.blockedPrefix_?(this.state_=1,Ioa(this)):(this.state_=2,vr(this))):2==this.state_&&(this.channelDebug_.debug("TestConnection: request complete for stage 2"),(!se||Fe(10)?!this.receivedIntermediateResult_:200>this.lastTime_-this.firstTime_)?(this.channelDebug_.debug("Test connection failed; not using streaming"), Nq(11),wr(this.channel_,this,!1)):(this.channelDebug_.debug("Test connection succeeded; using streaming connection"),Nq(12),wr(this.channel_,this,!0))):(this.channelDebug_.debug("TestConnection: request failed, in state "+this.state_),0==this.state_?Nq(9):2==this.state_&&Nq(10),xr(this.channel_,this,this.request_.getLastError()))}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.shouldUseSecondaryDomains=function(){return this.channel_.shouldUseSecondaryDomains()}; e.isActive=function(){return this.channel_.isActive()}; e.notifyServerReachabilityEvent=function(a){this.channel_.notifyServerReachabilityEvent(a)};var yr=function(a,b,c,d){this.clientVersion_=a||null;this.state_=1;this.outgoingMaps_=[];this.pendingMaps_=[];this.channelDebug_=new br;this.parser_=new Kq;this.firstTestResults_=b||null;this.secondTestResults_=null!=c?c:null;this.asyncTest_=d||!1},Joa=function(a,b){this.mapId=a; this.map=b;this.context=null}; e=yr.prototype;e.extraHeaders_=null;e.extraParams_=null;e.forwardChannelRequest_=null;e.backChannelRequest_=null;e.path_=null;e.forwardChannelUri_=null;e.backChannelUri_=null;e.hostPrefix_=null;e.allowHostPrefix_=!0;e.nextRid_=0;e.nextMapId_=0;e.failFast_=!1;e.handler_=null;e.forwardChannelTimerId_=null;e.backChannelTimerId_=null;e.deadBackChannelTimerId_=null;e.connectionTest_=null;e.useChunked_=null;e.allowChunkedMode_=!0;e.lastArrayId_=-1;e.lastPostResponseArrayId_=-1;e.lastStatusCode_=-1; e.forwardChannelRetryCount_=0;e.backChannelRetryCount_=0;e.baseRetryDelayMs_=5E3;e.retryDelaySeedMs_=1E4;e.forwardChannelMaxRetries_=2;e.forwardChannelRequestTimeoutMs_=2E4;e.readyStateChangeThrottleMs_=0;e.supportsCrossDomainXhrs_=!1;e.channelVersion_=8;var Koa=function(a,b,c,d){li.call(this,"timingevent",a);this.size=b;this.rtt=c;this.retries=d}; u(Koa,li);var Loa=function(a,b){li.call(this,"serverreachability",a);this.reachabilityType=b}; u(Loa,li);e=yr.prototype;e.getChannelDebug=function(){return this.channelDebug_}; e.setChannelDebug=function(a){null!=a&&(this.channelDebug_=a)}; e.connect=function(a,b,c,d,f){this.channelDebug_.debug("connect()");Nq(0);this.path_=b;this.extraParams_=c||{};d&&void 0!==f&&(this.extraParams_.OSID=d,this.extraParams_.OAID=f);this.asyncTest_?(Lq(Ua(this.connectTest_,this,a),100),zr(this)):this.connectTest_(a)}; e.disconnect=function(){this.channelDebug_.debug("disconnect()");this.cancelRequests_();if(3==this.state_){var a=this.nextRid_++,b=this.forwardChannelUri_.clone();ar(b,"SID",this.sid_);ar(b,"RID",a);ar(b,"TYPE","terminate");this.addAdditionalParams_(b);a=new Uq(this,this.channelDebug_,this.sid_,a,void 0);a.type_=2;a.baseUri_=Wq(b.clone());wc(new Image,a.baseUri_.toString());a.requestStartTime_=Xa();Xq(a)}this.onClose_()}; e.getSessionId=function(){return this.sid_}; e.connectTest_=function(a){this.channelDebug_.debug("connectTest_()");this.okToMakeRequest_()&&(this.connectionTest_=new ur(this,this.channelDebug_),this.connectionTest_.setExtraHeaders(this.extraHeaders_),this.connectionTest_.setParser(this.parser_),this.connectionTest_.connect(a))}; var zr=function(a){a.channelDebug_.debug("connectChannel_()");a.ensureInState_(1,0);a.forwardChannelUri_=a.getForwardChannelUri(a.path_);a.ensureForwardChannel_()}; e=yr.prototype; e.cancelRequests_=function(){this.connectionTest_&&(this.connectionTest_.abort(),this.connectionTest_=null);this.backChannelRequest_&&(this.backChannelRequest_.cancel(),this.backChannelRequest_=null);this.backChannelTimerId_&&(t.clearTimeout(this.backChannelTimerId_),this.backChannelTimerId_=null);Ar(this);this.forwardChannelRequest_&&(this.forwardChannelRequest_.cancel(),this.forwardChannelRequest_=null);this.forwardChannelTimerId_&&(t.clearTimeout(this.forwardChannelTimerId_),this.forwardChannelTimerId_=null)}; e.setExtraHeaders=function(a){this.extraHeaders_=a}; e.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a}; e.setSupportsCrossDomainXhrs=function(a){this.supportsCrossDomainXhrs_=a}; e.getHandler=function(){return this.handler_}; e.setHandler=function(a){this.handler_=a}; e.getAllowHostPrefix=function(){return this.allowHostPrefix_}; e.setAllowHostPrefix=function(a){this.allowHostPrefix_=a}; e.isBuffered=function(){return!this.useChunked_}; e.getAllowChunkedMode=function(){return this.allowChunkedMode_}; e.setAllowChunkedMode=function(a){this.allowChunkedMode_=a}; e.sendMap=function(a){if(0==this.state_)throw Error("Invalid operation: sending map when state is closed");1E3==this.outgoingMaps_.length&&this.parser_.stringify(a);this.outgoingMaps_.push(new Joa(this.nextMapId_++,a));2!=this.state_&&3!=this.state_||this.ensureForwardChannel_()}; e.setFailFast=function(a){this.failFast_=a;this.channelDebug_.info("setFailFast: "+a);(this.forwardChannelRequest_||this.forwardChannelTimerId_)&&this.forwardChannelRetryCount_>Br(this)&&(this.channelDebug_.info("Retry count "+this.forwardChannelRetryCount_+" > new maxRetries "+Br(this)+". Fail immediately!"),this.forwardChannelRequest_?(this.forwardChannelRequest_.cancel(),this.onRequestComplete(this.forwardChannelRequest_)):(t.clearTimeout(this.forwardChannelTimerId_),this.forwardChannelTimerId_= null,this.signalError_(2)))}; var Br=function(a){return a.failFast_?0:a.forwardChannelMaxRetries_}; e=yr.prototype;e.setForwardChannelMaxRetries=function(a){this.forwardChannelMaxRetries_=a}; e.setForwardChannelRequestTimeout=function(a){this.forwardChannelRequestTimeoutMs_=a}; e.isClosed=function(){return 0==this.state_}; e.getState=function(){return this.state_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.hasOutstandingRequests=function(){var a=0;this.backChannelRequest_&&a++;this.forwardChannelRequest_&&a++;return 0!=a}; e.setParser=function(a){this.parser_=a}; e.ensureForwardChannel_=function(){this.forwardChannelRequest_||this.forwardChannelTimerId_||(this.forwardChannelTimerId_=Lq(Ua(this.onStartForwardChannelTimer_,this),0),this.forwardChannelRetryCount_=0)}; e.maybeRetryForwardChannel_=function(a){if(this.forwardChannelRequest_||this.forwardChannelTimerId_||1==this.state_||this.forwardChannelRetryCount_>=Br(this))return!1;this.channelDebug_.debug("Going to retry POST");this.forwardChannelTimerId_=Lq(Ua(this.onStartForwardChannelTimer_,this,a),this.getRetryTime_(this.forwardChannelRetryCount_));this.forwardChannelRetryCount_++;return!0}; e.onStartForwardChannelTimer_=function(a){this.forwardChannelTimerId_=null;this.startForwardChannel_(a)}; e.startForwardChannel_=function(a){this.channelDebug_.debug("startForwardChannel_");this.okToMakeRequest_()&&(1==this.state_?a||(this.open_(),this.state_=2):3==this.state_&&(a?this.makeForwardChannelRequest_(a):0==this.outgoingMaps_.length?this.channelDebug_.debug("startForwardChannel_ returned: nothing to send"):this.forwardChannelRequest_||(this.makeForwardChannelRequest_(),this.channelDebug_.debug("startForwardChannel_ finished, sent request"))))}; e.open_=function(){this.channelDebug_.debug("open_()");this.nextRid_=Math.floor(1E5*Math.random());var a=this.nextRid_++,b=new Uq(this,this.channelDebug_,"",a,void 0);b.setExtraHeaders(this.extraHeaders_);var c=this.dequeueOutgoingMaps_(),d=this.forwardChannelUri_.clone();ar(d,"RID",a);this.clientVersion_&&ar(d,"CVER",this.clientVersion_);this.addAdditionalParams_(d);b.xmlHttpPost(d,c,!0);this.forwardChannelRequest_=b}; e.makeForwardChannelRequest_=function(a){if(a){if(6=this.channelVersion_?f:d.$jscomp$loop$prop$mapId$2384-c;try{y.forEach(h,function(l){return function(m, n){b.push("req"+l.$jscomp$loop$prop$mapId$2384+"_"+n+"="+encodeURIComponent(m))}}(d))}catch(l){b.push("req"+d.$jscomp$loop$prop$mapId$2384+"_type="+encodeURIComponent("_badmap"))}}this.pendingMaps_=this.pendingMaps_.concat(this.outgoingMaps_.splice(0,a)); return b.join("&")}; e.requeuePendingMaps_=function(){this.outgoingMaps_=this.pendingMaps_.concat(this.outgoingMaps_);this.pendingMaps_.length=0}; e.ensureBackChannel_=function(){this.backChannelRequest_||this.backChannelTimerId_||(this.backChannelAttemptId_=1,this.backChannelTimerId_=Lq(Ua(this.onStartBackChannelTimer_,this),0),this.backChannelRetryCount_=0)}; e.maybeRetryBackChannel_=function(){if(this.backChannelRequest_||this.backChannelTimerId_||3<=this.backChannelRetryCount_)return!1;this.channelDebug_.debug("Going to retry GET");this.backChannelAttemptId_++;this.backChannelTimerId_=Lq(Ua(this.onStartBackChannelTimer_,this),this.getRetryTime_(this.backChannelRetryCount_));this.backChannelRetryCount_++;return!0}; e.onStartBackChannelTimer_=function(){this.backChannelTimerId_=null;this.startBackChannel_()}; e.startBackChannel_=function(){if(this.okToMakeRequest_()){this.channelDebug_.debug("Creating new HttpRequest");this.backChannelRequest_=new Uq(this,this.channelDebug_,this.sid_,"rpc",this.backChannelAttemptId_);this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);this.backChannelRequest_.setReadyStateChangeThrottle(this.readyStateChangeThrottleMs_);var a=this.backChannelUri_.clone();ar(a,"RID","rpc");ar(a,"SID",this.sid_);ar(a,"CI",this.useChunked_?"0":"1");ar(a,"AID",this.lastArrayId_); this.addAdditionalParams_(a);if(!se||Fe(10))ar(a,"TYPE","xmlhttp"),this.backChannelRequest_.xmlHttpGet(a,!0,this.hostPrefix_,!1);else{ar(a,"TYPE","html");var b=this.backChannelRequest_,c=!!this.hostPrefix_;b.type_=3;b.baseUri_=Wq(a.clone());joa(b,c)}this.channelDebug_.debug("New Request created")}}; e.okToMakeRequest_=function(){return!0}; var wr=function(a,b,c){a.channelDebug_.debug("Test Connection Finished");a.useChunked_=a.allowChunkedMode_&&c;a.lastStatusCode_=b.getLastStatusCode();a.asyncTest_||zr(a)},xr=function(a,b){a.channelDebug_.debug("Test Connection Failed"); a.lastStatusCode_=b.getLastStatusCode();a.signalError_(2)}; e=yr.prototype; e.onRequestData=function(a,b){if(0!=this.state_&&(this.backChannelRequest_==a||this.forwardChannelRequest_==a))if(this.lastStatusCode_=a.getLastStatusCode(),this.forwardChannelRequest_==a&&3==this.state_){if(7a&&!this.isBuffered()&&0==this.backChannelRetryCount_}; e.correctHostPrefix=function(a){return this.allowHostPrefix_?this.handler_?this.handler_.correctHostPrefix(a):a:null}; e.onBackChannelDead_=function(){null!=this.deadBackChannelTimerId_&&(this.deadBackChannelTimerId_=null,this.backChannelRequest_.cancel(),this.backChannelRequest_=null,this.maybeRetryBackChannel_(),Nq(20))}; var Ar=function(a){null!=a.deadBackChannelTimerId_&&(t.clearTimeout(a.deadBackChannelTimerId_),a.deadBackChannelTimerId_=null)}; e=yr.prototype; e.onRequestComplete=function(a){this.channelDebug_.debug("Request complete");if(this.backChannelRequest_==a){Ar(this);this.backChannelRequest_=null;var b=2}else if(this.forwardChannelRequest_==a)this.forwardChannelRequest_=null,b=1;else return;this.lastStatusCode_=a.getLastStatusCode();if(0!=this.state_)if(a.successful_){if(1==b){b=Xa()-a.requestStartTime_;var c=Mq;c.dispatchEvent(new Koa(c,a.postData_?a.postData_.length:0,b,this.forwardChannelRetryCount_));this.ensureForwardChannel_();this.onSuccess_(); this.pendingMaps_.length=0}else this.ensureBackChannel_();}else{c=a.getLastError();if(3==c||7==c||0==c&&0c)return!1;!(b instanceof Tr)&&5c&&(a.currentMaxDelayMs_=c))}a.inRetryMode_=!0;return b};var Xr=function(){this.logger_=null}; e=Xr.prototype;e.severe=function(){}; e.warning=function(){}; e.info=function(){}; e.fine=function(){}; e.isLoggable=function(){return null!=this.logger_&&Ga.log.ENABLED&&null}; e.setLevel=function(){}; e.logInternalLevel_=function(){};var Yr=function(){}; Yr.prototype.getSerializedValue=function(a,b){return Hr(a)?this.serialize(b):"number"!==typeof b||isFinite(b)?b:b.toString()}; Yr.prototype.deserialize=function(a,b){a=new a.messageType_;this.deserializeTo(a,b);return a}; Yr.prototype.getDeserializedValue=function(a,b){if(Hr(a))return b instanceof Ir?b:this.deserialize(a.nativeType_.prototype.getDescriptor(),b);if(14==a.fieldType_)return"string"===typeof b&&Yoa.test(b)&&(a=Number(b),0/,OPEN_LIST:/^\[/,CLOSE_LIST:/^\]/,STRING:js,COLON:/^:/,COMMA:/^,/,SEMI:/^;/,WHITESPACE:ks};$oa.prototype.next=function(){for(;bpa(this);){var a=this.current_.type;if(a!=ks&&a!=is||a==ks&&!this.ignoreWhitespace_||a==is&&!this.ignoreComments_)return!0}this.current_={type:fs,value:null};return!1}; var bpa=function(a){if(a.index_>=a.data_.length)return!1;var b=a.currentData_,c=null;y.some(apa,function(d){if(c||d==fs)return!1;var f=d.exec(b);f&&0==f.index&&(c={type:d,value:f[0]});return!!c}); c&&(a.current_=c,a.index_+=c.value.length,a.currentData_=a.currentData_.substring(c.value.length));return!!c},as=function(){this.tokenizer_=this.error_=null; this.ignoreMissingFields_=!1}; as.prototype.parse=function(a,b,c){this.error_=null;this.ignoreMissingFields_=!!c;this.tokenizer_=new $oa(b);this.tokenizer_.next();return ls(this,a,"")}; as.prototype.getError=function(){return this.error_}; var ls=function(a,b,c){for(;">"!=a.tokenizer_.current_.value&&"}"!=a.tokenizer_.current_.value&&a.tokenizer_.current_.type!=fs;)if(!cpa(a,b))return!1;if(c){if(!ms(a,c))return!1}else a.tokenizer_.current_.type!=fs&&(a.error_="Expected END token");return!0},epa=function(a,b,c){a=dpa(a,c); if(null===a)return!1;c.isRepeated()?b.add(c,a):b.set(c,a);return!0},ns=function(a){return Rb(a,".")?parseFloat(a):Kba(a)},dpa=function(a,b){switch(b.fieldType_){case 1:case 2:if(b=os(a,gs))if(b=/^-?inf(?:inity)?f?$/i.test(b)?Infinity*(Nb(b,"-")?-1:1):/^nanf?$/i.test(b)?NaN:null,null!=b)return b; case 5:case 13:case 7:case 15:case 17:return(a=os(a,hs))?ns(a):null;case 3:case 4:case 6:case 16:case 18:return(a=os(a,hs))?b.nativeType_==Number?ns(a):a:null;case 8:b=os(a,gs);if(!b)return null;switch(b){case"true":return!0;case"false":return!1;default:return a.error_="Unknown type for bool: "+b,null;}case 14:if(a.tokenizer_.current_.type==hs)return(a=os(a,hs))?ns(a):null;var c=os(a,gs);if(!c)return null;b=b.nativeType_[c];return null==b?(a.error_="Unknown enum value: "+c,null):b;case 12:case 9:if(b= os(a,js)){for(c=JSON.parse(b).toString();a.tokenizer_.current_.type==js;)b=os(a,js),c+=JSON.parse(b).toString();a=c}else a=null;return a;}},fpa=function(a){ps(a,":"); if(ps(a,"[")){for(;;){a.tokenizer_.next();if(ps(a,"]"))break;if(!ms(a,","))return!1}return!0}if(ps(a,"<"))return ls(a,null,">");if(ps(a,"{"))return ls(a,null,"}");a.tokenizer_.next();return!0},cpa=function(a,b){var c=os(a,gs); if(!c)return a.error_="Missing field name",!1;var d=null;b&&(d=Fr(b.getDescriptor(),c.toString()));if(null==d){if(a.ignoreMissingFields_)return fpa(a);a.error_="Unknown field: "+c;return!1}if(11==d.fieldType_||10==d.fieldType_){ps(a,":");a:{c=d;if(ps(a,"<"))d=">";else{if(!ms(a,"{")){b=!1;break a}d="}"}var f=new(c.nativeType_.prototype.getDescriptor().messageType_);ls(a,f,d)?(c.isRepeated()?b.add(c,f):b.set(c,f),b=!0):b=!1}if(!b)return!1}else{if(!ms(a,":"))return!1;if(d.isRepeated()&&ps(a,"["))for(;;){if(!epa(a, b,d))return!1;if(ps(a,"]"))break;if(!ms(a,","))return!1}else if(!epa(a,b,d))return!1}ps(a,",")||ps(a,";");return!0},ps=function(a,b){return a.tokenizer_.current_.value==b?(a.tokenizer_.next(),!0):!1},os=function(a,b){if(a.tokenizer_.current_.type!=b)return a.error_="Expected token type: "+b,null; b=a.tokenizer_.current_.value;a.tokenizer_.next();return b},ms=function(a,b){return ps(a,b)?!0:(a.error_="Expected token \""+b+"\"",!1)};var gpa=new Zr(0),hpa=new Zr(2),ipa=new $r,qs=function(a){a=gpa.serialize(a);return xj(a)},jpa=JSON.parse,kpa=function(a,b){try{var c=jpa(b)}catch(f){return null}try{var d=hpa.deserialize(a,c)}catch(f){return null}return null==d?null:d}; Ir.prototype.toString=function(){return ipa.serialize(this)}; var lpa=function(a){var b=ag(document,a);null==b&&(b=lg("DIV",{id:a,style:"display:none"}),cg(document,"body",void 0,void 0)[0].appendChild(b));return b};var rs=function(){Ci.call(this);this.eventHandler_=new Pq(this);tfa&&(ufa?this.eventHandler_.listen(vfa?document.body:window,["online","offline"],this.handleChange_):(this.online_=this.isOnline(),this.timer_=new $i(250),this.eventHandler_.listen(this.timer_,"tick",this.handleTick_),this.timer_.start()))}; u(rs,Ci);rs.prototype.isOnline=function(){return tfa?navigator.onLine:!0}; rs.prototype.handleTick_=function(){var a=this.isOnline();a!=this.online_&&(this.online_=a,this.handleChange_())}; rs.prototype.handleChange_=function(){var a=this.isOnline()?"online":"offline";this.dispatchEvent(a)}; rs.prototype.disposeInternal=function(){rs.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.eventHandler_=null;this.timer_&&(this.timer_.dispose(),this.timer_=null)};var mpa=function(a,b,c){return new ss(a,b,c)},ts=function(a,b,c,d){d=void 0===d?mpa:d; this.baseUri=a;this.handler=b;this.config=c;this.browserChannelProvider=d;this.hasBeenDisposed=!1;this.protocolVersion="5";this.stateVersionNumber=this.state=0;this.logger=new Xr;this.eventHandler=new Pq;this.delayGeneratorOnQuota=new Vr(3E5,12);this.delayGeneratorOnNotFound=new Vr(250,7200);this.authParams=new Sr;this.immediateConnectionRateLimiter=new Xoa;this.lastStatusCode=-1;this.authState=0;this.eventHandler.listen(Mq,"statevent",this.onStatEvent.bind(this));this.delayGenerator=new Vr(Mr(c, 11),Mr(c,12));Wr(this.delayGeneratorOnQuota);Wr(this.delayGeneratorOnNotFound)}; p(ts,Cr);ts.prototype.getStateForTest=function(){return this.state}; ts.prototype.getImmediateConnectBudgetForTest=function(){var a=this.immediateConnectionRateLimiter;a.update();return a.tokens}; var us=function(a,b){b!==a.state&&(a.state=b,a.stateVersionNumber++);return a.stateVersionNumber}; e=ts.prototype;e.updateAuthParams=function(a){var b=!this.authParams||this.authParams.getToken()!==a.getToken();this.authParams=a.clone();this.browserChannel&&(a=Uoa(this.authParams),this.browserChannel.setExtraHeaders(a));b&&(b=this.authState,this.authState=1,2===b&&this.tryImmediateReconnectByUserRequest())}; e.start=function(){us(this,1);this.open(this.delayGenerator)}; e.startHandoff=function(){}; e.open=function(a){var b=this;if(1===this.state){us(this,2);a=Wr(a)+Mr(this.config,3);Nr(this.config,3,0);var c=this.stateVersionNumber;aj(function(){npa(b,c)},a)}}; e.tryImmediateReconnectByUserRequest=function(){switch(this.state){case 1:case 2:var a=this.immediateConnectionRateLimiter;a.update();0=d&&(this.lastStatusCode=d,this.handler.channelError(new Dr(2,d),this),void 0!==this.browserChannel&&this.browserChannel.disconnect()):a.push(c)}0=b.branches_&&b.cancel())}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.fired_||this.errback(new ht(this))}}; gt.prototype.continue_=function(a,b){this.blocked_=!1;it(this,a,b)}; var it=function(a,b,c){a.fired_=!0;a.result_=c;a.hadError_=!b;dqa(a)},eqa=function(a){if(a.fired_){if(!a.silentlyCanceled_)throw new jt(a); a.silentlyCanceled_=!1}}; gt.prototype.callback=function(a){eqa(this);it(this,!0,a)}; gt.prototype.errback=function(a){eqa(this);it(this,!1,a)}; gt.prototype.assertNotDeferred_=function(){}; var lt=function(a,b,c){kt(a,b,null,c)}; gt.prototype.addErrback=function(a,b){return kt(this,null,a,b)}; gt.prototype.addBoth=function(a,b){return kt(this,a,a,b)}; gt.prototype.addFinally=function(a,b){return kt(this,a,function(c){var d=a.call(this,c);if(void 0===d)throw c;return d},b)}; var kt=function(a,b,c,d){a.sequence_.push([b,c,d]);a.fired_&&dqa(a);return a}; gt.prototype.then=function(a,b,c){var d,f,h=new Oi(function(l,m){d=l;f=m}); kt(this,d,function(l){l instanceof ht?h.cancel():f(l)}); return h.then(a,b,c)}; Mi(gt);var mt=function(a,b){b instanceof gt?lt(a,Ua(b.branch,b)):lt(a,function(){return b})}; gt.prototype.branch=function(a){var b=new gt;kt(this,b.callback,b.errback,b);a&&(b.parent_=this,this.branches_++);return b}; gt.prototype.isError=function(a){return a instanceof Error}; var fqa=function(a){return jb(a.sequence_,function(b){return"function"===typeof b[1]})}; gt.prototype.getLastValueForMigration=function(){return this.fired_&&!this.hadError_?this.result_:void 0}; var dqa=function(a){if(a.unhandledErrorId_&&a.fired_&&fqa(a)){var b=a.unhandledErrorId_,c=nt[b];c&&(t.clearTimeout(c.id_),delete nt[b]);a.unhandledErrorId_=0}a.parent_&&(a.parent_.branches_--,delete a.parent_);b=a.result_;for(var d=c=!1;a.sequence_.length&&!a.blocked_;){var f=a.sequence_.shift(),h=f[0],l=f[1];f=f[2];if(h=a.hadError_?l:h)try{var m=h.call(f||a.defaultScope_,b);void 0!==m&&(a.hadError_=a.hadError_&&(m==b||a.isError(m)),a.result_=b=m);if(Ni(b)||"function"===typeof t.Promise&&b instanceof t.Promise)d=!0,a.blocked_=!0}catch(n){b=n,a.hadError_=!0,fqa(a)||(c=!0)}}a.result_=b;d&&(m=Ua(a.continue_,a,!0),d=Ua(a.continue_,a,!1),b instanceof gt?(kt(b,m,d),b.blocking_=!0):b.then(m,d));c&&(b=new gqa(b),nt[b.id_]=b,a.unhandledErrorId_=b.id_)},jt=function(a){ab.call(this); this.deferred=a}; u(jt,ab);jt.prototype.message="Deferred has already fired";jt.prototype.name="AlreadyCalledError";var ht=function(a){ab.call(this);this.deferred=a}; u(ht,ab);ht.prototype.message="Deferred was canceled";ht.prototype.name="CanceledError";var gqa=function(a){this.id_=t.setTimeout(Ua(this.throwError,this),0);this.error_=a}; gqa.prototype.throwError=function(){delete nt[this.id_];throw this.error_}; var nt={};var hqa={1:"NativeMessagingTransport",2:"DirectTransport"},iqa=["pu","lru","pru","lpu","ppu"],ot=function(a){for(var b=jqa,c=b.length,d="";0a.peerProtocolVersion_&&(a.peerProtocolVersion_=b);1==a.peerProtocolVersion_&&(a.setupAckSent_.fired_||a.oneSidedHandshake_||a.setupAckSent_.callback(!0),a.peerEndpointId_=null)}; e=wt.prototype;e.connect=function(){var a=this.getWindow(),b=Sa(a),c=xt[b];"number"!==typeof c&&(c=0);0==c&&vi(a.postMessage?a:a.document,"message",qqa,!1,wt);xt[b]=c+1;this.initialized_=!0;this.maybeAttemptToConnect_()}; e.maybeAttemptToConnect_=function(){var a=0==rt(this.channel_);this.oneSidedHandshake_&&a||this.channel_.isConnected()||this.isDisposed()?this.maybeAttemptToConnectTimer_.stop():(this.maybeAttemptToConnectTimer_.start(),this.sendSetupMessage_())}; e.send=function(a,b){var c=this.channel_.peerWindowObject_;c&&(this.send=function(d,f){var h=this,l=this.channel_.name;this.sendTimerId_=aj(function(){h.sendTimerId_=0;try{var m=c.postMessage?c:c.document;m.postMessage&&m.postMessage(l+"|"+d+":"+f,h.peerHostname_)}catch(n){}},0)},this.send(a,b))}; e.notifyConnected_=function(){nqa(this.channel_,1==this.protocolVersion_||1==this.peerProtocolVersion_?200:void 0)}; e.disposeInternal=function(){if(this.initialized_){var a=this.getWindow(),b=Sa(a),c=xt[b];xt[b]=c-1;1==c&&zi(a.postMessage?a:a.document,"message",qqa,!1,wt)}this.sendTimerId_&&(bj(this.sendTimerId_),this.sendTimerId_=0);Qg(this.eventHandler_);delete this.eventHandler_;Qg(this.maybeAttemptToConnectTimer_);delete this.maybeAttemptToConnectTimer_;this.setupAckReceived_.cancel();delete this.setupAckReceived_;this.setupAckSent_.cancel();delete this.setupAckSent_;this.connected_.cancel();delete this.connected_; delete this.send;wt.superClass_.disposeInternal.call(this)}; var oqa=function(a){a=a.split(",");a[1]=a[1]||null;return a};var At=function(a,b){ft.call(this);for(var c=0,d;d=iqa[c];c++)if(d in a&&!/^https?:\/\//.test(a[d]))throw Error("URI "+a[d]+" is invalid for field "+d);this.cfg_=a;this.name=this.cfg_.cn||ot(10);this.domHelper_=b||$f();this.deferredDeliveries_=[];this.peerLoadHandler_=new Pq(this);a.lpu=a.lpu||Cd(this.domHelper_.getWindow().location.href)+"/robots.txt";a.ppu=a.ppu||Cd(a.pu||"")+"/robots.txt";ut[this.name]=this;Hfa(window,"unload",rqa)||ui(window,"unload",rqa)}; u(At,ft);var sqa=/^%*tp$/,tqa=/^%+tp$/;e=At.prototype;e.connectionDelay_=null;e.peerWindowDeferred_=null;e.transport_=null;e.state_=1;e.isConnected=function(){return 2==this.state_}; e.peerWindowObject_=null;e.iframeElement_=null;e.getConfig=function(){return this.cfg_}; e.getIframeElement=function(){return this.iframeElement_}; e.getTransportType=function(){return this.transport_.getType()}; e.getTransportName=function(){return this.transport_.getName()}; var wqa=function(a,b){var c=a.cfg_.ifrid;c||(c=a.cfg_.ifrid="xpcpeer"+ot(4));var d=$f(b).createElement("IFRAME");d.id=d.name=c;d.style.width=d.style.height="100%";uqa(a);a.peerWindowDeferred_=new gt(void 0,a);var f=vqa(a);Qq(a.peerLoadHandler_,d,"load",a.peerWindowDeferred_.callback,!1,a.peerWindowDeferred_);ve||we?window.setTimeout(Ua(function(){b.appendChild(d);xc(d,ph(f.toString()))},a),1):(xc(d,ph(f.toString())),b.appendChild(d))},uqa=function(a){a.peerWindowDeferred_&&(a.peerWindowDeferred_.cancel(), a.peerWindowDeferred_=null); a.deferredDeliveries_.length=0;a.peerLoadHandler_.removeAll()},vqa=function(a){var b=a.cfg_.pu; "string"===typeof b&&(b=a.cfg_.pu=new kq(b));var c={};c.cn=a.name;c.tp=a.cfg_.tp;c.osh=a.cfg_.osh;a.cfg_.lru&&(c.pru=a.cfg_.lru);a.cfg_.lpu&&(c.ppu=a.cfg_.lpu);a.cfg_.ppu&&(c.lpu=a.cfg_.ppu);(a=a.cfg_.role)&&(c.role=1==a?0:1);ar(b,"xpc",xj(c));return b}; At.prototype.connect=function(a){this.connectCb_=a||La;3==this.state_&&(this.state_=1);this.peerWindowDeferred_?lt(this.peerWindowDeferred_,this.continueConnection_):this.continueConnection_()}; At.prototype.continueConnection_=function(){this.peerWindowDeferred_=null;this.cfg_.ifrid&&(this.iframeElement_=this.domHelper_.getElement(this.cfg_.ifrid));if(this.iframeElement_){var a=this.iframeElement_.contentWindow;a||(a=window.frames[this.cfg_.ifrid]);this.peerWindowObject_=a}if(!this.peerWindowObject_){if(window==window.top)throw Error("CrossPageChannel: Can't connect, peer window-object not set.");this.peerWindowObject_=window.parent}if(!this.transport_){this.cfg_.tp||(this.cfg_.tp="function"=== typeof document.postMessage||"function"===typeof window.postMessage||se&&window.postMessage?1:0);if("function"===typeof this.cfg_.tp)this.transport_=new this.cfg_.tp(this,this.domHelper_);else switch(this.cfg_.tp){case 1:this.transport_=new wt(this,this.cfg_.ph,this.domHelper_,!!this.cfg_.osh,this.cfg_.nativeProtocolVersion||2);break;case 2:if(a=this.peerWindowObject_)try{a=window.document.domain==this.peerWindowObject_.document.domain}catch(b){a=!1}a&&(this.transport_=new st(this,this.domHelper_));}if(!this.transport_)throw Error("CrossPageChannel: No suitable transport found! You may try injecting a Transport constructor directly via the channel config object."); }for(this.transport_.connect();0=a;a||(b.getName(),c.get(b));return a}; Et.prototype.nonEmpty=function(a,b){(b=!b.has(a)||""!=b.get(a))||a.getName();return b};var Cqa=function(a){this.logger=a;a=function(){return!0}; var b=this.required.bind(this),c=this.greaterOrEqualTo.bind(this,0),d=this.nonEmpty.bind(this);this.specifications={Version:{major_version:[b,c],minor_version:[b,c]},ProtocolVersion:{version:[b]},ClientVersion:{version:[b],platform:[b],language:[b,d],application_info:[b,d]},ClientToServerMessage:{header:[b],init_endpoint_message:[a],init_session_message:[a],client_data_message_deprecated:[a],send_on_disconnect_message:[a],close_session_message:[a]},ClientHeader:{protocol_version:[b],client_version:[b], client_time_ms:[b],max_known_server_time_ms:[b],message_id:[a]},SessionId:{service_name:[b,d],session_name:[a]},InitEndpointMessage:{},InitSessionMessage:{session_id:[b],subscriber_info:[a]},CloseSessionMessage:{session_id:[b]},SessionStatusMessage:{session_id:[b],address:[a,d],is_broadcast_to_user:[a],subscriber_info:[a],status:[a]},DataMessage:{session_id:[b],message:[b]},LcsPostmanInvalidation:{signal:[b],session_id:[b],ack_id:[b]},LcsSignal:{subscription_key:[b],message:[b]},LcsSubscriptionKey:{name:[b], topic_name:[b]},LcsPostmanMessage:{data:[a],trace_id:[a],publish_timestamp_micros:[b],is_suppressor:[a]},ServerToClientMessage:{header:[b],server_data_message:[a],postman_invalidation:[a],channel_status_message:[a],session_status_message:[a]},ServerHeader:{protocol_version:[b],server_time_ms:[b,c],message_id:[a,d]},StatusP:{code:[b],description:[a]},ChannelStatusMessage:{status:[b],jid_resource:[a]}}}; p(Cqa,Et);var Ft=function(a,b){this.channel=a;this.serviceName=b;this.isOpen=!1}; e=Ft.prototype;e.toString=function(){return"HangingGetChannel("+this.sessionName+")"}; e.open=function(){this.isOpen=!0;this.channel.sendSubscription(this)}; e.getSubscriberInfo=function(){return this.subscriberInfo||null}; e.getServiceName=function(){return this.serviceName}; e.getSessionName=function(){return this.sessionName||null}; var Gt=function(a,b,c){Ft.call(this,a,b);this.sessionHandler=c}; p(Gt,Ft);Gt.prototype.handleAddressAssigned=function(a){var b=this.sessionHandler,c=a!=b.address_;b.address_=a;b.isOnline_=null!=b.address_;a=k(b.networkStatusReceivers_);for(var d=a.next();!d.done;d=a.next())d=d.value,d(b.isOnline_,c)}; Gt.prototype.handleSubscriberInfo=function(){}; var Ht=function(a,b,c){Ft.call(this,a,b);this.sessionHandler=c}; p(Ht,Ft);Ht.prototype.getSessionHandler=function(){return this.sessionHandler}; Ht.prototype.handleAddressAssigned=function(){}; Ht.prototype.handleSubscriberInfo=function(a){this.subscriberInfo=a;var b=this.sessionHandler;if(It(b))if(a===b.subscriberInfo)b.logger.warning("Received duplicate subscriber info from LCS");else{b.logger.info("Received new subscriber info from LCS");b.subscriberInfo=a;for(var c=k(b.registrations),d=c.next();!d.done;d=c.next()){var f=k(d.value);d=f.next().value;f=f.next().value;Jt(b,f);0this.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.channelClosed(),this.browserChannel=void 0,this.open())}; e.close=function(){void 0!==this.browserChannel&&this.browserChannel.close()}; e.dispose=function(){this.close();this.hasBeenDisposed=!0}; e.isDisposed=function(){return this.hasBeenDisposed}; e.updateAuthParams=function(){if(Woa.contains(this.authParams.getScheme())){var a=this.channelConfig.getFirstPartyAuthSchemeAndHash(this.authParams.getOrigin());if(null!=a){var b=a.scheme;a=a.hash;a!==this.authParams.getToken()&&(this.authParams.setScheme(Roa[b]),this.authParams.setToken(a))}else this.authParams.setToken("")}this.browserChannel&&this.browserChannel.updateAuthParams(this.authParams)}; e.channelOpened=function(){}; e.handleSessionStatusMessage=function(a){var b=a.getSessionId();if(null!=b){var c=b.getSessionName();if(null!=c){var d=this.getSession(b);if(null==d)for(var f=0;fthis.nextChannelReloadTimeMs&&(this.nextChannelReloadTimeMs=a+Math.ceil(18E5*Math.random()),this.close(),this.open())};var Jqa=function(a){return!!document.currentScript&&(-1!=document.currentScript.src.indexOf("?"+a)||-1!=document.currentScript.src.indexOf("&"+a))},Kqa=function(){return"function"==typeof window.__onGCastApiAvailable?window.__onGCastApiAvailable:null},Mt=function(a){a.length?Lqa(a.shift(),function(){Mt(a)}):Nt()},Mqa=function(a){return"chrome-extension://"+a+"/cast_sender.js"},Lqa=function(a,b,c){var d=document.createElement("script"); d.onerror=b;c&&(d.onload=c);yc(d,ph(a));(document.head||document.documentElement).appendChild(d)},Nt=function(){var a=Kqa(); a&&a(!1,"No cast extension found")},Oqa=function(){if(Nqa){var a=2,b=Kqa(),c=function(){a--; 0==a&&b&&b(!0)}; window.__onGCastApiAvailable=c;Lqa("//www.gstatic.com/cast/sdk/libs/sender/1.0/cast_framework.js",Nt,c)}},Pqa=function(){Oqa(); var a=(a=window.navigator.userAgent.match(/Chrome\/([0-9]+)/))?parseInt(a[1],10):0;var b=[];if(0!=a){var c=a-1;b.push("//www.gstatic.com/eureka/clank/"+a+"/cast_sender.js");b.push("//www.gstatic.com/eureka/clank/"+c+"/cast_sender.js")}b.push("//www.gstatic.com/eureka/clank/cast_sender.js");Mt(b)},Nqa=Jqa("loadCastFramework")||Jqa("loadCastApplicationFramework"),Qqa=["pkedcjkdefgpdelpbcmbmeomcjbeemfm", "enhhojjnijigcajfphajepfemndkmdlo"];var Ot=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/navigation_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Ot.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Ot.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Ot.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Pt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/navigation_response";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"result"},{field_type:3,field_name:"page_type"},{field_type:3,field_name:"error_type"})}; Pt.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Pt.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Pt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Qt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/servlet_response_errors";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"code"},{field_type:3,field_name:"location"})}; Qt.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; Qt.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; Qt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Rt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/navigate_page_type";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"request_type"})}; Rt.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; Rt.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; Rt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var St=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/away_from_app_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; St.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; St.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; St.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Tt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/bad_endpoint";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Tt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Tt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Tt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Ut=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/forcer_cold_load";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:1,field_name:"url_not_polymer_compatible"},{field_type:1,field_name:"config_disable_warm_loads"})}; Ut.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Ut.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Ut.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Vt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/page_request_fail";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"})}; Vt.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; Vt.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; Vt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Wt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/load_page_request";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"has_player"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})}; Wt.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)}; Wt.prototype.incrementBy=function(a,b,c,d,f){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,f)}; Wt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Xt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/page_chunk_received";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:2,field_name:"chunks_received"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"page_type"})}; Xt.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Xt.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Xt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Yt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/page_request_finished";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:1,field_name:"from_history"},{field_type:1,field_name:"from_miniplayer"})}; Yt.prototype.increment=function(a,b,c,d){this.streamzService_.incrementCounter(this.metricName_,a,b,c,d)}; Yt.prototype.incrementBy=function(a,b,c,d,f){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d,f)}; Yt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var Zt=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/page_update_finish";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"data_page_type"},{field_type:3,field_name:"from_history"})}; Zt.prototype.increment=function(a,b,c){this.streamzService_.incrementCounter(this.metricName_,a,b,c)}; Zt.prototype.incrementBy=function(a,b,c,d){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c,d)}; Zt.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var $t=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/third_party_apisid_cookie_reissue_iframe";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"client_name"})}; $t.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; $t.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; $t.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var au=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/third_party_apisid_cookie_status";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"js_readable"})}; au.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; au.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; au.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var bu=function(){var a=cn();this.metricName_="/client_streamz/youtube/web/debug/browser_cookie_setting";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:1,field_name:"cookie_enabled"})}; bu.prototype.increment=function(a){this.streamzService_.incrementCounter(this.metricName_,a)}; bu.prototype.incrementBy=function(a,b){this.streamzService_.incrementCounterBy(this.metricName_,a,b)}; bu.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)}; var cu=function(a){this.metricName_="/client_streamz/youtube/web/navigation_requests";this.streamzService_=a;this.streamzService_.addNewCounter(this.metricName_,{field_type:3,field_name:"page_type"},{field_type:3,field_name:"load_type"})}; cu.prototype.increment=function(a,b){this.streamzService_.incrementCounter(this.metricName_,a,b)}; cu.prototype.incrementBy=function(a,b,c){this.streamzService_.incrementCounterBy(this.metricName_,a,b,c)}; cu.prototype.getMetric=function(){return this.streamzService_.getMetric(this.metricName_)};var du;du=["av.key","js","unreleased"].slice(-1)[0];var Rqa={NONE:0,EFP:1};var eu=function(){this.exposure=0;this.tabHidden=!1;this.backgroundedState=-1;this.isLargeAd=!1;this.screenShare=0}; eu.prototype.isVisible=function(){return this.isLargeAd?.3<=this.exposure:.5<=this.exposure}; eu.prototype.isFullyVisible=function(){return 1<=this.exposure};var fu={CONTROL:0,EXPERIMENT:1},Sqa={668123728:0,668123729:1},Tqa={44728149:0,44728150:1},Uqa={44727842:0,44727843:1},Vqa={44731964:0,44731965:1},Wqa={NONE:0,INTERSECTION_OBSERVER:1,GEOMETRIC:2},Xqa={480596784:0,480596785:1,21063355:2};var gu=function(){this.value_=null;this.consumesParameter_=this.addsToPing_=!1;this.experimentIdMapping_=null}; gu.prototype.consumesParameter=function(a){this.consumesParameter_=void 0===a?!0:a;return this}; var hu=function(a){a.addsToPing_=!0;return a},iu=function(a,b){a.experimentIdMapping_=void 0===b?null:b}; gu.prototype.setExperimentIds=function(a){var b=this;this.experimentIdMapping_&&eb(a,function(c){c=b.experimentIdMapping_[c];void 0!==c&&b.setValue(c)})}; gu.prototype.getValue=function(){return this.value_}; var ju=function(a){gu.call(this);this.legalValues_=a}; p(ju,gu);ju.prototype.setValue=function(a){if(null!==this.value_||!y.containsValue(this.legalValues_,a))return!1;this.value_=a;return!0}; var ku=function(){gu.call(this)}; p(ku,gu);ku.prototype.setValue=function(a){if(null!==this.value_||"number"!==typeof a)return!1;this.value_=a;return!0}; var lu=function(){gu.call(this)}; p(lu,gu);lu.prototype.setValue=function(a){if(null!==this.value_||"string"!==typeof a)return!1;this.value_=a;return!0};var mu=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}}; mu.prototype.disable=function(){this.allowExperiments_=!1}; mu.prototype.enable=function(){this.allowExperiments_=!0}; mu.prototype.isEnabled=function(){return this.allowExperiments_}; mu.prototype.reset=function(){this.features_={};this.allowExperiments_=!0;this.forcedFeatures_={}}; var nu=function(a,b,c){a.features_[b]||(a.features_[b]=new ju(c));return a.features_[b]}; mu.prototype.defineStringFeature=function(a){this.features_[a]||(this.features_[a]=new lu);return this.features_[a]}; var ou=function(a,b){if(y.containsKey(a.forcedFeatures_,b))return a.forcedFeatures_[b];if(a=a.features_[b])return a.getValue()},pu=function(a){var b={},c=y.filter(a.features_,function(d){return d.addsToPing_}); y.forEach(c,function(d,f){d=void 0!==a.forcedFeatures_[f]?String(a.forcedFeatures_[f]):d.addsToPing_&&null!==d.value_?String(d.value_):"";0Math.random())}; Ou.prototype.disable=function(){this.collectionEnabled=!1;this.events!=this.installedWindow.google_js_reporting_queue&&(Nu()&&eb(this.events,Pu),this.events.length=0)}; var Pu=function(a){a&&Mu&&Nu()&&(Mu.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),Mu.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_end"))}; Ou.prototype.start=function(a,b){if(!this.collectionEnabled)return null;var c=Lu()||Ku();a=new rra(a,b,c);b="goog_"+a.label+"_"+a.uniqueId+"_start";Mu&&Nu()&&Mu.mark(b);return a}; Ou.prototype.end=function(a){if(this.collectionEnabled&&"number"===typeof a.value){var b=Lu()||Ku();a.duration=b-a.value;b="goog_"+a.label+"_"+a.uniqueId+"_end";Mu&&Nu()&&Mu.mark(b);!this.collectionEnabled||2048b.height?m>r?(c=m,d=n):(c=r,d=v):m=this.inherentVisibleGeometryCapability_?a:this;b!==this.effectiveViewportProvider?(this.effectiveViewportProvider==this||1==c&&0!=this.inherentVisibleGeometryCapability_||this.shutdown(),this.isActive_=this.effectiveViewportProvider.isActive_,jv(this)):this.isActive_!==this.effectiveViewportProvider.isActive_&&(this.isActive_=this.effectiveViewportProvider.isActive_, jv(this))}; var Sra=function(a,b){var c=a.alwaysSendUpdates||!a.currentObservation.equals(b,a.volumeRequired_);a.currentObservation=b;c&&Ura(a)}; iv.prototype.handleViewportObservationUpdate=function(a){a.originatingProvider===this.effectiveViewportProvider&&Sra(this,a)}; iv.prototype.requiresVolume=function(){return this.volumeRequired_}; iv.prototype.dispose=function(){this.disposed_=!0}; iv.prototype.isDisposed=function(){return this.disposed_};var mv=function(a,b,c,d){this.element=a;this.elementGeometry=new Tg(0,0,0,0);this.containerGeometry=null;this.frameVisibleGeometry=new Tg(0,0,0,0);this.viewportProvider=b;this.featureSet=c;this.requiresVolume_=d;this.disposed_=!1;this.isEventBasedMeasurement=!0;this.timestamp=-1;this.currentMeasurement=new bv(b.getViewportObservation(),this.element,this.elementGeometry,new Tg(0,0,0,0),0,0,$u(),0)}; e=mv.prototype;e.observe=function(){return!0}; e.unobserve=function(){}; e.dispose=function(){if(!this.isDisposed()){var a=this.viewportProvider;ob(a.observationListeners,this);a.volumeRequired_&&this.requiresVolume()&&Tra(a);this.unobserve();this.disposed_=!0}}; e.isDisposed=function(){return this.disposed_}; e.getLogParams=function(){return this.viewportProvider.getLogParams()}; e.getVisibleGeometryCapability=function(){return this.viewportProvider.getVisibleGeometryCapability()}; e.getFailureCode=function(){return this.viewportProvider.getFailureCode()}; e.hasFailed=function(){return this.viewportProvider.hasFailed()}; e.handleViewportProviderStatusUpdate=function(){}; e.handleViewportObservationUpdate=function(){this.calculateMeasurement()}; e.requiresVolume=function(){return this.requiresVolume_};var nv=function(a){this.disposed_=!1;this.viewportProvider=a;this.failureCallback=La}; e=nv.prototype;e.getVisibleGeometryCapability=function(){return this.viewportProvider.getVisibleGeometryCapability()}; e.getFailureCode=function(){return this.viewportProvider.getFailureCode()}; e.hasFailed=function(){return this.viewportProvider.hasFailed()}; e.create=function(a,b,c){var d=null;this.viewportProvider&&(d=this.createInstance(a,b,c),kv(this.viewportProvider,d));return d}; e.shouldBeUsedForMeasurement=function(){return this.canBeUsed()}; e.canBeUsed=function(){return!1}; e.init=function(a){return this.viewportProvider.initialize()?(kv(this.viewportProvider,this),this.failureCallback=a,!0):!1}; e.handleViewportProviderStatusUpdate=function(a){0==a.getVisibleGeometryCapability()&&this.failureCallback(a.getFailureCode(),this)}; e.handleViewportObservationUpdate=function(){}; e.requiresVolume=function(){return!1}; e.dispose=function(){this.disposed_=!0}; e.isDisposed=function(){return this.disposed_}; e.getLogParams=function(){return{}};var ov=function(a,b,c){this.priority_=void 0===c?0:c;this.key_=a;this.value_=null==b?"":b}; ov.prototype.getParameter=function(){return this.key_}; ov.prototype.getPriority=function(){return this.priority_}; var Vra=function(a){switch(Math.trunc(a.priority_)){case-16:return-16;case-8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16;}}; ov.prototype.lessThan=function(a){return this.priority_a.priority_?!1:this.key_a.key_?!1:typeof this.value_typeof a.value_?!1:this.value_=Math.abs(this.verificationMeasurement.exposure-this.baseMeasurement.exposure))}; xv.prototype.buildVerificationPing=function(){var a={};return a.b_name=this.baseMeasurement.strategyName,a.v_name=this.verificationMeasurement.strategyName,a.b_vp_off=JSON.stringify(this.baseMeasurement.offsetInViewport),a.v_vp_off=JSON.stringify(this.verificationMeasurement.offsetInViewport),a.b_vp_sz=JSON.stringify(this.baseMeasurement.viewportSize),a.v_vp_sz=JSON.stringify(this.verificationMeasurement.viewportSize),a.b_exp=this.baseMeasurement.exposure,a.v_exp=this.verificationMeasurement.exposure, a.efp_occ=this.baseMeasurement.usedEfpOcclusion,a.sbv=this.baseMeasurement.shouldUseViewportShareBasedVisibility,a};var yv=function(){vv.call(this,"capt");this.base_exposures_=[];this.verification_exposures_=[]}; p(yv,vv);yv.prototype.setCurrentFrameMeasurements=function(a,b){vv.prototype.setCurrentFrameMeasurements.call(this,a,b);20<=this.verification_exposures_.length||(this.base_exposures_.push(a.exposure),this.verification_exposures_.push(b.exposure))}; yv.prototype.shouldSendVerificationPing=function(){return 20===this.verification_exposures_.length}; yv.prototype.buildVerificationPing=function(){var a=bsa(this.base_exposures_,this.verification_exposures_),b=csa(this.base_exposures_,this.verification_exposures_),c={};return c.b_name=this.baseMeasurement.strategyName,c.v_name=this.verificationMeasurement.strategyName,c.b_exp=this.base_exposures_.join(","),c.v_exp=this.verification_exposures_.join(","),c.diff=a,c.diff_buckets=b,c}; var bsa=function(a,b){return xaa(Gaa(a,b),function(c){return c[0]!==c[1]})},csa=function(a,b){var c=function(d){return .25*Math.floor(d/.25)}; return bsa(gb(a,c),gb(b,c))};var zv=function(a,b,c,d,f){f=void 0===f?[new wv,new xv,new yv]:f;Rg.call(this);this.verificationStrategy_=a.createInstance(b,c,this.requiresVolume());this.verificationStrategy_.observe();this.verifications_=f;this.adKey_=d}; p(zv,Rg);zv.prototype.disposeInternal=function(){this.verificationStrategy_&&(this.verificationStrategy_.unobserve(),this.verificationStrategy_.dispose())}; var dsa=function(a,b,c){eb(a.verifications_,function(d){var f=a.adKey_;if(!d.hasSentPing_&&(d.setCurrentFrameMeasurements(b,c),d.shouldSendVerificationPing())){d.hasSentPing_=!0;var h=d.buildVerificationPing(),l=new pv;l.add("id","av-js");l.add("type","verif");l.add("vtype",d.verificationGen204Type_);d=asa.getInstance();l.add("i",d.sentPingCount_++);l.add("adk",f);qv(l,h);f=new rv(l);uv(f)}})}; zv.prototype.handleViewportObservationUpdate=function(){}; zv.prototype.handleViewportProviderStatusUpdate=function(){}; zv.prototype.requiresVolume=function(){return!1};var Av=function(){this.delta_=this.maxConsecutive_=this.currentConsecutive_=this.total_=0}; e=Av.prototype;e.getTotal=function(){return this.total_}; e.getMaxConsecutive=function(){return this.maxConsecutive_}; e.getCurrentConsecutive=function(){return this.currentConsecutive_}; e.getDelta=function(){return this.delta_}; e.resetDelta=function(){this.delta_=0}; e.update=function(a,b,c){a&&(this.total_+=b,this.delta_+=b,this.currentConsecutive_+=b,this.maxConsecutive_=Math.max(this.maxConsecutive_,this.currentConsecutive_));if(void 0===c?!a:c)this.currentConsecutive_=0};var esa=[1,.75,.5,.3,0],Bv=function(a){this.thresholds_=a=void 0===a?esa:a;this.buckets_=gb(this.thresholds_,function(){return new Av})}; Bv.prototype.getTotal=function(a){return Cv(this,function(b){return b.getTotal()},void 0===a?!0:a)}; var fsa=function(a,b){return Dv(a,b,function(c){return c.getTotal()})}; Bv.prototype.getMaxConsecutive=function(a){return Cv(this,function(b){return b.getMaxConsecutive()},void 0===a?!0:a)}; var gsa=function(a,b){return Dv(a,b,function(c){return c.getMaxConsecutive()})}; e=Bv.prototype;e.getCurrentConsecutive=function(){return Cv(this,function(a){return a.getCurrentConsecutive()},!0)}; e.getDelta=function(){return Cv(this,function(a){return a.getDelta()},!0)}; e.getDeltaForThreshold=function(a){return Dv(this,a,function(b){return b.getDelta()})}; e.resetDelta=function(){eb(this.buckets_,function(a){return a.resetDelta()})}; e.update=function(a,b,c,d,f,h){h=void 0===h?!0:h;b=f?Math.min(a,b):b;for(f=0;f=l;l=!(0=l)||c;this.buckets_[f].update(h&&m,d,!h||l)}}; var Cv=function(a,b,c){a=gb(a.buckets_,function(d){return b(d)}); return c?a:hsa(a)},Dv=function(a,b,c){var d=yaa(a.thresholds_,function(f){return b<=f}); return-1==d?0:c(a.buckets_[d])},hsa=function(a){return gb(a,function(b,c,d){return 0=this.requiredViewTime}; e.isCurrentlyViewable=function(){return this.viewTime_.getCurrentConsecutive()>=this.requiredViewTime};var isa=new Tg(0,0,0,0);function Fv(a,b){b=Gv(b);return 0===b?0:Gv(a)/b} function Gv(a){return Math.max(a.bottom-a.top,0)*Math.max(a.right-a.left,0)} function jsa(a,b){if(!a||!b)return!1;for(var c=0;null!==a&&100>c++;){if(a===b)return!0;try{if(a=xg(a)||a){var d=Zf(a),f=d&&kg(d),h=f&&f.frameElement;h&&(a=h)}}catch(l){break}}return!1} function ksa(a,b,c){if(!a||!b)return!1;b=a.clone().translate(-b.left,-b.top);a=(b.left+b.right)/2;b=(b.top+b.bottom)/2;var d=Kh();Og(d.top)&&d.top&&d.top.document&&(d=d.top);if(!Fra(d))return!1;a=d.document.elementFromPoint(a,b);if(!a)return!1;b=(b=(b=Zf(c))&&b.defaultView&&b.defaultView.frameElement)&&jsa(b,a);d=a===c;a=!d&&a&&Kg(a,function(f){return f===c}); return!(b||d||a)} function lsa(a,b,c,d){return fv.getInstance().insideCrossDomainIframe?!1:0>=a.getWidth()||0>=a.getHeight()?!0:c&&d?xra(208,function(){return ksa(a,b,c)}):!1} ;var msa=new Tg(0,0,0,0),Hv=function(a,b,c){Rg.call(this);this.position=msa.clone();this.measurementData=new Ev;this.loadTimeExposure=-2;this.timeCreated=Date.now();this.timestampViewedByUser=-1;this.lastUpdateTime=b;this.lastMeasurement_=null;this.elementLoaded_=!1;this.offsetInViewport=null;this.opacity=-1;this.requestSource=c;this.unmeasurableImpressionCallback=this.measurementUpdateCallback=La;this.creativeSearchResults=new $qa;this.creativeSearchResults.markedUpElement=a;this.creativeSearchResults.monitoredElement= a;this.isUnmeasurableImpression=!1;this.contextualEventHandlers_={mouseOver:null,mouseOut:null};this.shouldSendTimeOnScreenPing=!0;this.strategyVerifier_=null;this.inFullscreenMode=this.isPedestalAd=!1;this.adBlockId=Hu.getInstance().nextAdBlockId++;this.lastComputedExposure_=0;this.lastAdState=new eu;this.timeLastSeen=this.timeFirstSeen=-1;this.hoverTime_=0;this.hoverStartTime_=-1;this.measurementStrategy=null;this.visibleBox=new Tg(0,0,0,0);this.isCoReRequest=!1;a=this.featureSet=new mu;nu(a,"od", Rqa);hu(nu(a,"opac",fu));hu(nu(a,"sbeos",fu));hu(nu(a,"prf",fu));hu(nu(a,"mwt",fu));nu(a,"iogeo",fu);(a=this.creativeSearchResults.markedUpElement)&&a.getAttribute&&su(a,"googleAvInapp")&&(fv.getInstance().inAppContext=!0);1==this.requestSource?(a=this.featureSet.features_.od)&&a.setValue(1):(a=this.featureSet.features_.od)&&a.setValue(0)}; p(Hv,Rg);e=Hv.prototype; e.disposeInternal=function(){Iv(this);this.strategyVerifier_&&this.strategyVerifier_.dispose();this.measurementStrategy&&this.measurementStrategy.dispose();delete this.measurementData;delete this.measurementUpdateCallback;delete this.unmeasurableImpressionCallback;delete this.creativeSearchResults.markedUpElement;delete this.creativeSearchResults.monitoredElement;delete this.contextualEventHandlers_;delete this.strategyVerifier_;delete this.measurementStrategy;delete this.featureSet;Rg.prototype.disposeInternal.call(this)}; e.getMeasurementStrategy=function(){return this.measurementStrategy}; e.getPosition=function(){return this.measurementStrategy?this.measurementStrategy.elementGeometry:this.position}; e.getContainerPosition=function(){return this.measurementStrategy?this.measurementStrategy.containerGeometry:null}; e.processActiveViewMetadata=function(a){Hu.getInstance().processActiveViewMetadata(a)}; e.processFlags=function(a){Hu.getInstance().processFlags(a)}; e.requiresVolume=function(){return!1}; e.setElementLoaded=function(){this.elementLoaded_=!0}; e.isReadyForMeasurement=function(){return this.elementLoaded_}; e.resetFractionOnScreenValues=function(){this.lastAdState.exposure=0}; e.resetTimeOnScreenTimers=function(){this.measurementData=new Ev}; e.setFullscreenMode=function(a){if(a!=this.inFullscreenMode){this.inFullscreenMode=a;var b=fv.getInstance();a?b.fullscreenAdblockCount_++:0=(this.isLargeAd()?.3:.5),this.measurementData.update(h,f,this.lastAdState,d),this.lastUpdateTime=b,0=Gv(a.getPosition())?!1:Asa(a)&&!a.cpmavViewUrlInvoked}; e=Lv.prototype;e.updateElementToMeasure=function(a){Iv(this);this.creativeSearchResults.monitoredElement=a;qsa(this);usa(this,a);if(this.measurementStrategy){var b=this.measurementStrategy;b.unobserve();b.element=a;b.observe();b.calculateMeasurement()}}; e.shouldSendImmediatePing=function(){return this.immediatePingEnabled&&!this.activeviewImmediatePingSent}; e.isGpt=function(){return 3==this.requestSource}; e.setRecheckedActiveViewDivs=function(){this.recheckedActiveViewDivs_=!0}; e.setRenderStartTimeFromEpoch=function(a){-1==this.timeRenderStartedFromEpoch_&&(this.timeRenderStartedFromEpoch_=a)}; e.setAdDomLoadingTime=function(a){-1==this.timeAdDomLoadingFromEpoch_&&(this.timeAdDomLoadingFromEpoch_=this.timeRenderStartedFromEpoch_+a)}; e.setScrollDepthAtRenderStart=function(a){this.renderStartScrollDepth_=a}; e.getScrollDepthAtRenderStart=function(){return this.renderStartScrollDepth_}; e.requiresVolume=function(){return!1}; e.hasMetricsChangeListener=function(){return void 0!==this.metricsChangeCallback_};var Csa=function(a){this.reporter_=a;this.key="goog_adspeed";this.validEvents=[3,4];this.cachedPayload_=null}; Csa.prototype.maybeSend=function(a,b,c){if(!nb(this.validEvents,c)||!Nv(a).isValid())return!1;c={};c=(c[0]=this.key,c[40]=xj(Pv(a)),c);if(this.cachedPayload_&&(0,y.equals)(this.cachedPayload_,c))return!1;this.cachedPayload_=c;var d={};(0,y.extend)(d,c,b);return this.reporter_.report(a,0,{urlParams:{},messageParams:d})};var Qv=function(a){this.reporter_=a;this.key="goog_update_data";this.validEvent=0;this.viewedMessageSent_=!1}; Qv.prototype.maybeSend=function(a,b,c){if(c!=this.validEvent||!Nv(a).isValid())return!1;c=1==a.listenerMode;var d=a.isViewed(),f={},h={};b={messageParams:(f[0]=this.key,f[40]=xj(Pv(a)),f),urlParams:Object.assign({},b,(h.r=b.r,h))};if(c)return d&&!this.viewedMessageSent_?(this.viewedMessageSent_=d,this.reporter_.report(a,0,b)):!1;this.viewedMessageSent_=d;return this.reporter_.report(a,0,b)};var Dsa=function(a){Qv.call(this,a);this.key="goog_image_request";this.validEvent=2}; p(Dsa,Qv);var Rv=function(a){Qv.call(this,a);this.key="goog_image_request";this.validEvent=1}; p(Rv,Qv);Rv.prototype.maybeSend=function(a,b,c){var d=a.isViewed()&&a.shouldSendTimeOnScreenPing,f=!a.activeviewPingSent;if(d||f){if(b=Qv.prototype.maybeSend.call(this,a,b,c))if(a.isViewed()||(a.activeviewPingSent=!0),a.isViewed()||a.shouldSendTimeOnScreenPing)a.shouldSendTimeOnScreenPing=!1;return b}return!1};var Sv=function(a,b,c,d){mv.call(this,a,b,c,d)}; p(Sv,mv);e=Sv.prototype;e.calculateElementGeometry=function(){if(this.element){var a=this.element,b=this.viewportProvider.getWindow();try{try{var c=Lra(a.getBoundingClientRect())}catch(r){c=new Tg(0,0,0,0)}var d=c.right-c.left,f=c.bottom-c.top,h=zh(a,b),l=h.x,m=h.y;var n=new Tg(Math.round(m),Math.round(l+d),Math.round(m+f),Math.round(l))}catch(r){n=isa.clone()}this.elementGeometry=n}}; e.calculateFrameVisibleGeometry=function(){this.frameVisibleGeometry=this.viewportProvider.getViewportObservation().visibleGeometry}; e.isElementHidden=function(a){var b=1==ou(this.featureSet,"od");return lsa(a,this.frameVisibleGeometry,this.element,b)}; e.calculateMeasurement=function(){this.timestamp=$u();this.calculateElementGeometry();if(1===ou(Hu.getInstance().featureSet,"vcm")&&this.element&&"number"===typeof this.element.videoWidth&&"number"===typeof this.element.videoHeight){var a=this.element,b=new Xf(a.videoWidth,a.videoHeight);this.containerGeometry=this.elementGeometry;a=this.elementGeometry;var c=a.getWidth(),d=a.getHeight(),f=b.width;b=b.height;0>=f||0>=b||0>=c||0>=d||(f/=b,b=c/d,a=a.clone(),f>b?(c/=f,d=(d-c)/2,0=a.bottom||a.left>=a.right?new Tg(0,0,0,0):a;a=this.viewportProvider.getViewportObservation(); b=f=d=0;0<(this.elementGeometry.bottom-this.elementGeometry.top)*(this.elementGeometry.right-this.elementGeometry.left)&&(this.isElementHidden(c)?c=new Tg(0,0,0,0):(d=fv.getInstance().screenSize,b=new Tg(0,d.height,d.width,0),d=Fv(c,this.elementGeometry),f=Fv(c,fv.getInstance().browserViewportBox),b=Fv(c,b)));c=c.top>=c.bottom||c.left>=c.right?new Tg(0,0,0,0):c.translate(-this.elementGeometry.left,-this.elementGeometry.top);gv()||(f=d=0);this.currentMeasurement=new bv(a,this.element,this.elementGeometry, c,d,f,this.timestamp,b)}; e.getName=function(){return this.viewportProvider.getName()};var Tv=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]}; Tv.prototype.findDisplayAdBlockByAdBlockId=function(a){return lb(this.displayAdBlocks_,function(b){return a.matches(Nv(b))})}; var Uv=function(a,b){return b?lb(a.displayAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},Esa=function(a,b){return lb(a.videoInstreamAdBlocks_,function(c){return c.queryID==b})},Fsa=function(a,b){return b?lb(a.videoInstreamAdBlocks_,function(c){return c.creativeSearchResults.markedUpElement==b}):null},Gsa=function(a){return lb(a.displayAdBlocks_,function(){return!1})}; Tv.prototype.findAdBlockByQueryID=function(a){return Esa(this,a)||Gsa(this)}; var Vv=function(a){return 0==a.videoInstreamAdBlocks_.length?a.displayAdBlocks_:0==a.displayAdBlocks_.length?a.videoInstreamAdBlocks_:qb(a.displayAdBlocks_,a.videoInstreamAdBlocks_)}; Tv.prototype.reset=function(){this.videoInstreamAdBlocks_=[];this.displayAdBlocks_=[]}; Tv.prototype.addVideoAdBlock=function(a){this.videoInstreamAdBlocks_.push(a)}; var Hsa=function(a,b){a=a.displayAdBlocks_;var c=mb(a,function(d){return d==b}); return-1!=c?(a.splice(c,1),b.measurementStrategy&&b.measurementStrategy.unobserve(),b.dispose(),!0):!1},Isa=function(a){var b=Wv; if(Hsa(b,a)){a=function(){return null}; a=function(){return Gsa(b)}; for(var c=a();c;c=a())Hsa(b,c)}}; Tv.prototype.mergeIntoVideoAdBlocks=function(a,b){var c=this;a=fb(a,(void 0===b?0:b)?function(d){return!Esa(c,d.queryID)}:function(d){return!Fsa(c,d.creativeSearchResults.markedUpElement)}); this.videoInstreamAdBlocks_.push.apply(this.videoInstreamAdBlocks_,ha(a));return a}; var Jsa=function(a){var b=Wv,c=[];eb(a,function(d){d.creativeSearchResults.markedUpElement&&null==Uv(b,d.creativeSearchResults.markedUpElement)&&(b.displayAdBlocks_.push(d),c.push(d))})}; Tv.prototype.mergeIntoFlashVideoAdBlocks=function(a){var b=this,c=[];eb(a,function(d){jb(b.videoInstreamAdBlocks_,function(f){return f.creativeSearchResults.markedUpElement===d.creativeSearchResults.markedUpElement&&f.sdkID===d.sdkID&&f.queryID===d.queryID})||(b.videoInstreamAdBlocks_.push(d),c.push(d))}); return c}; Tv.prototype.hasAdBlockInFullscreenMode=function(){return jb(Vv(this),function(a){return a.inFullscreenMode})}; Ma(Tv);var Wv=Tv.getInstance();var Xv=function(a,b,c,d){mv.call(this,a,b,c,d);this.currentMeasurement=new bv(b.getViewportObservation(),this.element,new Tg(0,0,0,0),new Tg(0,0,0,0),1,1,$u(),1)}; p(Xv,mv);Xv.prototype.getName=function(){return"a100"}; Xv.prototype.calculateMeasurement=function(){this.currentMeasurement=new bv(this.viewportProvider.getViewportObservation(),this.element,new Tg(0,0,0,0),new Tg(0,0,0,0),1,1,$u(),1)};var Yv=function(a){nv.call(this,new iv(a,2))}; p(Yv,nv);Yv.prototype.getName=function(){return"a100"}; Yv.prototype.shouldBeUsedForMeasurement=function(){return!0}; Yv.prototype.createInstance=function(a,b,c){return new Xv(a,this.viewportProvider,b,c)};var Zv=function(a,b,c,d){mv.call(this,a,b,c,d);this.isEventBasedMeasurement_=!1;this.screenShare_=this.visibleFraction_=0}; p(Zv,mv);Zv.prototype.handleExternalMeasurement=function(a){var b=a.position;this.elementGeometry=new Tg(b.top,b.right,b.bottom,b.left);this.visibleFraction_=a.exposure||0;this.screenShare_=a.screenShare;b=fv.getInstance();var c=a.insideIframe;void 0!==c&&0==c&&(b.insideCrossDomainIframe=!1);a.documentSize&&(b.documentSize=new Xf(a.documentSize.width,a.documentSize.height));a.viewportSize&&(b.browserViewportBox=new Tg(0,a.viewportSize.width,a.viewportSize.height,0))}; Zv.prototype.getName=function(){return"exc"}; Zv.prototype.calculateMeasurement=function(){this.currentMeasurement=new bv(this.viewportProvider.getViewportObservation(),this.element,this.elementGeometry,new Tg(0,0,0,0),this.visibleFraction_,0,$u(),this.screenShare_)};var $v=function(){nv.call(this,new iv(Qf,2))}; p($v,nv);$v.prototype.getName=function(){return"exc"}; $v.prototype.shouldBeUsedForMeasurement=function(){return!0}; $v.prototype.canBeUsed=function(){return!0}; $v.prototype.createInstance=function(a,b,c){return new Zv(a,this.viewportProvider,b,c)};var aw=function(){this.selectedStrategy_=this.availableStrategies_=null}; aw.prototype.selectStrategy=function(a){if(null==this.availableStrategies_)return!1;var b=function(c,d){a(c,d)}; (this.selectedStrategy_=lb(this.availableStrategies_,function(c){return null!=c&&c.shouldBeUsedForMeasurement()}))&&(this.selectedStrategy_.init(b)?lv(this.selectedStrategy_.viewportProvider):a(this.selectedStrategy_.viewportProvider.getFailureCode(),this.selectedStrategy_)); return null!=this.selectedStrategy_}; Ma(aw);var bw=function(a){var b=Ksa(a);nv.call(this,b.length?b[b.length-1]:new iv(Qf,0));this.selectedProviders_=b;this.activeProvider_=null;this.availableProviders_=a}; p(bw,nv);e=bw.prototype;e.getAvailableProviders=function(){return[].concat(this.availableProviders_)}; e.getName=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getName()}; e.getLogParams=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getLogParams()}; e.getVisibleGeometryCapability=function(){return(this.activeProvider_?this.activeProvider_:this.viewportProvider).getVisibleGeometryCapability()}; e.init=function(a){var b=!1;eb(this.selectedProviders_,function(c){c.initialize()&&(b=!0)}); b&&(this.failureCallback=a,kv(this.viewportProvider,this));return b}; e.dispose=function(){eb(this.selectedProviders_,function(a){a.shutdown();a.dispose()}); nv.prototype.dispose.call(this)}; e.shouldBeUsedForMeasurement=function(){return jb(this.selectedProviders_,function(a){return a.shouldBeUsedForMeasurement()})}; e.canBeUsed=function(){return jb(this.selectedProviders_,function(a){return a.canBeUsed()})}; e.createInstance=function(a,b,c){return new Sv(a,this.viewportProvider,b,c)}; e.handleViewportObservationUpdate=function(a){this.activeProvider_=a.originatingProvider}; var Ksa=function(a){if(!a.length)return[];a=fb(a,function(c){return null!=c&&c.shouldBeUsedForMeasurement()}); for(var b=1;bc.time?b:c},a[0])}; e=cw.prototype;e.calculateMeasurement=function(){var a=dw(this);0this.effectiveViewportProvider.inherentVisibleGeometryCapability_&&(this.effectiveViewportProvider=this,jv(this)),this.inherentVisibleGeometryCapability_=a);return 2==a}; var Osa=function(){if(Hu.getInstance().isInMobiStrategy)return 2;var a=fv.getInstance();return a.insideCrossDomainIframe||a.inAppContext?0:2}; Ma(gw);var hw={},Psa=(hw[1]=function(){return new fw},hw[2]=function(){return new bw([gw.getInstance()])},hw);var iw=function(){this.selectedStrategy_=null;this.strategyMap_=Psa}; iw.prototype.hasSelectedStrategy=function(){return null!=this.selectedStrategy_}; iw.prototype.selectStrategy=function(){a:{var a=ou(Hu.getInstance().featureSet,"mv");if(null!=a&&(a=this.strategyMap_[a])&&(a=a())&&a.canBeUsed())break a;a=null}this.selectedStrategy_=a;return null!=this.selectedStrategy_}; iw.prototype.getSelectedStrategy=function(){return this.selectedStrategy_}; Ma(iw);var jw=function(){this.done=!1;this.dbg={adBlocksRegistered:0,adBlocksFound:0,scrollTime:0,displayUpdates:0,initTime:-1,creativeOnLoadSearches:0,creativeOnDCLSearches:0,creativesAfterFirstSearch:0};this.protectedHandleTabVisibilityEvent_=null;this.isMonitoring=this.startMonitored_=!1;this.pingId_="";this.currentPageStats_=null;this.tabInViewTime_=0;this.sampler=new hv(this)}; jw.prototype.startMonitoring=function(a){var b=this;if(!this.startMonitored_){this.startMonitored_=!0;if(a){a=Vv(Wv);for(var c,d=0;d=Gv(f.getPosition())?2:f.isViewed()?4:3)||5!=f.requestSource){b.adk=f.adk||h+1;y.extend(b,Ov(f));c&&(b.avms=c.getName());b.itpl=Number(ru(f.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;var l=f.shouldSendTimeOnScreenPing&&!f.isUnmeasurableImpression&&f.isViewed();h=new qw(function(){return y.clone(b)}); l?(l={},h.report(f,2,(l.id="lidar2",l.tsf=1,l)),f.shouldSendTimeOnScreenPing=!1):(l={},h.report(f,1,(l.id="lidar2",l)),f.activeviewPingSent=!0)}})}; cta.prototype.sendNoAdsFoundPing=function(a,b){b.nd=a;uv("//pagead2.googlesyndication.com/pagead/gen_204?id=lidar2&"+ow(b))}; var eta=function(a,b){eb(a,function(c,d){new tw(new qw(function(){b.adk=c.adk||d+1;y.extend(b,Ov(c));b.itpl=Number(ru(c.creativeSearchResults.markedUpElement,"googleAvItpl"))||0;return b})).maybeSend(c); c.shouldSendTimeOnScreenPing=!1})};var vw=function(a){sw.call(this,a,"lidar2")}; p(vw,sw);vw.prototype.maybeSend=function(a,b){b=void 0===b?{}:b;b.r="v";sw.prototype.maybeSend.call(this,a,b);a.activeviewPingSent=a.activeviewPingSent||this.sent_}; vw.prototype.meetsCriteria=function(a){return a.isViewed()&&!a.activeviewPingSent};var ww=["FRAME","IMG","IFRAME"],fta=/^[01](px)?$/;function gta(a){return"string"===typeof a?document.getElementById(a):a} function hta(a,b,c){var d=!0,f=!0;d=void 0===d?!0:d;f=void 0===f?!1:f;var h=void 0===h?!1:h;if(a=gta(a)){c||(c=function(E,T,la){E.addEventListener(T,la)}); for(var l=!1,m=function(E){l||(l=!0,b(E))},n,r,v=0;vh.length)this.suppressNoAdBlockPingDueToOsdMonitoring?mw.done=!0:yw("n");else{Vsa();var l=aw.getInstance();if(null==l.availableStrategies_){var m=lta();l.availableStrategies_=m}l.selectStrategy(function(n,r){zw(n,r)})?mw.done||(mta(),Wsa(),mw.startMonitoring(!1)):c.inAppContext?zw("w"):zw("i")}}else zw("pv")}}catch(n){throw Wv.reset(),yw("x"),n; }}; var nta=function(a){var b=Wv.displayAdBlocks_;Hu.getInstance().unmeasurableReason=a;eb(b,function(c){return c.isUnmeasurableImpression=!0})},mta=function(){Cu().setTimeout(yra(176,function(){return yw("t")}),36E5)},zw=function(a,b){nta(a); yw(a,b)},yw=function(a,b){var c=Hu.getInstance(); if(1===ou(c.featureSet,"omid")){if("w"!==a&&"i"!==a&&!c.omidOnePixelImpressionHasOccurred)return}else if(c.isSellsideGma&&!c.webviewEverOnScreen)return;mw.sampler.cancel();if(!mw.done&&(c=Wv.displayAdBlocks_,kw(mw,c,!0),!mw.done)){var d=fb(c,function(h){return!h.activeviewPingSent}),f={}; a=(f.r=a,f);b&&y.extend(a,b.getLogParams());mw.dbg.adBlocksRegistered=Qf.__google_lidar_;f=lw(mw,Qf,!1);y.extend(a,f);0==d.length||dta(d,a,b);eta(c,a);mw.done=!0}},ota=function(a,b,c,d){var f=new nw,h=new $sa,l=Hu.getInstance(),m=new Lv(Qf,"",b,d,c,La,[],[new vw(new rw(f,h))]); c=l.monitor_.stopwatch_;rsa(m,Gu(c,function(n){for(var r=[],v=0;v>>3;1!=h.tag_&&2!=h.tag_&&15!=h.tag_&&h.error_(l,m,"unexpected tag");h.state_=1;h.length_=0;h.countLengthBytes_=0} function c(n){h.countLengthBytes_++;5==h.countLengthBytes_&&n&240&&h.error_(l,m,"message length too long");h.length_|=(n&127)<<7*(h.countLengthBytes_-1);n&128||(h.state_=2,h.countMessageBytes_=0,h.messageBuffer_="undefined"!==typeof Uint8Array?new Uint8Array(h.length_):Array(h.length_),0==h.length_&&f())} function d(n){h.messageBuffer_[h.countMessageBytes_++]=n;h.countMessageBytes_==h.length_&&f()} function f(){if(15>h.tag_){var n={};n[h.tag_]=h.messageBuffer_;h.result_.push(n)}h.state_=0} for(var h=this,l=a instanceof Array?a:new Uint8Array(a),m=0;mb||3==b&&!f))if(d=200==d||206==d,4==b&&(8==c?Vy(this,7):7==c?Vy(this,8):d||Vy(this,3)),this.parser_||(this.parser_=Eva(this.xhr_),null==this.parser_&&Vy(this,5)),2this.pos_){var h=f.substr(this.pos_);this.pos_=f.length;try{var l=this.parser_.parse(h);null!= l&&this.dataHandler_&&this.dataHandler_(l)}catch(m){Vy(this,5);Wy(this);break a}}4==b?(0==f.length?Vy(this,4):Vy(this,2),Wy(this)):Vy(this,1)}}}catch(m){Vy(this,6),Wy(this)}};var Xy=function(a){this.logger_=null;this.xhrReader_=a;a=Ua(this.onData_,this);this.xhrReader_.dataHandler_=a;a=Ua(this.onStatusChange_,this);this.xhrReader_.statusHandler_=a;this.callbackMap_={};this.callbackOnceMap_={}}; e=Xy.prototype;e.on=function(a,b){var c=this.callbackMap_[a];c||(c=[],this.callbackMap_[a]=c);c.push(b);return this}; e.addListener=function(a,b){this.on(a,b);return this}; e.removeListener=function(a,b){var c=this.callbackMap_[a];c&&ob(c,b);(a=this.callbackOnceMap_[a])&&ob(a,b);return this}; e.once=function(a,b){var c=this.callbackOnceMap_[a];c||(c=[],this.callbackOnceMap_[a]=c);c.push(b);return this}; e.onData_=function(a){var b=this.callbackMap_.data;b&&Fva(this,a,b);(b=this.callbackOnceMap_.data)&&Fva(this,a,b);this.callbackOnceMap_.data=[]}; var Fva=function(a,b,c){for(var d={},f=0;fa&&b.setFullYear(b.getFullYear()-1900);return b}; e=QA.prototype;e.firstDayOfWeek_=MA.FIRSTDAYOFWEEK;e.firstWeekCutOffDay_=MA.FIRSTWEEKCUTOFFDAY;e.clone=function(){var a=new QA(this.date);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a}; e.getFullYear=function(){return this.date.getFullYear()}; e.getYear=function(){return this.getFullYear()}; e.getMonth=function(){return this.date.getMonth()}; e.getDate=function(){return this.date.getDate()}; e.getTime=function(){return this.date.getTime()}; e.getDay=function(){return this.date.getDay()}; e.getWeekday=function(){return((this.getDay()+6)%7-this.firstDayOfWeek_+7)%7}; e.getUTCFullYear=function(){return this.date.getUTCFullYear()}; e.getUTCMonth=function(){return this.date.getUTCMonth()}; e.getUTCDate=function(){return this.date.getUTCDate()}; e.getUTCDay=function(){return this.date.getDay()}; e.getUTCHours=function(){return this.date.getUTCHours()}; e.getUTCMinutes=function(){return this.date.getUTCMinutes()}; e.getUTCWeekday=function(){return((this.date.getUTCDay()+6)%7-this.firstDayOfWeek_+7)%7}; e.getNumberOfDaysInMonth=function(){return NA(this.getFullYear(),this.getMonth())}; e.getWeekNumber=function(){return sxa(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)}; e.getYearOfWeek=function(){return new Date(OA(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)).getFullYear()}; e.getDayOfYear=function(){for(var a=this.getDate(),b=this.getFullYear(),c=this.getMonth()-1;0<=c;c--)a+=NA(b,c);return a}; e.getTimezoneOffset=function(){return this.date.getTimezoneOffset()}; e.set=function(a){this.date=new Date(a.getFullYear(),a.getMonth(),a.getDate())}; e.setFullYear=function(a){this.date.setFullYear(a)}; e.setYear=function(a){this.setFullYear(a)}; e.setMonth=function(a){this.date.setMonth(a)}; e.setDate=function(a){this.date.setDate(a)}; e.setTime=function(a){this.date.setTime(a)}; e.setUTCFullYear=function(a){this.date.setUTCFullYear(a)}; e.setUTCMonth=function(a){this.date.setUTCMonth(a)}; e.setUTCDate=function(a){this.date.setUTCDate(a)}; e.add=function(a){if(a.years||a.months){var b=this.getMonth()+a.months+12*a.years,c=this.getYear()+Math.floor(b/12);b%=12;0>b&&(b+=12);var d=Math.min(NA(c,b),this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(a=new Date(new Date(this.getYear(),this.getMonth(),this.getDate(),12).getTime()+864E5*a.days),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate()),PA(this,a.getDate()))}; e.toIsoString=function(a){return[this.getFullYear(),Hc(this.getMonth()+1,2),Hc(this.getDate(),2)].join(a?"-":"")+""}; e.toUTCIsoString=function(a){return[this.getUTCFullYear(),Hc(this.getUTCMonth()+1,2),Hc(this.getUTCDate(),2)].join(a?"-":"")+""}; e.equals=function(a){return!(!a||this.getYear()!=a.getYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())}; e.toString=function(){return this.toIsoString()}; var PA=function(a,b){a.getDate()!=b&&a.date.setUTCHours(a.date.getUTCHours()+(a.getDate()b)throw Error("seconds must be at least -62135596800: "+b);if(253402300800<=b)throw Error("seconds must be less than 253402300800: "+b);if(0>c)throw Error("nanos must be at least 0: "+c);if(1E9<=c)throw Error("nanos must be less than 1000000000: "+c);if(!Number.isInteger(b))throw Error("seconds must be integer: "+b);if(!Number.isInteger(c))throw Error("nanos must be integer: "+c);return new SA(b,c)}catch(d){return null}}; SA.prototype.equals=function(a){return this.seconds===a.seconds&&this.nanos===a.nanos};var TA=function(a,b){this.low_=a|0;this.high_=b|0}; TA.prototype.toInt=function(){return this.low_}; var UA=function(a){return 4294967296*a.high_+(a.low_>>>0)}; TA.prototype.isSafeInteger=function(){var a=this.high_>>21;return 0==a||-1==a&&!(0==this.low_&&-2097152==this.high_)}; TA.prototype.toString=function(a){a=a||10;if(2>a||36>2);var c=Math.pow(a,b),d=VA(c,c/4294967296);c=this.div(d);d=Math.abs(UA(WA(this,c.multiply(d))));var f=10==a?""+d:d.toString(a);f.lengththis.compare(a)}; e.compare=function(a){return this.high_==a.high_?this.low_==a.low_?0:this.low_>>>0>a.low_>>>0?1:-1:this.high_>a.high_?1:-1}; e.negate=function(){var a=~this.low_+1|0;return VA(a,~this.high_+!a|0)}; e.add=function(a){var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,f=a.high_>>>16,h=a.high_&65535,l=a.low_>>>16;a=(this.low_&65535)+(a.low_&65535);l=(a>>>16)+(d+l);d=l>>>16;d+=c+h;b=(d>>>16)+(b+f)&65535;return VA((l&65535)<<16|a&65535,b<<16|d&65535)}; var WA=function(a,b){return a.add(b.negate())}; e=TA.prototype;e.multiply=function(a){if(ZA(this))return this;if(ZA(a))return a;var b=this.high_>>>16,c=this.high_&65535,d=this.low_>>>16,f=this.low_&65535,h=a.high_>>>16,l=a.high_&65535,m=a.low_>>>16;a=a.low_&65535;var n=f*a;var r=(n>>>16)+d*a;var v=r>>>16;r=(r&65535)+f*m;v+=r>>>16;v+=c*a;var z=v>>>16;v=(v&65535)+d*m;z+=v>>>16;v=(v&65535)+f*l;z=z+(v>>>16)+(b*a+c*m+d*l+f*h)&65535;return VA((r&65535)<<16|n&65535,z<<16|v&65535)}; e.div=function(a){if(ZA(a))throw Error("division by zero");if(0>this.high_){if(this.equals($A)){if(a.equals(aB)||a.equals(wxa))return $A;if(a.equals($A))return aB;var b=1;if(0==b)b=this;else{var c=this.high_;b=32>b?VA(this.low_>>>b|c<<32-b,c>>b):VA(c>>b-32,0<=c?0:-1)}b=b.div(a).shiftLeft(1);if(b.equals(bB))return 0>a.high_?aB:wxa;c=WA(this,a.multiply(b));return b.add(c.div(a))}return 0>a.high_?this.negate().div(a.negate()):this.negate().div(a).negate()}if(ZA(this))return bB;if(0>a.high_)return a.equals($A)? bB:this.div(a.negate()).negate();var d=bB;for(c=this;0<=c.compare(a);){b=Math.max(1,Math.floor(UA(c)/UA(a)));var f=Math.ceil(Math.log(b)/Math.LN2);f=48>=f?1:Math.pow(2,f-48);for(var h=cB(b),l=h.multiply(a);0>l.high_||0a?VA(b<>>32-a):VA(0,b<a?VA(this.low_>>>a|b<<32-a,b>>>a):32==a?VA(b,0):VA(b>>>a-32,0)}; var cB=function(a){return 0a?-9223372036854776000>=a?$A:new TA(-a,-a/4294967296).negate():bB},VA=function(a,b){return new TA(a,b)},dB=function(a,b){if("-"==a.charAt(0))return dB(a.substring(1),b).negate(); var c=parseInt(a,b||10);if(9007199254740991>=c)return new TA(c%4294967296|0,c/4294967296|0);if(0==a.length)throw Error("number format error: empty string");if(0<=a.indexOf("-"))throw Error("number format error: interior \"-\" character: "+a);b=b||10;if(2>b||36h?(h=cB(Math.pow(b,h)),d=d.multiply(h).add(cB(l))):(d=d.multiply(c),d=d.add(cB(l)))}return d}, bB=VA(0,0),aB=VA(1,0),wxa=VA(-1,-1),xxa=VA(4294967295,2147483647),$A=VA(0,2147483648);var eB=function(a,b){this.value=a;this.isDecreasing=!!b}; eB.prototype.equals=function(a){if(this.isDecreasing!==a.isDecreasing)var b=!1;else if("string"===typeof this.value||"number"===typeof this.value)b=this.value===a.value;else if(this.value instanceof TA)b=a.value instanceof TA?this.value.equals(a.value):!1;else if(this.value instanceof Uint8Array){if(a.value instanceof Uint8Array){a:if(b=this.value,a=a.value,b.length!==a.length)b=!1;else{for(var c=0;ca.parts.length)b=!1;else{for(b=0;ba.length||(a=a[1],!Array.isArray(a)||1>a.length))){var b=a[0];if("noop"!=b&&"stop"!=b&&"close"!=b)for(b=1;ba||3==a&&!ue&&!this.xmlHttp_.getResponseText())){this.cancelled_||4!=a||7==b||(8==b||0>=c?nB(3):nB(2));Zq(this);var d=this.xmlHttp_.getStatus();this.lastStatusCode_=d;b=this.xmlHttp_.getResponseText();if(!b){var f=this;this.channelDebug_.debug(function(){return"No response text for uri "+f.requestUri_+" status "+d})}this.successful_=200==d; this.channelDebug_.xmlHttpChannelResponseMetaData(this.verb_,this.requestUri_,this.rid_,this.retryId_,a,d);if(this.successful_){if(this.decodeInitialResponse_&&!this.initialResponseDecoded_)if(c=Mxa(this))this.channelDebug_.xmlHttpChannelResponseText(this.rid_,c,"Initial handshake response via X-HTTP-Initial-Response"),this.initialResponseDecoded_=!0,this.safeOnRequestData_(c);else{this.successful_=!1;this.lastError_=3;oB(12);this.channelDebug_.warning("XMLHTTP Missing X_HTTP_INITIAL_RESPONSE ("+ this.rid_+")");this.cleanup_();$q(this);return}this.decodeChunks_?(this.decodeNextChunks_(a,b),ue&&this.successful_&&3==a&&ioa(this)):(this.channelDebug_.xmlHttpChannelResponseText(this.rid_,b,null),this.safeOnRequestData_(b));4==a&&this.cleanup_();if(this.successful_&&!this.cancelled_)if(4==a)this.channel_.onRequestComplete(this);else this.successful_=!1,Xq(this)}else 400==d&&0a.length)return sB;a=a.substr(c,b);this.xmlHttpChunkStart_=c+b;return a}; e.cancel=function(){this.cancelled_=!0;this.cleanup_()}; e.ensureWatchDogTimer_=function(){this.watchDogTimeoutTime_=Xa()+this.timeout_;this.startWatchDogTimer_(this.timeout_)}; e.startWatchDogTimer_=function(a){if(null!=this.watchDogTimerId_)throw Error("WatchDog timer not null");this.watchDogTimerId_=pB(Ua(this.onWatchDogTimeout_,this),a)}; e.cancelWatchDogTimer_=function(){this.watchDogTimerId_&&(t.clearTimeout(this.watchDogTimerId_),this.watchDogTimerId_=null)}; e.onWatchDogTimeout_=function(){this.watchDogTimerId_=null;var a=Xa();0<=a-this.watchDogTimeoutTime_?this.handleTimeout_():(this.channelDebug_.warning("WatchDog timer called too early"),this.startWatchDogTimer_(this.watchDogTimeoutTime_-a))}; e.handleTimeout_=function(){this.channelDebug_.timeoutResponse(this.requestUri_);2!=this.type_&&(nB(3),oB(17));this.cleanup_();this.lastError_=2;$q(this)}; e.dispatchFailure_=function(){if(!this.channel_.isClosed()&&!this.cancelled_)this.channel_.onRequestComplete(this)}; e.cleanup_=function(){Zq(this);Qg(this.readyStateChangeThrottle_);this.readyStateChangeThrottle_=null;this.pollingTimer_.stop();this.eventHandler_.removeAll();if(this.xmlHttp_){var a=this.xmlHttp_;this.xmlHttp_=null;a.abort();a.dispose()}}; e.getSuccess=function(){return this.successful_}; e.getLastError=function(){return this.lastError_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getSessionId=function(){return this.sid_}; e.getRequestId=function(){return this.rid_}; e.getPostData=function(){return this.postData_}; e.getXhr=function(){return this.xmlHttp_}; e.getRequestStartTime=function(){return this.requestStartTime_}; e.safeOnRequestData_=function(a){try{this.channel_.onRequestData(this,a),nB(4)}catch(b){}};var Nxa=function(){this.bufferingProxyResult=this.handshakeResult=null};var Oxa=function(a,b){this.mapId=a;this.map=b;this.context=null};var uB=function(a){this.maxPoolSizeConfigured_=a||10;t.PerformanceNavigationTiming?(a=t.performance.getEntriesByType("navigation"),a=0=a.maxSize_:!1}; uB.prototype.getMaxSize=function(){return this.maxSize_}; var vB=function(a){return a.request_?1:a.requestPool_?a.requestPool_.size:0}; uB.prototype.hasRequest=function(a){return this.request_?this.request_==a:this.requestPool_?this.requestPool_.has(a):!1}; var wB=function(a,b){a.requestPool_?a.requestPool_.add(b):a.request_=b},Qxa=function(a,b){a.request_&&a.request_==b?a.request_=null:a.requestPool_&&a.requestPool_.has(b)&&a.requestPool_.delete(b)}; uB.prototype.cancel=function(){this.pendingMessages_=this.getPendingMessages();if(this.request_)this.request_.cancel(),this.request_=null;else if(this.requestPool_&&0!==this.requestPool_.size){for(var a=k(this.requestPool_.values()),b=a.next();!b.done;b=a.next())b.value.cancel();this.requestPool_.clear()}}; var Rxa=function(a){return null!=a.request_||null!=a.requestPool_&&0!==a.requestPool_.size}; uB.prototype.getPendingMessages=function(){if(null!=this.request_)return this.pendingMessages_.concat(this.request_.getPendingMessages());if(null!=this.requestPool_&&0!==this.requestPool_.size){for(var a=this.pendingMessages_,b=k(this.requestPool_.values()),c=b.next();!c.done;c=b.next())a=a.concat(c.value.getPendingMessages());return a}return rb(this.pendingMessages_)}; var Sxa=function(a,b){a.pendingMessages_=a.pendingMessages_.concat(b)},Txa=function(a,b){if(null!=a.request_)return a.request_.cancel(),b(a.request_),!0; if(a.requestPool_&&0!==a.requestPool_.size){a=k(a.requestPool_.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.cancel(),b(c);return!0}return!1};var Uxa=function(a,b){var c=new qB;c.debug("TestLoadImage: loading "+a);if(t.Image){var d=new Image;d.onload=Va(xB,c,d,"TestLoadImage: loaded",!0,b);d.onerror=Va(xB,c,d,"TestLoadImage: error",!1,b);d.onabort=Va(xB,c,d,"TestLoadImage: abort",!1,b);d.ontimeout=Va(xB,c,d,"TestLoadImage: timeout",!1,b);t.setTimeout(function(){if(d.ontimeout)d.ontimeout()},1E4); d.src=a}else b(!1)},xB=function(a,b,c,d,f){try{a.debug(c),b.onload=null,b.onerror=null,b.onabort=null,b.ontimeout=null,f(d)}catch(h){}};var Vxa=function(){this.parser_=new Kq},Wxa=function(a,b,c){var d=c||""; try{dr(a,function(f,h){var l=f;Qa(f)&&(l=xj(f));b.push(d+h+"="+encodeURIComponent(l))})}catch(f){throw b.push(d+"type="+encodeURIComponent("_badmap")),f; }};var yB=function(a,b,c){return c&&c.internalChannelParams?c.internalChannelParams[a]||b:b},zB=function(a){this.clientVersion_=22; this.serverVersion_=0;this.outgoingMaps_=[];this.channelDebug_=new qB;this.connState_=new Nxa;this.hostPrefix_=this.backChannelUri_=this.forwardChannelUri_=this.path_=this.backChannelRequest_=this.httpSessionId_=this.httpSessionIdParam_=this.extraParams_=this.httpHeadersOverwriteParam_=this.initHeaders_=this.extraHeaders_=null;this.allowHostPrefix_=!0;this.nextMapId_=this.nextRid_=0;this.failFast_=yB("failFast",!1,a);this.enableStreaming_=this.deadBackChannelTimerId_=this.backChannelTimerId_=this.forwardChannelTimerId_= this.handler_=null;this.allowStreamingMode_=!0;this.lastStatusCode_=this.lastPostResponseArrayId_=this.lastArrayId_=-1;this.backChannelAttemptId_=this.backChannelRetryCount_=this.forwardChannelRetryCount_=0;this.baseRetryDelayMs_=yB("baseRetryDelayMs",5E3,a);this.retryDelaySeedMs_=yB("retryDelaySeedMs",1E4,a);this.forwardChannelMaxRetries_=yB("forwardChannelMaxRetries",2,a);this.forwardChannelRequestTimeoutMs_=yB("forwardChannelRequestTimeoutMs",2E4,a);this.xmlHttpFactory_=a&&a.xmlHttpFactory||void 0; this.backChannelRequestTimeoutMs_=void 0;this.readyStateChangeThrottleMs_=0;this.supportsCrossDomainXhrs_=a&&a.supportsCrossDomainXhr||!1;this.sid_="";this.forwardChannelRequestPool_=new uB(a&&a.concurrentRequestLimit);this.wireCodec_=new Vxa;this.fastHandshake_=a&&a.fastHandshake||!1;this.blockingHandshake_=a&&a.blockingHandshake||!1;a&&a.disableRedact&&this.channelDebug_.disableRedact();a&&a.forceLongPolling&&(this.allowStreamingMode_=!1);this.detectBufferingProxy_=!this.fastHandshake_&&this.allowStreamingMode_&& a&&a.detectBufferingProxy||!1;this.forwardChannelFlushedCallback_=void 0;this.handshakeRttMs_=0;this.bpDetectionDone_=!1;this.bpDetectionTimerId_=null;this.enableOriginTrials_=!a||!1!==a.enableOriginTrials}; e=zB.prototype;e.channelVersion_=8;e.state_=1;e.getServerVersion=function(){return this.serverVersion_}; e.getWireCodec=function(){return this.wireCodec_}; e.getChannelDebug=function(){return this.channelDebug_}; e.setChannelDebug=function(a){this.channelDebug_=a}; e.connect=function(a,b,c,d){this.channelDebug_.debug("connect()");this.enableOriginTrials_&&(this.channelDebug_.info("Origin Trials enabled."),Li(Ua(this.runOriginTrials_,this,a)));oB(0);this.path_=a;this.extraParams_=b||{};c&&void 0!==d&&(this.extraParams_.OSID=c,this.extraParams_.OAID=d);this.enableStreaming_=this.allowStreamingMode_;zr(this)}; e.disconnect=function(){this.channelDebug_.debug("disconnect()");this.cancelRequests_();if(3==this.state_){var a=this.nextRid_++,b=this.forwardChannelUri_.clone();ar(b,"SID",this.sid_);ar(b,"RID",a);ar(b,"TYPE","terminate");this.addAdditionalParams_(b);a=new rB(this,this.channelDebug_,this.sid_,a,void 0);a.type_=2;a.baseUri_=Wq(b.clone());b=!1;t.navigator&&t.navigator.sendBeacon&&(b=t.navigator.sendBeacon(a.baseUri_.toString(),""));!b&&t.Image&&(new Image().src=a.baseUri_,b=!0);b||(a.xmlHttp_=a.channel_.createXhrIo(null), a.xmlHttp_.send(a.baseUri_));a.requestStartTime_=Xa();Xq(a)}this.onClose_()}; e.getSessionId=function(){return this.sid_}; e.connectChannel_=function(){this.channelDebug_.debug("connectChannel_()");this.ensureInState_(1,0);this.forwardChannelUri_=this.getForwardChannelUri(this.path_);this.ensureForwardChannel_()}; e.runOriginTrials_=function(a){try{this.channelDebug_.info("Origin Trials invoked: "+a)}catch(b){}}; var AB=function(a){a.backChannelRequest_&&(tB(a),a.backChannelRequest_.cancel(),a.backChannelRequest_=null)}; zB.prototype.cancelRequests_=function(){AB(this);this.backChannelTimerId_&&(t.clearTimeout(this.backChannelTimerId_),this.backChannelTimerId_=null);Ar(this);this.forwardChannelRequestPool_.cancel();this.forwardChannelTimerId_&&Xxa(this)}; var Xxa=function(a){"number"===typeof a.forwardChannelTimerId_&&t.clearTimeout(a.forwardChannelTimerId_);a.forwardChannelTimerId_=null}; e=zB.prototype;e.getExtraHeaders=function(){return this.extraHeaders_}; e.setExtraHeaders=function(a){this.extraHeaders_=a}; e.getInitHeaders=function(){return this.initHeaders_}; e.getHttpSessionId=function(){return this.httpSessionId_}; e.setReadyStateChangeThrottle=function(a){this.readyStateChangeThrottleMs_=a}; e.setSupportsCrossDomainXhrs=function(a){this.supportsCrossDomainXhrs_=a}; e.getHandler=function(){return this.handler_}; e.setHandler=function(a){this.handler_=a}; e.getAllowHostPrefix=function(){return this.allowHostPrefix_}; e.setAllowHostPrefix=function(a){this.allowHostPrefix_=a}; e.isBuffered=function(){return!this.enableStreaming_}; e.getAllowStreamingMode=function(){return this.allowStreamingMode_}; e.setAllowStreamingMode=function(a){this.allowStreamingMode_=a}; e.sendMap=function(a){this.outgoingMaps_.push(new Oxa(this.nextMapId_++,a));3==this.state_&&this.ensureForwardChannel_()}; e.setFailFast=function(a){this.failFast_=a;this.channelDebug_.info("setFailFast: "+a);if((Rxa(this.forwardChannelRequestPool_)||this.forwardChannelTimerId_)&&this.forwardChannelRetryCount_>Br(this)){var b=this;this.channelDebug_.info(function(){return"Retry count "+b.forwardChannelRetryCount_+" > new maxRetries "+Br(b)+". Fail immediately!"}); Txa(this.forwardChannelRequestPool_,Ua(this.onRequestComplete,this))||(Xxa(this),this.signalError_(2))}}; e.getForwardChannelMaxRetries=function(){return this.failFast_?0:this.forwardChannelMaxRetries_}; e.setForwardChannelMaxRetries=function(a){this.forwardChannelMaxRetries_=a}; e.setForwardChannelRequestTimeout=function(a){this.forwardChannelRequestTimeoutMs_=a}; e.getBackChannelMaxRetries=function(){return 3}; e.isClosed=function(){return 0==this.state_}; e.getState=function(){return this.state_}; e.getLastStatusCode=function(){return this.lastStatusCode_}; e.getLastArrayId=function(){return this.lastArrayId_}; e.hasOutstandingRequests=function(){var a=0;this.backChannelRequest_&&a++;a+=vB(this.forwardChannelRequestPool_);return 0!=a}; e.ensureForwardChannel_=function(){Pxa(this.forwardChannelRequestPool_)||this.forwardChannelTimerId_||(this.forwardChannelTimerId_=!0,Li(this.onStartForwardChannelTimer_,this),this.forwardChannelRetryCount_=0)}; e.maybeRetryForwardChannel_=function(a){if(vB(this.forwardChannelRequestPool_)>=this.forwardChannelRequestPool_.getMaxSize()-(this.forwardChannelTimerId_?1:0))return!1;if(this.forwardChannelTimerId_)return this.channelDebug_.debug("Use the retry request that is already scheduled."),this.outgoingMaps_=a.getPendingMessages().concat(this.outgoingMaps_),!0;if(1==this.state_||2==this.state_||this.forwardChannelRetryCount_>=Br(this))return!1;this.channelDebug_.debug("Going to retry POST");this.forwardChannelTimerId_= pB(Ua(this.onStartForwardChannelTimer_,this,a),this.getRetryTime_(this.forwardChannelRetryCount_));this.forwardChannelRetryCount_++;return!0}; e.onStartForwardChannelTimer_=function(a){this.forwardChannelTimerId_&&(this.forwardChannelTimerId_=null,this.startForwardChannel_(a))}; e.startForwardChannel_=function(a){this.channelDebug_.debug("startForwardChannel_");this.okToMakeRequest_()&&(1==this.state_?a||(this.open_(),this.state_=2):3==this.state_&&(a?this.makeForwardChannelRequest_(a):0==this.outgoingMaps_.length?this.channelDebug_.debug("startForwardChannel_ returned: nothing to send"):Pxa(this.forwardChannelRequestPool_)||(this.makeForwardChannelRequest_(),this.channelDebug_.debug("startForwardChannel_ finished, sent request"))))}; e.open_=function(){this.channelDebug_.debug("open_()");this.nextRid_=Math.floor(1E5*Math.random());var a=this.nextRid_++,b=new rB(this,this.channelDebug_,"",a,void 0),c=this.extraHeaders_;this.initHeaders_&&(c?(c=y.clone(c),y.extend(c,this.initHeaders_)):c=this.initHeaders_);null===this.httpHeadersOverwriteParam_&&b.setExtraHeaders(c);var d;if(this.fastHandshake_)a:{for(var f=d=0;fn)f=Math.max(0,d[m].mapId-100),l=!1;else try{Wxa(r,h,"req"+n+"_")}catch(v){c&&c(r)}}if(l){c=h.join("&");break a}}b=this.outgoingMaps_.splice(0,b);a.pendingMessages_= b;return c}; e.requeuePendingMaps_=function(a){this.outgoingMaps_=a.getPendingMessages().concat(this.outgoingMaps_)}; e.ensureBackChannel_=function(){this.backChannelRequest_||this.backChannelTimerId_||(this.backChannelAttemptId_=1,Li(this.onStartBackChannelTimer_,this),this.backChannelRetryCount_=0)}; e.maybeRetryBackChannel_=function(){if(this.backChannelRequest_||this.backChannelTimerId_||3<=this.backChannelRetryCount_)return!1;this.channelDebug_.debug("Going to retry GET");this.backChannelAttemptId_++;this.backChannelTimerId_=pB(Ua(this.onStartBackChannelTimer_,this),this.getRetryTime_(this.backChannelRetryCount_));this.backChannelRetryCount_++;return!0}; e.onStartBackChannelTimer_=function(){this.backChannelTimerId_=null;this.startBackChannel_();if(this.detectBufferingProxy_&&!this.bpDetectionDone_)if(null==this.backChannelRequest_||0>=this.handshakeRttMs_)this.channelDebug_.warning("Skip bpDetectionTimerId_ "+this.backChannelRequest_+" "+this.handshakeRttMs_);else{var a=2*this.handshakeRttMs_;this.channelDebug_.info("BP detection timer enabled: "+a);this.bpDetectionTimerId_=pB(Ua(this.onBpDetectionTimer_,this),a)}}; e.onBpDetectionTimer_=function(){if(this.bpDetectionTimerId_){this.bpDetectionTimerId_=null;this.channelDebug_.info("BP detection timeout reached.");if(null!=this.backChannelRequest_.getXhr()){var a=this.backChannelRequest_.getXhr().getResponseText();a&&this.channelDebug_.warning("Timer should have been cancelled : "+a)}this.channelDebug_.info("Buffering proxy detected and switch to long-polling!");this.enableStreaming_=!1;this.bpDetectionDone_=!0;oB(10);AB(this);this.startBackChannel_()}else this.channelDebug_.warning("Invalid operation.")}; var tB=function(a){null!=a.bpDetectionTimerId_&&(a.channelDebug_.debug("Cancel the BP detection timer."),t.clearTimeout(a.bpDetectionTimerId_),a.bpDetectionTimerId_=null)}; e=zB.prototype; e.startBackChannel_=function(){if(this.okToMakeRequest_()){this.channelDebug_.debug("Creating new HttpRequest");this.backChannelRequest_=new rB(this,this.channelDebug_,this.sid_,"rpc",this.backChannelAttemptId_);null===this.httpHeadersOverwriteParam_&&this.backChannelRequest_.setExtraHeaders(this.extraHeaders_);this.backChannelRequest_.setReadyStateChangeThrottle(this.readyStateChangeThrottleMs_);var a=this.backChannelUri_.clone();ar(a,"RID","rpc");ar(a,"SID",this.sid_);ar(a,"CI",this.enableStreaming_?"0": "1");ar(a,"AID",this.lastArrayId_);this.addAdditionalParams_(a);ar(a,"TYPE","xmlhttp");this.httpHeadersOverwriteParam_&&this.extraHeaders_&&Oy(a,this.httpHeadersOverwriteParam_,this.extraHeaders_);this.backChannelRequestTimeoutMs_&&this.backChannelRequest_.setTimeout(this.backChannelRequestTimeoutMs_);this.backChannelRequest_.xmlHttpGet(a,!0,this.hostPrefix_);this.channelDebug_.debug("New Request created")}}; e.okToMakeRequest_=function(){return!0}; e.onRequestData=function(a,b){if(0!=this.state_&&(this.backChannelRequest_==a||this.forwardChannelRequestPool_.hasRequest(a)))if(this.lastStatusCode_=a.getLastStatusCode(),!a.initialResponseDecoded_&&this.forwardChannelRequestPool_.hasRequest(a)&&3==this.state_){try{var c=this.wireCodec_.parser_.parse(b)}catch(d){c=null}if(Array.isArray(c)&&3==c.length){if(this.handlePostResponse_(c,a),1>=vB(this.forwardChannelRequestPool_)&&this.forwardChannelFlushedCallback_){try{this.forwardChannelFlushedCallback_()}catch(d){}this.forwardChannelFlushedCallback_= void 0}}else this.channelDebug_.debug("Bad POST response data returned"),this.signalError_(11)}else(a.initialResponseDecoded_||this.backChannelRequest_==a)&&Ar(this),Pb(b)||(c=this.wireCodec_.parser_.parse(b),this.onInput_(c,a))}; e.handlePostResponse_=function(a,b){0==a[0]?this.handleBackchannelMissing_(b):(this.lastPostResponseArrayId_=a[1],b=this.lastPostResponseArrayId_-this.lastArrayId_,0a&&!this.isBuffered()&&0==this.backChannelRetryCount_}; e.correctHostPrefix=function(a){return this.allowHostPrefix_?this.handler_?this.handler_.correctHostPrefix(a):a:null}; e.onBackChannelDead_=function(){null!=this.deadBackChannelTimerId_&&(this.deadBackChannelTimerId_=null,AB(this),this.maybeRetryBackChannel_(),oB(19))}; e.clearDeadBackchannelTimer_=function(){null!=this.deadBackChannelTimerId_&&(t.clearTimeout(this.deadBackChannelTimerId_),this.deadBackChannelTimerId_=null)}; e.onRequestComplete=function(a){this.channelDebug_.debug("Request complete");var b=null;if(this.backChannelRequest_==a){Ar(this);tB(this);this.backChannelRequest_=null;var c=2}else if(this.forwardChannelRequestPool_.hasRequest(a))b=a.getPendingMessages(),Qxa(this.forwardChannelRequestPool_,a),c=1;else return;this.lastStatusCode_=a.getLastStatusCode();if(0!=this.state_)if(a.successful_)1==c?(Jxa(a.postData_?a.postData_.length:0,Xa()-a.requestStartTime_,this.forwardChannelRetryCount_),this.ensureForwardChannel_(), this.onSuccess_(a)):this.ensureBackChannel_();else{var d=a.getLastError();if(3==d||0==d&&0=c[0].time-d.now();)c.shift().notification.observe(f);0a?b.lift(new oC(-1,b)):b.lift(new oC(a-1,b))}} var oC=function(a,b){this.count=a;this.source=b}; oC.prototype.call=function(a,b){return b.subscribe(new pC(a,this.count,this.source))}; var pC=function(a,b,c){MB.call(this,a);this.count=b;this.source=c}; p(pC,MB);pC.EMPTY=MB.EMPTY;pC.create=MB.create;pC.prototype.complete=function(){if(!this.isStopped){var a=this.source,b=this.count;if(0===b)return MB.prototype.complete.call(this);-1n.knowledgeTimestamp&&(n.knowledgeTimestamp=r);try{n.observer.next(m)}catch(J){}}break;case 2:if(r=M(n,wA,2)){n=new Qya;r=k(Kf(r,gA,1));for(v=r.next();!v.done;v=r.next()){var z=v.value,C=M(z,dA,1);v=z.getVersion();C&&v&&(z=nf(I(z,2)),z=null=== z?void 0:z,(C=bza(C))&&n.add(new LA(C,dB(v),z)))}r=n}else r=void 0;if(r&&(n=a,m=n.nonCausalStreams.get(m)||n.limboStreams.get(m)))for(n=k(r.changeList),r=n.next();!r.done;r=n.next()){r=r.value;r=new LA(r.objectId,r.version,r.payload);try{m.observer.next(r)}catch(J){}}break;case 5:if(n=a,r=n.causalStreams.get(m)||n.limboStreams.get(m)||n.nonCausalStreams.get(m))try{r.observer.complete(),uC(n,m)}catch(J){}}}if(h.hasStatus())switch(h.getStatus().getCode()){case 1:a.channelState&&a.channelState.channel.close();}}, a,b.gsessionid), affinitization:b.affinitization};b=[].concat(Array.from(a.causalStreams.entries())).concat(Array.from(a.nonCausalStreams.entries()));b.sort(function(h,l){return h[0]-l[0]}); b=k(b);for(var c=b.next();!c.done;c=b.next()){var d=k(c.value);c=d.next().value;d=d.next().value;tC(a,c,d)}b=k(a.limboStreams);for(c=b.next();!c.done;c=b.next())c=k(c.value),c.next(),c.next().value.observer.complete();a.limboStreams.clear();var f=a.channelState;aj(function(){a.channelState===f&&a.delayGenerator.reset()},45E3)}; rC.prototype.watch=function(a,b){var c=this;b=void 0===b?{}:b;return new PB(function(d){var f,h=++c.streamNumber,l=null!==(f=b.projectOverride)&&void 0!==f?f:c.defaultProject;d=new cza(d,l,a);c.causalStreams.set(h,d);c.newStreamSubject.next({});tC(c,h,d);return function(){uC(c,h)}})}; rC.prototype.watchWithStartTime=function(a,b,c){var d=this;c=void 0===c?{}:c;return new PB(function(f){var h,l=++d.streamNumber,m=null!==(h=c.projectOverride)&&void 0!==h?h:d.defaultProject;f=new sC(f,m,a,b);d.nonCausalStreams.set(l,f);d.newStreamSubject.next({});tC(d,l,f);return function(){uC(d,l)}})}; var cza=function(a,b,c){this.observer=a;this.project=b;this.interestSet=c}; cza.prototype.start=function(){return new dza(this.observer,this.project,this.interestSet)}; var dza=function(a,b,c){this.observer=a;this.project=b;this.interestSet=c}; dza.prototype.advance=function(a){return new sC(this.observer,this.project,this.interestSet,a)}; var sC=function(a,b,c,d){this.observer=a;this.project=b;this.interestSet=c;this.knowledgeTimestamp=d}; function Wya(a){var b=new aA;b.setName(a);return b} function Xya(a){a.isPrivateToUser()?(a=new Sz,Af(a,2,Rz[0],!0)):(a=new Sz,Af(a,1,Rz[0],!0));return a} function Yya(a,b){var c=new Vz;b&&sf(c,2,2);a=k(a.parts);for(b=a.next();!b.done;b=a.next()){var d=b.value;b=new Xz;d.value instanceof TA?d.isDecreasing?Af(b,4,Wz[0],d.value.toString()):Af(b,2,Wz[0],d.value.toString()):"string"===typeof d.value?d.isDecreasing?Af(b,3,Wz[0],d.value):Af(b,1,Wz[0],d.value):"number"===typeof d.value?d.isDecreasing?Af(b,9,Wz[0],d.value):Af(b,10,Wz[0],d.value):d.value instanceof Uint8Array?d.isDecreasing?Af(b,5,Wz[0],d.value):Af(b,7,Wz[0],d.value):d.value instanceof SA&&( d.isDecreasing?(d=uxa(d.value),Cf(b,11,Wz[0],d)):(d=uxa(d.value),Cf(b,12,Wz[0],d)));Lf(c,1,b,Xz,void 0)}return c} function bza(a){for(var b,c,d=[],f=k((null===(b=a.getPath())||void 0===b?void 0:Kf(b,Xz,1))||[]),h=f.next();!h.done;h=f.next())switch(h=h.value,ef(h,Wz[0])){case 4:d.push(fB(dB(I(h,4))));break;case 2:d.push(new eB(dB(I(h,2))));break;case 10:d.push(new eB(kf(h,10)));break;case 9:d.push(fB(new eB(kf(h,9))));break;case 3:d.push(fB(I(h,3)));break;case 1:d.push(new eB(h.getString()));break;case 7:d.push(new eB(nf(I(h,7))));break;case 5:d.push(fB(nf(I(h,5))));break;case 12:h=vxa(M(h,Lh,12));if(null===h)return null; d.push(new eB(h));break;case 11:h=vxa(M(h,Lh,11));if(null===h)return null;d.push(fB(h));break;default:return null;}switch(null===(c=a.getOwner())||void 0===c?void 0:ef(c,Rz[0])){case void 0:case 0:case 1:return zxa.apply(gB,ha(d));case 2:return Axa.apply(gB,ha(d));case 15:return null;default:return null;}} ;var eza={firstPartyUri:new kq("https://punctual-dev.corp.google.com"),thirdPartyUri:new kq("https://signaler-staging.sandbox.google.com")},fza=new Map(Object.entries({prod:{firstPartyUri:new kq("https://signaler-pa.clients6.google.com"),thirdPartyUri:new kq("https://signaler-pa.googleapis.com")},ytprod:{firstPartyUri:new kq("https://signaler-pa.youtube.com"),thirdPartyUri:new kq("https://signaler-pa.googleapis.com")},"dev-corp":eza,dev:eza}));var vC=function(){this.projectPath="/punctual/ytprod/youtube_live_chat_web";this.inferProject=!1}; vC.prototype.setAuthUser=function(a){this.authUser=a;return this}; vC.prototype.setOAuthTokens=function(a){this.oauthTokens=a;return this}; vC.prototype.inferProjectForMigrationFromTango=function(){this.inferProject=!0;return this}; vC.prototype.build=function(){if(this.oauthTokens)var a=new iB(this.oauthTokens);else if(this.apiKey)a=new hB(this.apiKey,this.authUser);else throw Error("An API key or OAuth token stream is required");var b=this.projectPath;if(!b.startsWith("/punctual/"))throw Error("Invalid Punctual project path does not start with /punctual/: "+b);var c=b.substring(10).split("/");if(2!==c.length)throw Error("Invalid Punctual path has an incorrect number of parts: "+b);b=k(c);c=b.next().value;b=b.next().value;if(c.startsWith("custom:"))c= new kq(decodeURIComponent(c.substring(7))),c={firstPartyUri:c,thirdPartyUri:c};else{var d=fza.get(c);if(!d)throw Error("Invalid Punctual environment: '"+c+"'");c=d}return Uya(c,a,this.inferProject?void 0:b)};var wC=function(a,b,c){this.maxSize=a;this.items=b;this.flushSeqno=c}; wC.prototype.advance=function(a){if("number"===typeof a)a=this.flushSeqno===a?{state:this.reset(),batch:this.items.slice()}:{state:this};else{var b=a.seqno,c,d=this.items.slice();d.push(a.value);a=d.length>=this.maxSize?{state:this.reset(),batch:d}:{state:new wC(this.maxSize,d,null!==(c=this.flushSeqno)&&void 0!==c?c:b)}}return a}; wC.prototype.reset=function(){return new wC(this.maxSize,[])}; function gza(a,b){return function(c){c=c.pipe(ZB(function(f,h){return{value:f,seqno:h}})); var d=c.pipe(ZB(function(f){return f.seqno}),Dya(b)); return zya(c,d).pipe(Nya(function(f,h){return f.state.advance(h)},{state:new wC(a,[])}),ZB(function(f){return f.batch}),hC(function(f){return void 0!==f}))}} ;var xC=function(){var a=this;this.statusSubscribers=new Set;this.status=new PB(function(b){a.statusSubscribers.add(b);if(4===a.getState())kB(function(){b.complete()});else {var c=a.lastChannelStatus;c&&kB(function(){b.next(c)})}return function(){return a.statusSubscribers.delete(b)}})}; xC.prototype.stop=function(){for(var a={},b=k(this.statusSubscribers),c=b.next();!c.done;a={$jscomp$loop$prop$subscriber$2397:a.$jscomp$loop$prop$subscriber$2397},c=b.next())a.$jscomp$loop$prop$subscriber$2397=c.value,kB(function(d){return function(){d.$jscomp$loop$prop$subscriber$2397.complete()}}(a)); return Promise.resolve()}; xC.prototype.onOpen=function(){if(It(this)){var a=new Iy;a.setCode(0);this.lastChannelStatus=a;yC(this,a)}}; xC.prototype.onError=function(a,b){It(this)&&(a=b.getLastHttpStatusCode(),b=new Iy,b.setCode(Cxa(a)),this.lastChannelStatus=b,yC(this,b))}; xC.prototype.onClose=function(){}; var yC=function(a,b){var c={};a=k(a.statusSubscribers);for(var d=a.next();!d.done;c={$jscomp$loop$prop$subscriber$2399:c.$jscomp$loop$prop$subscriber$2399},d=a.next())c.$jscomp$loop$prop$subscriber$2399=d.value,kB(function(f){return function(){f.$jscomp$loop$prop$subscriber$2399.next(b)}}(c))},It=function(a){return 1===a.getState()||2===a.getState()},hza=function(a){this.authMethod=a};var zC=function(a,b){var c=void 0===c?Dxa:c;this.authMethod=b;this.jspbClient=new lB(a,c)}; zC.prototype.subscribe=function(a){var b=a.getSubscription();sf(b,4,this.authMethod.getSubscriberKind());return this.jspbClient.post("/v1/subscriptions",a,kz,AC(this))}; zC.prototype.unsubscribe=function(a){sf(a,4,this.authMethod.getSubscriberKind());var b=new lz;b.setSubscription(a);return this.jspbClient.post("/v1/deleteSubscriptions",b,mz,AC(this))}; var iza=function(a,b){var c=new ez;b=k(b);for(var d=b.next();!d.done;d=b.next())Lf(c,2,d.value,bz,void 0);return a.jspbClient.post("/v1/acknowledgments",c,fz,AC(a))},AC=function(a){return{queryParams:a.authMethod.getQueryParameters(), extraHeaders:a.authMethod.getHeaders(),withCredentials:a.authMethod.usesCredentialedRequests()}};var BC=function(){this.size=0;this.inner=new Map}; e=BC.prototype;e.clear=function(){this.inner.clear();this.size=this.inner.size}; e.delete=function(a){a=this.inner.delete(JSON.stringify(a));this.size=this.inner.size;return a}; e.forEach=function(a,b){var c=this;void 0!==b&&(a=a.bind(b));this.inner.forEach(function(d,f){f=JSON.parse(f);a(d,f,c)})}; e.get=function(a){return this.inner.get(JSON.stringify(a))}; e.has=function(a){return this.inner.has(JSON.stringify(a))}; e.set=function(a,b){this.inner.set(JSON.stringify(a),b);this.size=this.inner.size;return this}; BC.prototype[Symbol.iterator]=function(){return this.entries()}; BC.prototype.entries=function(){return new CC(this.inner.entries(),function(a){var b=k(a);a=b.next().value;b=b.next().value;return[JSON.parse(a),b]})}; BC.prototype.keys=function(){return new CC(this.inner.keys(),JSON.parse)}; BC.prototype.values=function(){return this.inner.values()}; var CC=function(a,b){this.inner=a;this.mapFunc=b}; CC.prototype[Symbol.iterator]=function(){return this}; CC.prototype.next=function(){var a=this.inner.next(),b=a.value;a=a.done;return{value:a?void 0:this.mapFunc(b),done:a}};var DC=function(a,b,c){this.name=a;this.isPrivateToUser=b;this.legacySource=c}; DC.makePrivateToUser=function(a){return new DC(a,!0)}; DC.makeLegacy=function(a,b){return new DC(b,!1,a)}; DC.prettyPrint=function(a){var b="{";a.legacySource&&(b=b.concat(" legacySource: "+a.legacySource+","));return b=b.concat(" name: \""+encodeURIComponent(a.name)+"\""," "+(a.isPrivateToUser?"(private)":"(public)")+" }")};var jza=new Set([1,2]),kza=new Set([408,429]),lza={callOnce:function(a,b){return aj(a,b)}, clear:function(a){bj(a)}},mza=function(a){this.cancelCallback=a},nza=function(a,b){var c=!1,d=a.callOnce(function(){c||b()},3E4); return new mza(function(){c=!0;a.clear(d)})}; mza.prototype.cancel=function(){this.cancelCallback()}; var EC=function(a,b,c){c=void 0===c?lza:c;xC.call(this);this.doorman=a;this.config=b;this.timer=c;this.logger=new Xr;this.registrations=new BC;this.privatePerUserObjects=new Map;this.state=0;this.delayGenerator=new Vr(500,1024);this.acks=new TB;this.channel=b.channelProvider(this)}; p(EC,xC);EC.prototype.start=function(){var a=this;this.config.authMethod instanceof iB?this.tokenSubscription=this.config.authMethod.oauthTokens.subscribe(function(b){a.setOAuthToken(b)}):this.config.authMethod instanceof jB&&(this.tokenSubscription=this.config.authMethod.appAuthTokens.subscribe(function(b){a.channel.setAppAuthToken(b)})); this.channel.newPostmanSession("tango_web",this).open();this.sendAckBatches=this.acks.pipe(gza(this.config.ackBatchMaxElements,this.config.ackBatchDelayMs)).subscribe(function(b){iza(a.doorman,b).catch(function(c){a.logger.warning("Encountered an error sending acks with acks="+(b+": "+JSON.stringify(c)))})}); this.state=2;return this}; EC.prototype.signalsFor=function(a){var b=this;return a.legacySource?jya(Error("Legacy ObjectIds are not supported by this implementation")):new PB(function(c){var d=b.registrations.get(a);d||(d=new FC(a.isPrivateToUser,function(f){oza(b,a,f)}),b.registrations.set(a,d),4===b.state&&d.terminate()); return pza(d,c)})}; var oza=function(a,b,c){if(It(a)&&a.registrations.get(b)===c)if(0===c.numSubscribers()){if(null==c.deleteSubscriptionTimeout){var d=nza(a.timer,function(){c.deleteSubscriptionTimeout=void 0;Jt(a,c);a.registrations.delete(b);null!=c.fullTopicName&&a.privatePerUserObjects.delete(c.fullTopicName)}); c.deleteSubscriptionTimeout=d}}else c.deleteSubscriptionTimeout&&(c.deleteSubscriptionTimeout.cancel(),c.deleteSubscriptionTimeout=void 0),0===c.state&&null!=a.subscriberInfo&&Dqa(a,c,b,a.subscriberInfo)}; EC.prototype.setOAuthToken=function(a){this.channel.setOAuthToken(a)}; EC.prototype.onSessionError=function(a,b){this.logger.warning("Received session error: "+JSON.stringify(b));a=new Iy;a.setCode(2);a.setMessage(b.description);yC(this,a);b.isTransient&&this.logger.warning("Ignoring transient session error")}; var Fqa=function(a,b){if(It(a)){var c=Lr(b,1),d=Lr(c,1).getTopicName();d=a.privatePerUserObjects.get(d)||new DC(d,!1);if(d=a.registrations.get(d)){c=c.getMessage();var f=Lr(c,3);f=dB?dB(f):new TA(Number(f),Number(f)/4294967296);var h=Jr(c,1)?c.getData():void 0,l=Jr(c,2)?Lr(c,2):void 0;c=Mr(c,4);c={version:f,payload:h,traceId:l,isSynthetic:!1,isSuppressor:c};qza(d,c);d=k(d.subscribers);for(f=d.next();!f.done;f=d.next())f.value.next(c)}else a.logger.warning("Acking and dropping signal on object with no listeners"), null==a.subscriberInfo?a.logger.warning("Got signal for unregistered object before receiving subscriber info"):(a.logger.warning("Attempting to unsubscribe from unknown object for which we received an invalidation"),c=Lr(Lr(b,1),1),d=new gz,d.setTopicName(c.getTopicName()),sf(d,3,a.subscriberInfo),sf(d,4,a.config.authMethod.getSubscriberKind()),c=c.getName(),sf(d,5,c),a.unsubscribe(d));b=Lr(b,3);d=new Date().getTime();c=new bz;c.setId(b);sf(c,2,1E3*d);a.acks.next(c)}},Dqa=function(a,b,c,d){b.state= 1; var f=rza();b.subscriptionName=f;var h=new gz;h.setTopicName(c.name);sf(h,3,d);sf(h,5,f);sf(h,4,a.config.authMethod.getSubscriberKind());var l=new jz;l.setSubscription(h);sf(l,2,b.isPrivateToUser);var m=new Promise(function(n,r){sza(a,function(){return a.doorman.subscribe(l)},function(v){var z=h.clone(); K(v,2)&&(b.fullTopicName=I(v,2),z.setTopicName(b.fullTopicName));n(z);if(b.subscriptionName!==f||a.registrations.get(c)!==b)a.logger.warning("Received outdated subscribe response");else if(2===b.state)a.logger.warning("Received duplicate subscribe response");else{K(v,2)&&a.privatePerUserObjects.set(I(v,2),c);b.state=2;v=I(v,1);v={version:dB(v),isSynthetic:!0,isSuppressor:!0};qza(b,v);z=k(b.subscribers);for(var C=z.next();!C.done;C=z.next())C.value.next(v)}},function(v){r(v)},function(){return a.subscriberInfo=== d&&0a.length;)a.push(Math.floor(256*Math.random()));return Le(a)} var FC=function(a,b){this.isPrivateToUser=a;this.numSubscribersChangedCallback=b;this.state=0;this.subscribers=new Set}; FC.prototype.numSubscribers=function(){return this.subscribers.size}; var pza=function(a,b){if(3===a.state)return b.complete(),function(){}; a.subscribers.add(b);null!=a.latestSignal&&b.next(a.latestSignal);a.numSubscribersChangedCallback(a);return function(){a.subscribers.delete(b);a.numSubscribersChangedCallback(a)}},qza=function(a,b){if(null==a.latestSignal||0=a.status&&!kza.has(a.status)} ;var GC=function(){this.domainType=0},xza=function(a){return wza(a,a.getChannelUriForDomain(a.domainType))},yza=function(a){return wza(a,a.getDoormanUriForDomain(a.domainType))},wza=function(a,b){a.scheme&&b.setScheme(a.scheme); return b},HC=function(){GC.apply(this,arguments)}; p(HC,GC);HC.prototype.getChannelUriForDomain=function(a){switch(a){case 0:case 1:return new kq("https://client-channel.google.com/client-channel/client");case 2:return new kq("https://client-channel.youtube.com/client-channel/client");default:return new kq;}}; HC.prototype.getDoormanUriForDomain=function(a){switch(a){case 0:return new kq("https://signaler-pa.clients6.google.com");case 1:return new kq("https://signaler-pa.googleapis.com");case 2:return new kq("https://signaler-pa.youtube.com");default:return new kq;}}; var IC=function(){GC.apply(this,arguments)}; p(IC,GC);IC.prototype.getChannelUriForDomain=function(){return new kq("https://client-channel.sandbox.google.com/client-channel/client")}; IC.prototype.getDoormanUriForDomain=function(){return new kq("https://signaler-staging.sandbox.google.com")}; var JC=function(a,b){this.domainType=0;this.channelUri=a;this.doormanUri=b}; p(JC,GC);JC.prototype.getChannelUriForDomain=function(){return this.channelUri}; JC.prototype.getDoormanUriForDomain=function(){return this.doormanUri}; var KC=function(a,b){this.lcsClientType=a;this.environment=b;this.useSharedChannel=!1}; KC.forLocalEnv=function(a,b,c){b=new kq(b);c=new kq(c);return new KC(a,new JC(b,c))}; KC.forStagingEnv=function(a){return new KC(a,new IC())}; KC.forProdEnv=function(a){return new KC(a,new HC())}; KC.forYouTubeProd=function(a){var b=new HC;b.domainType=2;return new KC(a,b)}; e=KC.prototype;e.enableChannelSharing=function(){this.useSharedChannel=!0;return this}; e.withLegacyTangoChannel=function(a){this.channelProvider=function(b){a.setChannelHandler(b);return a.getRawChannel()}; return this}; e.withAuthUser=function(a){this.authUser=a;return this}; e.withApiKey=function(a){this.apiKey=a;return this}; e.withOAuthTokens=function(a){this.environment.domainType=1;this.oauthTokens=a;return this}; e.withAppAuthTokens=function(a){this.environment.domainType=1;this.appAuthTokens=a;this.oauthTokens=void 0;return this}; e.withPageId=function(a){this.pageId=a;return this}; e.withPlainHttpForTest=function(){this.environment.scheme="http";return this}; e.build=function(){var a=zza;var b=xza(this.environment).toString();b=new Dt(b,this.lcsClientType,"lcsclient");return a(this,b)}; e.buildWithoutIframe=function(){var a=xza(this.environment);a.setPath("/client-channel/channel");return zza(this,new dt(a.toString(),this.lcsClientType))}; var zza=function(a,b){if(a.oauthTokens)var c=new iB(a.oauthTokens,a.pageId);else{if(!a.apiKey)throw Error("An API key is required");c=a.appAuthTokens?new jB(a.apiKey,a.appAuthTokens):new hB(a.apiKey,a.authUser,a.pageId)}var d=yza(a.environment);a.channelProvider||(c instanceof hB&&b.setUseSharedChannel(a.useSharedChannel),a.pageId&&b.setPageId(a.pageId),a.authUser&&b.setAuthuser(a.authUser),a.channelProvider=function(f){f=!b.pageId&&t.SharedWorker&&b.isIframed()&&b.useSharedChannel?new Kt(f,b):new Eqa(f, b);f.open();return f}); return new uza(c,a.channelProvider,d,250,20)};var LC=function(a){var b=void 0===b?{}:b;this.punctualClient=a;this.watchOpts=b;this.status=a.status}; LC.prototype.start=function(){return{stop:function(){return Promise.resolve()}}}; LC.prototype.signalsFor=function(a){a=a.isPrivateToUser?Axa(a.name):zxa(a.name);return this.punctualClient.watch(new Bxa(a),this.watchOpts).pipe(hC(function(b){return!(b instanceof qxa)}),ZB(function(b){if(b instanceof LA){var c=1===b.objectId.parts.length,d=b.payload&&Jca(b.payload); return{version:b.version,payload:d,isSynthetic:!1,isSuppressor:c}}return{isSynthetic:!0,isSuppressor:!0}}),Pya())};/* gapi.loader.OBJECT_CREATE_TEST_OVERRIDE &&*/ var MC=window,NC=document,Aza=MC.location,Bza=function(){},Cza=/\[native code\]/,OC=function(a,b,c){return a[b]=a[b]||c},Dza=function(a){a=a.sort(); for(var b=[],c=void 0,d=0;dh}h&&c.push(f)}return c},aAa=function(){var a=RC.nonce; return void 0!==a?a&&a===String(a)&&a.match(Zza)?a:RC.nonce=null:NC.querySelector?(a=NC.querySelector("script[nonce]"))?(a=a.nonce||a.getAttribute("nonce")||"",a&&a===String(a)&&a.match(Zza)?RC.nonce=a:RC.nonce=null):null:null},cAa=function(a){if("loading"!=NC.readyState)bAa(a);else {var b=aAa(),c="";null!==b&&(c=" nonce=\""+b+"\"");a="<"+ZC+" src=\""+encodeURI(a)+"\""+c+">";NC.write($C?$C.createHTML(a):a)}},bAa=function(a){var b=NC.createElement(ZC); b.setAttribute("src",$C?$C.createScriptURL(a):a);a=aAa();null!==a&&b.setAttribute("nonce",a);b.async="true";(a=NC.getElementsByTagName(ZC)[0])?a.parentNode.insertBefore(b,a):(NC.head||NC.body||NC.documentElement).appendChild(b)},dAa=function(a,b){var c=b&&b._c; if(c)for(var d=0;d=f.right)&&(h&=-2);132==(h&132)&&(d.y=f.bottom)&&(h&=-5);d.xf.right&&(m.width=Math.min(f.right- d.x,r+m.width-f.left),m.width=Math.max(m.width,0),n|=4)}d.x+m.width>f.right&&h&1&&(d.x=Math.max(f.right-m.width,f.left),n|=1);h&2&&(n|=(d.xf.right?32:0));d.yf.bottom&&(m.height=Math.min(f.bottom-d.y,r+m.height-f.top),m.height=Math.max(m.height,0),n|=8));d.y+m.height>f.bottom&&h&4&&(d.y=Math.max(f.bottom-m.height,f.top),n|=2);h&8&&(n|=(d.yf.bottom?128:0));f=n}else f= 256;n=f}f=new Vg(0,0,0,0);f.left=a.x;f.top=a.y;f.width=l.width;f.height=l.height;n&496||(wh(b,new Vf(f.left,f.top)),l=new Xf(f.width,f.height),c==l||c&&l&&c.width==l.width&&c.height==l.height||(c=l,l=hg($f(Zf(b)).document_),!se||Ee("10")||l&&Ee("8")?(b=b.style,ve?b.MozBoxSizing="border-box":we?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(c.width,0)+"px",b.height=Math.max(c.height,0)+"px"):(f=b.style,l?(l=Gh(b,"padding"),b=Ih(b),f.pixelWidth=c.width-b.left-l.left-l.right- b.right,f.pixelHeight=c.height-b.top-l.top-l.bottom-b.bottom):(f.pixelWidth=c.width,f.pixelHeight=c.height))))},vD=function(a,b){return(b&8&&Eh(a)?b^4:b)&-9};var wD=function(){}; Ma(wD);wD.prototype.nextId_=0;wD.prototype.idPrefix_="";wD.prototype.setIdPrefix=function(a){this.idPrefix_=a};var xD=function(a){Ci.call(this);this.dom_=a||$f();this.rightToLeft_=gBa;this.id_=null;this.inDocument_=!1;this.element_=null;this.googUiComponentHandler_=void 0;this.childIndex_=this.children_=this.parent_=this.model_=null;this.pointerEventsEnabled_=this.wasDecorated_=!1}; u(xD,Ci);xD.prototype.idGenerator_=wD.getInstance();var gBa=null;e=xD.prototype;e.getId=function(){var a;(a=this.id_)||(a=this.idGenerator_,a=this.id_=a.idPrefix_+":"+(a.nextId_++).toString(36));return a}; e.setId=function(a){this.parent_&&this.parent_.childIndex_&&(y.remove(this.parent_.childIndex_,this.id_),y.add(this.parent_.childIndex_,a,this));this.id_=a}; e.getElement=function(){return this.element_}; e.getElementsByClass=function(a){return this.element_?this.dom_.getElementsByClass(a,this.element_):[]}; e.getElementByClass=function(a){return this.element_?this.dom_.getElementByClass(a,this.element_):null}; e.getRequiredElementByClass=function(a){return this.getElementByClass(a)}; e.getHandler=function(){this.googUiComponentHandler_||(this.googUiComponentHandler_=new Pq(this));return this.googUiComponentHandler_}; e.setParent=function(a){if(this==a)throw Error("Unable to set parent component");var b;if(b=a&&this.parent_&&this.id_){b=this.parent_;var c=this.id_;b=b.childIndex_&&c?y.get(b.childIndex_,c)||null:null}if(b&&this.parent_!=a)throw Error("Unable to set parent component");this.parent_=a;xD.superClass_.setParentEventTarget.call(this,a)}; e.getParent=function(){return this.parent_}; e.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)throw Error("Method not supported");xD.superClass_.setParentEventTarget.call(this,a)}; e.getDomHelper=function(){return this.dom_}; e.createDom=function(){this.element_=this.dom_.createElement("DIV")}; e.render=function(a){yD(this,a)}; e.renderBefore=function(a){yD(this,a.parentNode,a)}; var yD=function(a,b,c){if(a.inDocument_)throw Error("Component already rendered");a.element_||a.createDom();b?b.insertBefore(a.element_,c||null):a.dom_.getDocument().body.appendChild(a.element_);a.parent_&&!a.parent_.inDocument_||a.enterDocument()}; e=xD.prototype;e.decorate=function(a){if(this.inDocument_)throw Error("Component already rendered");if(a&&this.canDecorate(a)){this.wasDecorated_=!0;var b=Zf(a);this.dom_&&this.dom_.getDocument()==b||(this.dom_=$f(a));this.decorateInternal(a);this.enterDocument()}else throw Error("Invalid element to decorate")}; e.canDecorate=function(){return!0}; e.wasDecorated=function(){return this.wasDecorated_}; e.decorateInternal=function(a){this.element_=a}; e.enterDocument=function(){this.inDocument_=!0;zD(this,function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})}; e.exitDocument=function(){zD(this,function(a){a.inDocument_&&a.exitDocument()}); this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=!1}; e.disposeInternal=function(){this.inDocument_&&this.exitDocument();this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_);zD(this,function(a){a.dispose()}); !this.wasDecorated_&&this.element_&&sg(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null;xD.superClass_.disposeInternal.call(this)}; e.makeIds=function(a){var b={},c;for(c in a){var d=c;var f=a[c];f=this.getId()+"."+f;b[d]=f}return b}; e.getModel=function(){return this.model_}; e.setModel=function(a){this.model_=a}; e.getFragmentFromId=function(a){return a.substring(this.getId().length+1)}; e.getElementByFragment=function(a){if(!this.inDocument_)throw Error("Operation not supported while component is not in document");var b=this.dom_,c=b.getElement;a=this.getId()+"."+a;return c.call(b,a)}; e.addChild=function(a,b){var c=this.children_?this.children_.length:0;if(a.inDocument_&&(b||!this.inDocument_))throw Error("Component already rendered");if(0>c||c>(this.children_?this.children_.length:0))throw Error("Child component index out of bounds");this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]);a.getParent()==this?(y.set(this.childIndex_,a.getId(),a),ob(this.children_,a)):y.add(this.childIndex_,a.getId(),a);a.setParent(this);sb(this.children_,c,0,a);a.inDocument_&& this.inDocument_&&a.getParent()==this?(b=this.getContentElement(),(b.childNodes[c]||null)!=a.getElement()&&(a.getElement().parentElement==b&&b.removeChild(a.getElement()),c=b.childNodes[c]||null,b.insertBefore(a.getElement(),c))):b?(this.element_||this.createDom(),c=this.children_?this.children_[c+1]||null:null,yD(a,this.getContentElement(),c?c.element_:null)):this.inDocument_&&!a.inDocument_&&a.element_&&a.element_.parentNode&&1==a.element_.parentNode.nodeType&&a.enterDocument()}; e.getContentElement=function(){return this.element_}; e.isRightToLeft=function(){null==this.rightToLeft_&&(this.rightToLeft_=Eh(this.inDocument_?this.element_:this.dom_.getDocument().body));return this.rightToLeft_}; e.setRightToLeft=function(a){if(this.inDocument_)throw Error("Component already rendered");this.rightToLeft_=a}; e.getChildIds=function(){var a=[];zD(this,function(b){a.push(b.getId())}); return a}; var zD=function(a,b){a.children_&&eb(a.children_,b,void 0)}; e=xD.prototype;e.indexOfChild=function(a){return this.children_&&a?db(this.children_,a):-1}; e.removeChild=function(a,b){if(a){var c="string"===typeof a?a:a.getId();a=this.childIndex_&&c?y.get(this.childIndex_,c)||null:null;c&&a&&(y.remove(this.childIndex_,c),ob(this.children_,a),b&&(a.exitDocument(),a.element_&&sg(a.element_)),a.setParent(null))}if(!a)throw Error("Child is not in parent component");return a}; e.removeChildren=function(a){for(var b=[];this.children_&&0!=this.children_.length;){var c=b,d=c.push;var f=this.removeChild(this.children_?this.children_[0]||null:null,a);d.call(c,f)}return b}; e.pointerEventsEnabled=function(){return this.pointerEventsEnabled_}; e.setPointerEventsEnabled=function(a){if(this.inDocument_)throw Error("Component already rendered");this.pointerEventsEnabled_=a};var AD=function(a){xD.call(this,a)}; u(AD,xD);AD.prototype.createDom=function(){var a=this.getDomHelper(),b=a.createDom("DIV");this.element_=b;var c=a.createDom("DIV","picker-min-arrow-inner"),d=a.createDom("DIV","picker-min-arrow-border");a.appendChild(b,c);a.appendChild(b,d)}; var hBa=function(a,b,c){a=a.getElement();rh(a,"left","");rh(a,"right","");nj(b,"picker-min-top");nj(b,"picker-min-bottom");c=vD(b,c);c&1?(jj(a,"picker-min-arrow-down"),lj(b,"picker-min-bottom")):(jj(a,"picker-min-arrow-up"),lj(b,"picker-min-top"))}; AD.prototype.update=function(a,b,c){this.inDocument_&&(c||(c=new Tg(0,0,0,0)),hBa(this,a,b),a=this.getElement(),b&4?rh(a,"right",-c.right+"px"):rh(a,"left",-c.left+"px"))};function BD(a,b){nD.call(this,"set-drive-options");this.appId=a;this.appOrigin=b} u(BD,nD);var CD=function(a){nD.call(this,"visibility");this.visible=a}; u(CD,nD);var DD;var ED=function(a,b){b?a.setAttribute("role",b):a.removeAttribute("role")},FD=function(a,b,c){Array.isArray(c)&&(c=c.join(" ")); var d="aria-"+b;""===c||void 0==c?(DD||(DD=y.create("atomic",!1,"autocomplete","none","dropeffect","none","haspopup",!1,"live","off","multiline",!1,"multiselectable",!1,"orientation","vertical","readonly",!1,"relevant","additions text","required",!1,"sort","none","busy",!1,"disabled",!1,"hidden",!1,"invalid","false")),c=DD,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)};var jBa=function(a){if(a.altKey&&!a.ctrlKey||a.metaKey||112<=a.keyCode&&123>=a.keyCode)return!1;if(iBa(a.keyCode))return!0;switch(a.keyCode){case 18:case 20:case 93:case 17:case 40:case 35:case 27:case 36:case 45:case 37:case 224:case 91:case 144:case 12:case 34:case 33:case 19:case 255:case 44:case 39:case 145:case 16:case 38:case 252:case 224:case 92:return!1;case 0:return!ve;default:return 166>a.keyCode||183=a||96<=a&&106>=a||65<=a&&90>=a||(we||te)&&0== a)return!0; switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:case 58:return!0;case 173:return ve;default:return!1;}},kBa=function(a){switch(a){case 61:return 187; case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a;}},lBa=function(a){switch(a){case 93:return 91; default:return a;}};var GD=function(a,b,c){Ci.call(this);this.target=a;this.handle=b||a;this.limits=c||new Vg(NaN,NaN,NaN,NaN);this.document_=Zf(a);this.eventHandler_=new Pq(this);Sg(this,this.eventHandler_);this.deltaY=this.deltaX=this.startY=this.startX=this.screenY=this.screenX=this.clientY=this.clientX=0;this.enabled_=!0;this.dragging_=!1;this.preventMouseDown_=!0;this.hysteresisDistanceSquared_=0;this.useRightPositioningForRtl_=this.ieDragStartCancellingOn_=!1;vi(this.handle,["touchstart","mousedown"],this.startDrag, !1,this);this.useSetCapture_=mBa}; u(GD,Ci);var mBa=t.document&&t.document.documentElement&&!!t.document.documentElement.setCapture&&!!t.document.releaseCapture;e=GD.prototype;e.setAllowSetCapture=function(a){this.useSetCapture_=a&&mBa}; e.enableRightPositioningForRtl=function(a){this.useRightPositioningForRtl_=a}; e.getHandler=function(){return this.eventHandler_}; e.setHysteresis=function(a){this.hysteresisDistanceSquared_=Math.pow(a,2)}; e.getHysteresis=function(){return Math.sqrt(this.hysteresisDistanceSquared_)}; e.setCancelIeDragStart=function(a){this.ieDragStartCancellingOn_=a}; e.getEnabled=function(){return this.enabled_}; e.setPreventMouseDown=function(a){this.preventMouseDown_=a}; e.disposeInternal=function(){GD.superClass_.disposeInternal.call(this);zi(this.handle,["touchstart","mousedown"],this.startDrag,!1,this);this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.handle=this.target=null}; var nBa=function(a){void 0===a.rightToLeft_&&(a.rightToLeft_=Eh(a.target));return a.rightToLeft_}; GD.prototype.startDrag=function(a){var b="mousedown"==a.type;if(!this.enabled_||this.dragging_||b&&(!(qfa?0==a.event_.button:"click"==a.type||a.event_.button&xfa[0])||xe&&a.ctrlKey))this.dispatchEvent("earlycancel");else{if(0==this.hysteresisDistanceSquared_){if(this.dispatchEvent(new HD("start",this,a.clientX,a.clientY,a)))this.dragging_=!0,this.preventMouseDown_&&b&&a.preventDefault();else return;}else this.preventMouseDown_&&b&&a.preventDefault();b=this.document_;var c=b.documentElement,d=!this.useSetCapture_; this.eventHandler_.listen(b,["touchmove","mousemove"],this.handleMove_,{capture:d,passive:!1});this.eventHandler_.listen(b,["touchend","mouseup"],this.endDrag,d);this.useSetCapture_?(c.setCapture(!1),this.eventHandler_.listen(c,"losecapture",this.endDrag)):this.eventHandler_.listen(kg(b),"blur",this.endDrag);se&&this.ieDragStartCancellingOn_&&this.eventHandler_.listen(b,"dragstart",pfa);this.scrollTarget_&&this.eventHandler_.listen(this.scrollTarget_,"scroll",this.onScroll_,d);this.clientX=this.startX= a.clientX;this.clientY=this.startY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;this.deltaX=this.useRightPositioningForRtl_?eBa(this.target):this.target.offsetLeft;this.deltaY=this.target.offsetTop;this.pageScroll=jg($f(this.document_).document_)}}; GD.prototype.endDrag=function(a,b){this.eventHandler_.removeAll();this.useSetCapture_&&this.document_.releaseCapture();this.dragging_?(this.dragging_=!1,this.dispatchEvent(new HD("end",this,a.clientX,a.clientY,a,ID(this,this.deltaX),JD(this,this.deltaY),b||"touchcancel"==a.type))):this.dispatchEvent("earlycancel")}; GD.prototype.endDragCancel=function(a){this.endDrag(a,!0)}; GD.prototype.handleMove_=function(a){if(this.enabled_){var b=(this.useRightPositioningForRtl_&&nBa(this)?-1:1)*(a.clientX-this.clientX),c=a.clientY-this.clientY;this.clientX=a.clientX;this.clientY=a.clientY;this.screenX=a.screenX;this.screenY=a.screenY;if(!this.dragging_){var d=this.startX-this.clientX,f=this.startY-this.clientY;if(d*d+f*f>this.hysteresisDistanceSquared_)if(this.dispatchEvent(new HD("start",this,a.clientX,a.clientY,a)))this.dragging_=!0;else{this.isDisposed()||this.endDrag(a);return}}c= oBa(this,b,c);b=c.x;c=c.y;this.dragging_&&this.dispatchEvent(new HD("beforedrag",this,a.clientX,a.clientY,a,b,c))&&(pBa(this,a,b,c),a.preventDefault())}}; var oBa=function(a,b,c){var d=jg($f(a.document_).document_);b+=d.x-a.pageScroll.x;c+=d.y-a.pageScroll.y;a.pageScroll=d;a.deltaX+=b;a.deltaY+=c;return new Vf(ID(a,a.deltaX),JD(a,a.deltaY))}; GD.prototype.onScroll_=function(a){var b=oBa(this,0,0);a.clientX=this.clientX;a.clientY=this.clientY;pBa(this,a,b.x,b.y)}; var pBa=function(a,b,c,d){a.useRightPositioningForRtl_&&nBa(a)?a.target.style.right=c+"px":a.target.style.left=c+"px";a.target.style.top=d+"px";a.dispatchEvent(new HD("drag",a,b.clientX,b.clientY,b,c,d))},ID=function(a,b){var c=a.limits; a=isNaN(c.left)?null:c.left;c=isNaN(c.width)?0:c.width;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))},JD=function(a,b){var c=a.limits; a=isNaN(c.top)?null:c.top;c=isNaN(c.height)?0:c.height;return Math.min(null!=a?a+c:Infinity,Math.max(null!=a?a:-Infinity,b))}; GD.prototype.isDragging=function(){return this.dragging_}; var HD=function(a,b,c,d,f,h,l,m){li.call(this,a);this.clientX=c;this.clientY=d;this.browserEvent=f;this.left=void 0!==h?h:b.deltaX;this.top=void 0!==l?l:b.deltaY;this.dragger=b;this.dragCanceled=!!m}; u(HD,li);var KD=function(a){this.map_=new Map;var b=arguments.length;if(1Xa()-this.lastHideTime_}; e.setVisible=function(a){this.showTransition_&&this.showTransition_.stop();this.hideTransition_&&this.hideTransition_.stop();a?this.show_():this.hide_()}; e.reposition=La; e.show_=function(){if(!this.isVisible_&&this.dispatchEvent("beforeshow")){if(!this.element_)throw Error("Caller must call setElement before trying to show the popup");this.reposition();var a=Zf(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,!0);if(this.autoHide_)if(this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0),se){try{var b=a.activeElement}catch(d){}for(;b&&"IFRAME"==b.nodeName;){try{var c=Ag(b)}catch(d){break}a=c;b=a.activeElement}this.handler_.listen(a,"mousedown", this.onDocumentMouseDown_,!0);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_);"toggle_display"==this.type_?xBa(this):"move_offscreen"==this.type_&&this.reposition();this.isVisible_=!0;this.lastShowTime_=Xa();this.lastHideTime_=-1;if(this.showTransition_)ui(this.showTransition_,"end",this.onShow,!1,this),this.showTransition_.play();else this.onShow()}}; e.hide_=function(a){if(!this.isVisible_||!this.dispatchEvent({type:"beforehide",target:a}))return!1;this.handler_&&this.handler_.removeAll();this.isVisible_=!1;this.lastHideTime_=Xa();this.hideTransition_?(ui(this.hideTransition_,"end",Va(this.continueHidingPopup_,a),!1,this),this.hideTransition_.play()):this.continueHidingPopup_(a);return!0}; e.continueHidingPopup_=function(a){"toggle_display"==this.type_?this.shouldHideAsync_?aj(this.hidePopupElement,0,this):this.hidePopupElement():"move_offscreen"==this.type_&&(this.element_.style.top="-10000px");this.onHide(a)}; var xBa=function(a){a.element_.style.visibility="visible";Dh(a.element_,!0)}; e=PD.prototype;e.hidePopupElement=function(){this.element_.style.visibility="hidden";Dh(this.element_,!1)}; e.onShow=function(){this.dispatchEvent("show")}; e.onHide=function(a){this.dispatchEvent({type:"hide",target:a})}; e.onDocumentMouseDown_=function(a){a=a.target;yg(this.element_,a)||QD(this,a)||this.autoHideRegion_&&!yg(this.autoHideRegion_,a)||150>Xa()-this.lastShowTime_||this.hide_(a)}; e.onDocumentKeyDown_=function(a){27==a.keyCode&&this.hide_(a.target)&&(a.preventDefault(),a.stopPropagation())}; e.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=Zf(this.element_);if("undefined"!=typeof document.activeElement){if(a=b.activeElement,!a||yg(this.element_,a)||"BODY"==a.tagName||QD(this,a))return}else if(a.target!=b)return;150>Xa()-this.lastShowTime_||this.hide_()}}; var QD=function(a,b){return jb(a.autoHidePartners_||[],function(c){return b===c||yg(c,b)})}; PD.prototype.disposeInternal=function(){PD.superClass_.disposeInternal.call(this);this.handler_.dispose();Qg(this.showTransition_);Qg(this.hideTransition_);delete this.element_;delete this.handler_;delete this.autoHidePartners_};var RD=function(a,b){xD.call(this,b);this.useIframeMask_=!!a;this.lastFocus_=null;this.resizeBackgroundTask_=tBa({mutate:this.resizeBackground_},this)}; u(RD,xD);e=RD.prototype;e.focusHandler_=null;e.visible_=!1;e.bgEl_=null;e.bgIframeEl_=null;e.tabCatcherElement_=null;e.backwardTabWrapInProgress_=!1;e.getCssClass=function(){return"goog-modalpopup"}; e.getBackgroundElement=function(){return this.bgEl_}; e.createDom=function(){RD.superClass_.createDom.call(this);var a=this.getElement(),b=Qb(this.getCssClass()).split(" ");mj(a,b);Gg(a,!0);Dh(a,!1);yBa(this);zBa(this)}; var yBa=function(a){if(a.useIframeMask_&&!a.bgIframeEl_){var b=a.getDomHelper().createDom("IFRAME",{frameborder:0,style:"border:0;vertical-align:bottom;"});xc(b,uBa);a.bgIframeEl_=b;a.bgIframeEl_.className=a.getCssClass()+"-bg";Dh(a.bgIframeEl_,!1);Gea(a.bgIframeEl_,0)}a.bgEl_||(a.bgEl_=a.getDomHelper().createDom("DIV",a.getCssClass()+"-bg"),Dh(a.bgEl_,!1))},zBa=function(a){a.tabCatcherElement_||(a.tabCatcherElement_=a.getDomHelper().createElement("SPAN"),Dh(a.tabCatcherElement_,!1),Gg(a.tabCatcherElement_, !0),a.tabCatcherElement_.style.position="absolute")}; e=RD.prototype;e.resetBackwardTabWrap_=function(){this.backwardTabWrapInProgress_=!1}; e.canDecorate=function(a){return!!a&&"DIV"==a.tagName}; e.decorateInternal=function(a){RD.superClass_.decorateInternal.call(this,a);a=Qb(this.getCssClass()).split(" ");mj(this.getElement(),a);yBa(this);zBa(this);Gg(this.getElement(),!0);Dh(this.getElement(),!1)}; e.enterDocument=function(){this.bgIframeEl_&&qg(this.bgIframeEl_,this.getElement());qg(this.bgEl_,this.getElement());RD.superClass_.enterDocument.call(this);rg(this.tabCatcherElement_,this.getElement());this.focusHandler_=new ND(this.getDomHelper().getDocument());this.getHandler().listen(this.focusHandler_,"focusin",this.onFocus);SD(this,!1)}; e.exitDocument=function(){this.isVisible()&&this.setVisible(!1);Qg(this.focusHandler_);RD.superClass_.exitDocument.call(this);sg(this.bgIframeEl_);sg(this.bgEl_);sg(this.tabCatcherElement_)}; e.setVisible=function(a){a!=this.visible_&&(this.popupShowTransition_&&this.popupShowTransition_.stop(),this.bgShowTransition_&&this.bgShowTransition_.stop(),this.popupHideTransition_&&this.popupHideTransition_.stop(),this.bgHideTransition_&&this.bgHideTransition_.stop(),this.inDocument_&&SD(this,a),a?this.show_():this.hide_())}; var SD=function(a,b){a.modalAriaVisibilityHelper_||(a.modalAriaVisibilityHelper_=new wBa(a.element_,a.dom_));a=a.modalAriaVisibilityHelper_;if(b){a.hiddenElements_||(a.hiddenElements_=[]);b=a.dom_.getChildren(a.dom_.getDocument().body);for(var c=0;c"),a.getDirection()));this.content_=a;this.contentEl_&&tc(this.contentEl_,a)}; e.getContent=function(){return null!=this.content_?pc(this.content_):""}; e.getSafeHtmlContent=function(){return this.content_}; e.setPreferredAriaRole=function(a){this.preferredAriaRole_=a}; e.isAriaDescribedByContent=function(){return this.isAriaDescribedByContent_}; e.setIsAriaDescribedByContent=function(a){this.isAriaDescribedByContent_=a}; var XD=function(a){a.getElement()||a.render()}; e=WD.prototype;e.getContentElement=function(){XD(this);return this.contentEl_}; e.getTitleElement=function(){XD(this);return this.titleEl_}; e.getTitleTextElement=function(){XD(this);return this.titleTextEl_}; e.getTitleCloseElement=function(){XD(this);return this.titleCloseEl_}; e.getDialogCloseMessage=function(){return"Close"}; e.getButtonElement=function(){XD(this);return this.buttonEl_}; var BBa=function(a){XD(a);return a.getElement()}; WD.prototype.getBackgroundElement=function(){XD(this);return WD.superClass_.getBackgroundElement.call(this)}; WD.prototype.getBackgroundElementOpacity=function(){return this.backgroundElementOpacity_}; var CBa=function(a,b){a.backgroundElementOpacity_=b;a.getElement()&&(b=a.getBackgroundElement())&&Gea(b,a.backgroundElementOpacity_)}; WD.prototype.setModal=function(a){a!=this.modal_&&DBa(this,a)}; var DBa=function(a,b){a.modal_=b;if(a.inDocument_){var c=a.getDomHelper(),d=a.getBackgroundElement(),f=a.bgIframeEl_;b?(f&&c.insertSiblingBefore(f,a.getElement()),c.insertSiblingBefore(d,a.getElement())):(c.removeNode(f),c.removeNode(d))}a.isVisible()&&SD(a,b)}; WD.prototype.getModal=function(){return this.modal_}; WD.prototype.getClass=function(){return this.getCssClass()}; WD.prototype.setDraggable=function(a){this.draggable_=a;YD(this,a&&this.inDocument_)}; WD.prototype.getDraggable=function(){return this.draggable_}; var YD=function(a,b){var c=Qb(a.class_+"-title-draggable").split(" ");a.getElement()&&(b?mj(a.titleEl_,c):oj(a.titleEl_,c));b&&!a.dragger_?(b=new GD(a.getElement(),a.titleEl_),a.dragger_=b,mj(a.titleEl_,c),vi(a.dragger_,"start",a.setDraggerLimits_,!1,a)):!b&&a.dragger_&&(a.dragger_.dispose(),a.dragger_=null)}; e=WD.prototype; e.createDom=function(){WD.superClass_.createDom.call(this);var a=this.getElement(),b=this.getDomHelper();this.titleTextId_=this.getId();var c=this.getId()+".contentEl";this.titleEl_=b.createDom("DIV",this.class_+"-title",this.titleTextEl_=b.createDom("SPAN",{className:this.class_+"-title-text",id:this.titleTextId_},this.title_),this.titleCloseEl_=b.createDom("SPAN",this.class_+"-title-close"));Jda(a,this.titleEl_,this.contentEl_=b.createDom("DIV",{className:this.class_+"-content",id:c}),this.buttonEl_= b.createDom("DIV",this.class_+"-buttons"));ED(this.titleTextEl_,"heading");ED(this.titleCloseEl_,"button");Gg(this.titleCloseEl_,!0);FD(this.titleCloseEl_,"label","Close");ED(a,this.preferredAriaRole_);FD(a,"labelledby",this.titleTextId_||"");this.content_&&(tc(this.contentEl_,this.content_),this.isAriaDescribedByContent_&&c&&FD(a,"describedby",c));Dh(this.titleCloseEl_,this.hasTitleCloseButton_);this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render());Dh(this.buttonEl_,!!this.buttons_); CBa(this,this.backgroundElementOpacity_)}; e.decorateInternal=function(a){WD.superClass_.decorateInternal.call(this,a);a=this.getElement();var b=this.class_+"-content";this.contentEl_=cg(document,null,b,a)[0];this.contentEl_||(this.contentEl_=this.getDomHelper().createDom("DIV",b),this.content_&&tc(this.contentEl_,this.content_),a.appendChild(this.contentEl_));b=this.class_+"-title";var c=this.class_+"-title-text",d=this.class_+"-title-close";(this.titleEl_=cg(document,null,b,a)[0])?(this.titleTextEl_=cg(document,null,c,this.titleEl_)[0], this.titleCloseEl_=cg(document,null,d,this.titleEl_)[0]):(this.titleEl_=this.getDomHelper().createDom("DIV",b),a.insertBefore(this.titleEl_,this.contentEl_));this.titleTextEl_?(this.title_=Ig(this.titleTextEl_),this.titleTextEl_.id||(this.titleTextEl_.id=this.getId())):(this.titleTextEl_=lg("SPAN",{className:c,id:this.getId()}),this.titleEl_.appendChild(this.titleTextEl_));this.titleTextId_=this.titleTextEl_.id;FD(a,"labelledby",this.titleTextId_||"");this.titleCloseEl_||(this.titleCloseEl_=this.getDomHelper().createDom("SPAN", d),this.titleEl_.appendChild(this.titleCloseEl_));Dh(this.titleCloseEl_,this.hasTitleCloseButton_);b=this.class_+"-buttons";(this.buttonEl_=cg(document,null,b,a)[0])?(this.buttons_=new TD(this.getDomHelper()),this.buttons_.decorate(this.buttonEl_)):(this.buttonEl_=this.getDomHelper().createDom("DIV",b),a.appendChild(this.buttonEl_),this.buttons_&&(a=this.buttons_,a.element_=this.buttonEl_,a.render()),Dh(this.buttonEl_,!!this.buttons_));CBa(this,this.backgroundElementOpacity_)}; e.enterDocument=function(){WD.superClass_.enterDocument.call(this);this.getHandler().listen(this.getElement(),"keydown",this.onKey_).listen(this.getElement(),"keypress",this.onKey_);this.getHandler().listen(this.buttonEl_,"click",this.onButtonClick_);YD(this,this.draggable_);this.getHandler().listen(this.titleCloseEl_,"click",this.onTitleCloseClick_);var a=this.getElement();ED(a,this.preferredAriaRole_);""!==this.titleTextEl_.id&&FD(a,"labelledby",this.titleTextEl_.id);this.modal_||DBa(this,!1)}; e.exitDocument=function(){this.isVisible()&&this.setVisible(!1);YD(this,!1);WD.superClass_.exitDocument.call(this)}; e.setVisible=function(a){a!=this.isVisible()&&(this.inDocument_||this.render(),WD.superClass_.setVisible.call(this,a))}; e.onShow=function(){WD.superClass_.onShow.call(this);this.dispatchEvent("aftershow")}; e.onHide=function(){WD.superClass_.onHide.call(this);this.dispatchEvent("afterhide");this.disposeOnHide_&&this.dispose()}; e.setDraggerLimits_=function(){var a=this.getDomHelper().getDocument(),b=gg(kg(a)||window),c=Math.max(a.body.scrollWidth,b.width);a=Math.max(a.body.scrollHeight,b.height);var d=Bh(this.getElement());"fixed"==uh(this.getElement())?this.dragger_.limits=new Vg(0,0,Math.max(0,b.width-d.width),Math.max(0,b.height-d.height)):this.dragger_.limits=new Vg(0,0,c-d.width,a-d.height)}; e.onTitleCloseClick_=function(){ZD(this)}; var ZD=function(a){if(a.hasTitleCloseButton_){var b=a.buttons_,c=b&&b.cancelButton_;c?(b=b.get(c),a.dispatchEvent(new $D(c,b))&&a.setVisible(!1)):a.setVisible(!1)}}; WD.prototype.getHasTitleCloseButton=function(){return this.hasTitleCloseButton_}; var EBa=function(a){a.hasTitleCloseButton_=!1;a.titleCloseEl_&&Dh(a.titleCloseEl_,a.hasTitleCloseButton_)}; e=WD.prototype;e.isEscapeToCancel=function(){return this.escapeToCancel_}; e.setDisposeOnHide=function(a){this.disposeOnHide_=a}; e.getDisposeOnHide=function(){return this.disposeOnHide_}; e.disposeInternal=function(){this.buttonEl_=this.titleCloseEl_=null;WD.superClass_.disposeInternal.call(this)}; e.onButtonClick_=function(a){a:{for(a=a.target;null!=a&&a!=this.buttonEl_;){if("BUTTON"==a.tagName)break a;a=a.parentNode}a=null}if(a&&!a.disabled){a=a.name;var b=this.buttons_.get(a);this.dispatchEvent(new $D(a,b))&&this.setVisible(!1)}}; e.onKey_=function(a){var b=!1,c=!1,d=this.buttons_,f=a.target;if("keydown"==a.type){if(this.escapeToCancel_&&27==a.keyCode){var h=d&&d.cancelButton_;f="SELECT"==f.tagName&&!f.disabled;h&&!f?(c=!0,b=d.get(h),b=this.dispatchEvent(new $D(h,b))):f||(b=!0)}else{if(9==a.keyCode&&a.shiftKey&&f==this.getElement()){this.backwardTabWrapInProgress_=!0;try{this.tabCatcherElement_.focus()}catch(n){}aj(this.resetBackwardTabWrap_,0,this)}}}else if(13==a.keyCode){if("BUTTON"==f.tagName&&!f.disabled)h=f.name;else if(f== this.titleCloseEl_)ZD(this);else if(d){var l=d.defaultButton_,m=l&&FBa(d,l);f=("TEXTAREA"==f.tagName||"SELECT"==f.tagName||"A"==f.tagName)&&!f.disabled;!m||m.disabled||f||(h=l)}h&&d&&(c=!0,b=this.dispatchEvent(new $D(h,String(d.get(h)))))}else f!=this.titleCloseEl_||32!=a.keyCode&&" "!=a.key||ZD(this);if(b||c)a.stopPropagation(),a.preventDefault();b&&this.setVisible(!1)}; var $D=function(a,b){this.type="dialogselect";this.key=a;this.caption=b}; u($D,li);var TD=function(a){KD.call(this);this.dom_=a||$f();this.class_="goog-buttonset";this.cancelButton_=this.element_=this.defaultButton_=null}; u(TD,KD);e=TD.prototype;e.clear=function(){KD.prototype.clear.call(this);this.defaultButton_=this.cancelButton_=null}; e.set=function(a,b,c,d){KD.prototype.set.call(this,a,b);c&&(this.defaultButton_=a);d&&(this.cancelButton_=a);return this}; e.addButton=function(a,b,c){return this.set(a.key,a.caption,b,c)}; e.render=function(){if(this.element_){tc(this.element_,sc);var a=$f(this.element_);this.forEach(function(b,c){b=a.createDom("BUTTON",{name:c},b);c==this.defaultButton_&&(b.className=this.class_+"-default");this.element_.appendChild(b)},this)}}; e.decorate=function(a){if(a&&1==a.nodeType){this.element_=a;a=bg("BUTTON",this.element_);for(var b=0,c,d,f;c=a[b];b++)if(d=c.name||c.id,f=Ig(c)||c.value,d){var h=0==b;this.set(d,f,h,"cancel"==c.name);h&&lj(c,this.class_+"-default")}}}; e.getElement=function(){return this.element_}; e.getDomHelper=function(){return this.dom_}; e.setDefault=function(a){this.defaultButton_=a}; e.setCancel=function(a){this.cancelButton_=a}; var FBa=function(a,b){a=bg("BUTTON",a.element_);for(var c=0,d;d=a[c];c++)if(d.name==b||d.id==b)return d;return null}; TD.prototype.setButtonEnabled=function(a,b){if(a=FBa(this,a))a.disabled=!b}; TD.prototype.setAllButtonsEnabled=function(a){for(var b=bg("BUTTON",this.element_),c=0,d;d=b[c];c++)d.disabled=!a}; var UD={key:"ok",caption:"OK"},VD={key:"cancel",caption:"Cancel"},GBa={key:"yes",caption:"Yes"},HBa={key:"no",caption:"No"},IBa={key:"save",caption:"Save"},JBa={key:"continue",caption:"Continue"};"undefined"!=typeof document&&(new TD().addButton(UD,!0,!0),new TD().addButton(UD,!0).addButton(VD,!1,!0),new TD().addButton(GBa,!0).addButton(HBa,!1,!0),new TD().addButton(GBa).addButton(HBa,!0).addButton(VD,!1,!0),new TD().addButton(JBa).addButton(IBa).addButton(VD,!0,!0));var KBa=function(a,b,c){WD.call(this,a,b,c)}; u(KBa,WD);var LBa=function(a){mD.call(this,a)}; u(LBa,mD);var MBa=Mb(Eb("//www-onepick-opensocial.googleusercontent.com/gadgets/js/rpc.js?c=1&container=onepick")),NBa=Mb(Eb("//apis.google.com/js/rpc.js"));function OBa(a,b){if(!aE(b)){b=b||$f(document);var c=b.createElement("SCRIPT");yc(c,a);c.type="text/javascript";b.getDocument().body.appendChild(c)}} function aE(a){a=a&&a.getWindow()||window;return a.gadgets&&a.gadgets.rpc} var bE=null;function PBa(a,b){var c=b&&b.getWindow()||window;if(aE(b))a();else if(bE)bE.push(a);else var d=bE=[a],f=c.setInterval(function(){if(aE(b)){c.clearInterval(f);for(var h=0;hl&&(f=l,d.getBoundingClientRect().left+ l/2>a.getBoundingClientRect().left&&(f=Math.min(f,l/2))));rh(c,"left",f+"px")}}else this.calloutArrow_.update(this.getElement(),b,this.margin_||null);vD(this.getElement(),b)&1?jj(this.iframe_,"picker-min-frame-down"):jj(this.iframe_,"picker-min-frame-up")}}; var gE=function(a){return se&&Ee("7")&&Nb(a.url_,"https")?Mb(Eb("https://about:blank")):se?Mb(Eb("javascript:\"\"")):Mb(Eb("about:blank"))}; e=fE.prototype;e.handleIFrameLoad_=function(){this.iframe_.src!=Ib(gE(this))&&(this.iframeLoaded_=!0,this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),Gg(this.iframe_,!0),this.isVisible()&&aj(Ua(this.focus,this,this.iframe_),0))}; e.handleKeydown_=function(a){27==a.keyCode&&(RBa(this),a.stopPropagation(),a.preventDefault())}; e.execOnGadgetsLoad_=function(a){var b=this.getDomHelper();PBa(function(){a(b.getWindow().gadgets.rpc)},b)}; e.setUrl=function(a){a=ar(ar(new kq(a),"rpctoken",this.rpcToken_),"rpcService",this.targetId_);a.setScheme("https");this.url_=a.toString();this.iframe_&&xc(this.iframe_,ph(this.url_))}; e.setAppId=function(a){this.appId_=a;this.loadedFired_&&hE(this)}; e.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(Ua(function(b){b.register(this.targetId_,Ua(this.handlePickerAction_,this))},this))}; e.handlePickerAction_=function(a){switch(a.action){case"viewUpdated":case"viewChanged":this.reposition();return;case"enableWhiteCallout":a=a.extraUserInputs;var b=this.getElement();a&&a.ewc?lj(b,"picker-white-callout"):nj(b,"picker-white-callout");return;case"loaded":this.loadedFired_=!0;this.sendCommand(new CD(this.isVisible()));hE(this);break;case"blurred":this.getElement()!=Ng(this.getDomHelper().getDocument())&&this.isVisible()&&(this.setVisible(!1),this.callback_({action:"cancel"}));return; case"picked":case"cancel":this.setVisible(!1);}this.callback_(a)}; var hE=function(a){a.appId_&&a.sendCommand(new BD(a.appId_,window.location.protocol+"//"+window.location.host))}; e=fE.prototype;e.setRelayUrl=function(a){this.execOnGadgetsLoad_(Ua(function(b){b.setRelayUrl(this.targetId_,a)},this))}; e.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1d&&n.top>m+(r.bottom-r.top))h^=1,c=new cE(a.element,h),b^=1;if(h&4&&r.leftf&&n.right>l+(r.right-r.left))c=new cE(a.element,h^4),b^=4;c&&(this.setPosition(c),this.popupCorner_=b,this.isVisible()&&this.reposition(),this.reposition())}this.iframeLoaded_?this.focus(this.iframe_):this.focus(this.getElement())}; e.onHide=function(a){fE.superClass_.onHide.call(this,a);Qg(this.focusHandler_);sg(this.tabCatcherElement_);this.sendCommand(new CD(!1))}; e.handleDocumentMouseDown_=function(a){a=a.target;yg(this.getElement(),a)||QD(this,a)||this.autoHideRegion_&&!yg(this.autoHideRegion_,a)||150>Xa()-this.lastShowTime_||RBa(this)}; var RBa=function(a){a.isVisible()&&(a.setVisible(!1),a.callback_({action:"cancel"}))}; fE.prototype.disposeInternal=function(){this.canDispose_?(sg(this.getElement()),fE.superClass_.disposeInternal.call(this)):aj(function(){this.canDispose_=!0;this.disposeInternal()},0,this)};var iE=function(a,b){Ci.call(this);this.element_=a;a=wg(this.element_)?this.element_:this.element_?this.element_.body:null;this.isRtl_=!!a&&Eh(a);this.listenKey_=vi(this.element_,ve?"DOMMouseScroll":"mousewheel",this,b)}; u(iE,Ci);iE.prototype.setMaxDeltaX=function(a){this.maxDeltaX_=a}; iE.prototype.setMaxDeltaY=function(a){this.maxDeltaY_=a}; iE.prototype.handleEvent=function(a){var b=0,c=0,d=a.event_;"mousewheel"==d.type?(a=jE(-d.wheelDelta),void 0!==d.wheelDeltaX?(b=jE(-d.wheelDeltaX),c=jE(-d.wheelDeltaY)):c=a):(a=d.detail,100a&&(a=-3),void 0!==d.axis&&d.axis===d.HORIZONTAL_AXIS?b=a:c=a);"number"===typeof this.maxDeltaX_&&(b=Tf(b,-this.maxDeltaX_,this.maxDeltaX_));"number"===typeof this.maxDeltaY_&&(c=Tf(c,-this.maxDeltaY_,this.maxDeltaY_));this.isRtl_&&(b=-b);b=new SBa(a,d,b,c);this.dispatchEvent(b)}; var jE=function(a){return we&&(xe||Yca)&&0!=a%40?a:a/40}; iE.prototype.disposeInternal=function(){iE.superClass_.disposeInternal.call(this);Ai(this.listenKey_);this.listenKey_=null}; var SBa=function(a,b,c,d){mi.call(this,b);this.type="mousewheel";this.detail=a;this.deltaX=c;this.deltaY=d}; u(SBa,mi);var TBa=function(a,b){var c;a:{for(c=b.target;c;){if(1==c.nodeType){var d=th(c,"overflowY");if("auto"==d||"scroll"==d)break a}c=c.parentNode}c=null}(!c||!yg(a,c)||c.scrollHeight==c.clientHeight||0=Math.abs(c.scrollTop-(c.scrollHeight-c.clientHeight))||0>b.deltaY&&0==c.scrollTop)&&b.stopPropagation()};var kE;var lE=function(a,b,c,d,f,h,l){WD.call(this,h?h+" "+this.className_:this.className_,!0,c);this.useGapiIframesProtocol_="gapi_iframes"==Kd(a,"protocol");this.iframeManager_=new qD;this.targetId_=Ic();this.rpcToken_=Ic();this.useGapi_=!1;this.setUrl(a);this.preferredDialogWidth_=d;this.preferredDialogHeight_=f;void 0!==d||void 0!==f?c=!0:(c=lr(mr(a),"hostId"),kE||(kE=new Set("DocVerse fusiontables geo geowiki gm gmail-gadget gws hotpot jointly presentations pwa sites templates trix trix-copy-sheet webstore".split(" "))), c=!kE.has(c));this.autoSizeDialog_=c;this.gadgetsDomHelper_=l||this.getDomHelper();b&&(lr(mr(a),"hostId"),b="true"==lr(mr(this.url_),"grugl"),OBa(b?NBa:MBa,this.gadgetsDomHelper_));this.setDefaultRelayUrl_(a);this.escapeToCancel_=!1;this.buttons_=null;this.buttonEl_&&(this.buttons_?(a=this.buttons_,a.element_=this.buttonEl_,a.render()):tc(this.buttonEl_,sc),Dh(this.buttonEl_,!!this.buttons_));this.logger_=null}; u(lE,KBa);e=lE.prototype;e.className_="picker modal-dialog";e.url_="";e.iframe_=null;e.iframeLoaded_=!1;e.loadedFired_=!1;e.callback_=La;e.enterDocument=function(){lE.superClass_.enterDocument.call(this);var a=this.getBackgroundElement(),b=this.getHandler(),c=new iE(a);Sg(b,c);b.listen(c,"mousewheel",Ua(TBa,void 0,a)).listen(a,"scroll",Ua(TBa,void 0,a))}; e.render=function(a){var b=this;lE.superClass_.render.call(this,a);this.useGapi_?this.iframeManager_.gapiLibPromise_.then(function(){return UBa(b)}).then(null,function(c){return void b.handleError_(c)}):(this.iframe_=this.dom_.createDom("IFRAME",{id:this.targetId_, name:this.targetId_,"class":"picker-frame",onload:Ua(this.handleIFrameLoad_,this),frameBorder:"0",allow:"camera"}),xc(this.iframe_,gE(this)),this.getContentElement().appendChild(this.iframe_),lj(this.getElement(),"picker-dialog"),this.iframe_.src=this.url_,VBa(this),WBa(this))}; var UBa=function(a){var b=a.getDomHelper().createDom("div",["picker-dialog-content","picker-frame"]);Dh(b,!1);a.getContentElement().appendChild(b);return HAa(a.iframeManager_,b,function(c){var d=Mf(Iq,c["iframe-command"]);switch(of(d,1,0)){case 1:c=a.callback_;var f=M(d,nq,2);d="";switch(f.getStatus()){case 2:d="cancel";break;case 1:d="picked";break;case 3:d="error";}f=f.getItemList();d=0===f.length?{action:d}:yAa(f,d);c.call(a,d);a.setVisible(!1);break;case 4:EBa(a),a.callback_({action:"loaded"});}}, a.url_,a.targetId_,a.rpcToken_).then(function(c){a.iframe_=c.getIframeEl(); a.handleIFrameLoad_();Dh(a.iframe_.parentElement,!0);lj(a.getElement(),"picker-dialog");VBa(a);WBa(a);return c})},VBa=function(a){a.execOnGadgetsLoad_(Ua(function(b){b.setAuthToken(this.targetId_,this.rpcToken_)},a))},WBa=function(a){var b=lr(mr(a.url_),"title"); b&&a.setTitle(b)}; e=lE.prototype;e.getSafeBlankUrl_=function(){return se&&Ee("7")&&Nb(this.url_,"https")?Mb(Eb("https://about:blank")):se?Mb(Eb("javascript:\"\"")):Mb(Eb("about:blank"))}; e.handleIFrameLoad_=function(){this.iframe_.src!=Ib(gE(this))&&(this.iframeLoaded_=!0,Gg(this.iframe_,!0),this.isVisible()&&this.focus())}; e.handleKeydown_=function(a){27==a.keyCode&&(this.setVisible(!1),this.callback_({action:"cancel"}),a.stopPropagation(),a.preventDefault())}; e.execOnGadgetsLoad_=function(a){var b=this.gadgetsDomHelper_;PBa(function(){a(b.getWindow().gadgets.rpc)},b)}; e.setUrl=function(a){a=ar(new kq(a),"rpcService",this.targetId_);this.useGapi_=void 0!==lr(a,"v2");ar(a,"rpctoken",this.rpcToken_);hr(a,"rpctoken="+this.rpcToken_);a.setScheme("https");this.url_=a.toString();this.iframe_&&(this.iframe_.src=this.url_)}; e.setAppId=function(a){this.appId_=a;this.loadedFired_&&hE(this)}; e.setCallback=function(a){this.callback_=a;this.execOnGadgetsLoad_(Ua(function(b){b.register(this.targetId_,Ua(this.handlePickerAction_,this))},this))}; e.handlePickerAction_=function(a){var b=a.action;"loaded"==b&&(this.loadedFired_=!0,this.sendCommand(new CD(this.isVisible())),hE(this),EBa(this),this.getHandler().unlisten(this.getDomHelper().getWindow(),"keydown",this.handleKeydown_),Gg(this.iframe_,!0));"picked"!=b&&"cancel"!=b||this.setVisible(!1);this.callback_(a)}; e.setDriveOptions_=function(){this.appId_&&this.sendCommand(new BD(this.appId_,window.location.protocol+"//"+window.location.host))}; e.setRelayUrl=function(a){this.execOnGadgetsLoad_(Ua(function(b){b.setRelayUrl(this.targetId_,a)},this))}; e.setDefaultRelayUrl_=function(a){var b=null,c=a.indexOf("/picker?");-1f||(b[d.substring(0,f)]=d.substring(f+2,d.length))}return b} sE(function(){if(!t.Blob)return!1;var a=new Uint8Array(100);try{var b=new Blob([a])}catch(c){return!1}return 100!=b.size?!1:!0}); var dCa=sE(function(){if(!t.Blob)return!1;var a=new Uint8Array(100);try{var b=new Blob([a])}catch(c){return!1}return null===rE(b,0,1)?!1:!0});var eCa=!/^\s*class\s*\{\s*\}\s*$/.test(function(){}.toString());var uE=Symbol("PIECES");function vE(a,b,c){fCa(a,b);a[b][uE].unshift(c)} function fCa(a,b){if(!a[b]||!a[b][uE]){var c=a[b],d=c?[c]:[];a[b]=function(){for(var f=k(d),h=f.next();!h.done;h=f.next())h.value.apply(this,arguments)}; a[b][uE]=d}} function gCa(a){if(!a)return[];var b=[];a=k(a);for(var c=a.next();!c.done;c=a.next())c=c.value,Array.isArray(c)?b.push.apply(b,ha(gCa(c))):b.push(c);return b} ;var wE=window.Polymer,xE=wE&&wE.version&&wE.version.startsWith("1."),yE=/\bclass\b/.test(function(){}.toString()); window.PolymerFakeBaseClass=function(){}; var O=function(){return PolymerFakeBaseClass.apply(this,arguments)||this}; p(O,PolymerFakeBaseClass);var zE=function(){return PolymerFakeBaseClass.apply(this,arguments)||this}; p(zE,PolymerFakeBaseClass);function hCa(a){var b={};Object.defineProperties(b,Object.getOwnPropertyDescriptors(a));return b} var iCa=Symbol("POLYMER_COMPONENT_DEFINITION"); function jCa(a){var b="string"!==typeof a?a:{is:a,notifyObserversOnUndefined:!0};void 0===b.fastInit&&(b.fastInit=!0);return function(c){if(Object.getPrototypeOf(c.prototype).constructor!==O)throw Error("Custom elements must inherit directly from PolymerElement.");var d=yE&&xE?hCa(c.prototype):c.prototype;d.is=b.is;kCa(d,c,b.fastInit);b.notifyObserversOnUndefined&&(xE?vE(d,"created",function(){var r=this._propertyEffects;if(r)for(var v=k(Object.keys(r)),z=v.next();!z.done;z=v.next()){z=k(r[z.value]); for(var C=z.next();!C.done;C=z.next())if(C=C.value,"compute"===C.kind||"complexObserver"===C.kind)C.effect.args=[]}}):d._overrideLegacyUndefined=!0); if(yE)for(var f=k(Object.getOwnPropertyNames(d)),h=f.next();!h.done;h=f.next()){h=h.value;var l=Object.getOwnPropertyDescriptor(d,h);!1===l.enumerable&&(l.enumerable=!0,Object.defineProperty(d,h,l))}if("template"in c)var m=function(){return c.template};else void 0!==b.template&&(m=b.template);if(void 0!==m){var n;Object.defineProperty(d,"_template",{get:function(){void 0===n&&(n=m());return n}, set:function(r){n=r}, configurable:!0,enumerable:!0})}Polymer(d);c[iCa]=d}} function AE(){var a=void 0===a?{}:a;void 0===a.fastInit&&(a.fastInit=!0);return function(b){if(Object.getPrototypeOf(b.prototype).constructor!==zE)throw Error("Custom behaviors must inherit directly from PolymerBehavior.");kCa(b.prototype,b,a.fastInit)}} function kCa(a,b,c){c=void 0===c?!1:c;lCa(b);xE||!c?vE(a,"ready",function(){for(var d={},f=k(gCa(this.behaviors)),h=f.next();!h.done;h=f.next())h=h.value,h.properties&&Object.assign(d,mCa(this,h.properties));Object.assign(d,mCa(this,this.properties));nCa(b,this);f=k(Object.keys(d));for(h=f.next();!h.done;h=f.next())h=h.value,this[h]=d[h]}):vE(a,"created",function(){nCa(b,this)})} function nCa(a,b){if(yE){a=new a;for(var c=k(Object.getOwnPropertyNames(a)),d=c.next();!d.done;d=c.next())d=d.value,b[d]=a[d];for(c=b;c&&c!==Object.prototype;c=Object.getPrototypeOf(c)){d=k(Object.getOwnPropertyNames(c));for(var f=d.next();!f.done;f=d.next())f=f.value,a.hasOwnProperty(f)||Object.defineProperty(a,f,oCa(b,f))}}else a.apply(b)} function oCa(a,b){return{get:function(){var c=a[b];return c instanceof Function?c.bind(a):c}, set:function(c){a[b]=c}}} function mCa(a,b){if(!b)return{};for(var c={},d=k(Object.keys(b)),f=d.next();!f.done;f=d.next())if(f=f.value,!b[f].readOnly){var h=a[f];void 0!==h&&(c[f]=h)}return c} function lCa(a){var b=new a;a=a.prototype.properties||{};for(var c=k(Object.keys(a)),d=c.next();!d.done;d=c.next())if(d=d.value,b.hasOwnProperty(d)){var f=a[d];"function"===typeof f&&(a[d]=f={type:f});null!=b[d]&&f.type===Object&&(f.type=pCa(b[d].constructor))}} var qCa=[Array,Boolean,Date,Number,Object,String];function pCa(a){for(var b=k(qCa),c=b.next();!c.done;c=b.next())if(c=c.value,a===c)return c;return Object} function P(a){return function(b,c){b.behaviors=b.behaviors||[];b.behaviors.push(a||(void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?Reflect.getMetadata("design:type",b,c).prototype:void 0));Object.defineProperty(b,c,{get:function(){return this}, enumerable:!0,configurable:!0})}} function R(a){a=void 0===a?{}:a;return function(b,c){b.properties=b.properties||{};a.type||(a.type=void 0!==window.Reflect&&void 0!==window.Reflect.getMetadata?pCa(Reflect.getMetadata("design:type",b,c)):String);var d=a,f=b.properties[c];b.properties[c]=f?Object.assign(Object.assign({},f),d):d}} function S(a){return function(b,c){b.listeners=b.listeners||{};b.listeners[a]=c}} function U(a){for(var b=[],c=0;carguments.length?this[c]:f;this._valueToNodeAttribute(this,f,d||this.constructor.attributeNameForProperty(c));this.__serializing=!1}; b.prototype._valueToNodeAttribute=function(c,d,f){d=this._serializeValue(d);if("class"===f||"name"===f||"slot"===f)c=ME(c);void 0===d?c.removeAttribute(f):c.setAttribute(f,d)}; b.prototype._serializeValue=function(c){switch(typeof c){case"boolean":return c?"":void 0;default:return null!=c?c.toString():void 0;}}; b.prototype._deserializeValue=function(c,d){switch(d){case Boolean:return null!==c;case Number:return Number(c);default:return c;}}; return b});var OE=0,PE=[];function _regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry(a){console.log("["+a.is+"]: registered")} function QE(a){PE.push(a)} ;var yCa=LE(function(a){function b(h){h=Object.getPrototypeOf(h);return h.prototype instanceof f?h:null} function c(h){if(!h.hasOwnProperty("__ownProperties")){var l=null;if(h.hasOwnProperty("properties")){var m=h.properties;if(m){l={};for(var n in m){var r=m[n];l[n]="function"===typeof r?{type:r}:r}}}h.__ownProperties=l}return h.__ownProperties} var d=NE(a),f=function(){return d.apply(this,arguments)||this}; p(f,d);f.finalize=function(){if(!this.hasOwnProperty("__finalized")){var h=b(this);h&&h.finalize();this.__finalized=!0;this._finalizeClass()}}; f._finalizeClass=function(){var h=c(this);h&&this.createProperties(h)}; f.typeForProperty=function(h){return(h=this._properties[h])&&h.type}; f.prototype._initializeProperties=function(){OE++;this.constructor.finalize();d.prototype._initializeProperties.call(this)}; f.prototype.connectedCallback=function(){d.prototype.connectedCallback&&d.prototype.connectedCallback.call(this);this._enableProperties()}; f.prototype.disconnectedCallback=function(){d.prototype.disconnectedCallback&&d.prototype.disconnectedCallback.call(this)}; g.Object.defineProperties(f,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){var h=this;if(!this.hasOwnProperty("__observedAttributes")){QE(this.prototype);var l=this._properties;this.__observedAttributes=l?Object.keys(l).map(function(m){return h.prototype._addPropertyToAttributeMap(m)}):[]}return this.__observedAttributes}}, _properties:{configurable:!0,enumerable:!0,get:function(){if(!this.hasOwnProperty("__properties")){var h=b(this);this.__properties=Object.assign({},h&&h._properties,c(this))}return this.__properties}}}); return f});var RE={},zCa=/-[a-z]/g,ACa=/([A-Z])/g;function SE(a){return RE[a]||(RE[a]=0>a.indexOf("-")?a:a.replace(zCa,function(b){return b[1].toUpperCase()}))} function TE(a){return RE[a]||(RE[a]=a.replace(ACa,"-$1").toLowerCase())} ;for(var BCa={},UE=HTMLElement.prototype;UE;){for(var CCa=Object.getOwnPropertyNames(UE),VE=0;VE>1,J=n.get(m[C].methodInfo)-n.get(l.methodInfo);if(0>J)r=C+1;else if(0z&&(z=v+1);m.splice(z,0,l)}}}; function QCa(a){var b=a.constructor.__orderedComputedDeps;if(!b){b=new Map;for(var c=a.__computeEffects,d=RCa(a),f=d.counts,h=d.ready,l=d.total;d=h.shift();)b.set(d,b.size),(d=c[d])&&d.forEach(function(m){m=m.info.methodInfo;--l;0===--f[m]&&h.push(m)}); 0!==l&&console.warn("Computed graph for "+a.localName+" incomplete; circular?");a.constructor.__orderedComputedDeps=b}return b} function RCa(a){var b=a.__computeInfo,c={};a=a.__computeEffects;var d=[],f=0,h;for(h in b){var l=b[h];f+=c[h]=l.args.filter(function(n){return!n.literal}).length+(l.dynamicFn?1:0)}for(var m in a)b[m]||d.push(m); return{counts:c,ready:d,total:f}} function SCa(a,b,c,d,f){b=lF(a,b,c,d,f);if(b===hF)return!1;f=f.methodInfo;if(a.__dataHasAccessor&&a.__dataHasAccessor[f])return a._setPendingProperty(f,b,!0);a[f]=b;return!1} function TCa(a,b,c,d,f,h,l){c.bindings=c.bindings||[];d={kind:d,target:f,parts:h,literal:l,isCompound:1!==h.length};c.bindings.push(d);d.target&&"attribute"!=d.kind&&"text"!=d.kind&&!d.isCompound&&"{"===d.parts[0].mode&&(c=d.parts[0],h=c.negate,d.listenerEvent=c.event||TE(f)+"-changed",d.listenerNegate=h);f=b.nodeInfoList.length;for(c=0;cn.source.length&&"property"==m.kind&&!m.isCompound&&l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[m.target]?(c=c[b],b=aF(n.source,m.target,b),l._setPendingPropertyOrPath(b,c,!1,!0)&&a._enqueueClient(l)):(b=f.evaluator._evaluateBinding(a,n,b,c,d,h),b!==hF&&(m.isCompound&&(c=l.__dataCompoundStorage[m.target],c[n.compoundIndex]=b,b=c.join("")),"attribute"===m.kind||"textContent"!==m.target&&( "value"!==m.target||"input"!==l.localName&&"textarea"!==l.localName)||(b=void 0==b?"":b),n=b,Xc&&(n=Xc(n,m.target,m.kind,l)),"attribute"==m.kind?a._valueToNodeAttribute(l,n,m.target):(m=m.target,l.__isPropertyEffectsClient&&l.__dataHasAccessor&&l.__dataHasAccessor[m]?l.__readOnly&&l.__readOnly[m]||l._setPendingProperty(m,n)&&a._enqueueClient(l):a._setUnmanagedPropertyToNode(l,m,n))))} function WCa(a,b,c){if(c.listenerEvent){var d=c.parts[0];a.addEventListener(c.listenerEvent,function(f){var h=c.target,l=d.source,m=f.detail,n=m&&m.path;n?(l=aF(h,l,n),f=m&&m.value):f=f.currentTarget[h];b.__readOnly&&b.__readOnly[l]||!b._setPendingPropertyOrPath(l,d.negate?!f:f,!0,!!n)||m&&m.queueProperty||b._invalidateProperties()})}} function XCa(a,b,c,d,f,h){h=b.static||h&&("object"!==typeof h||h[b.methodName]);f={methodName:b.methodName,args:b.args,methodInfo:f,dynamicFn:h};for(var l=0,m=void 0;l=c&&(c="#");switch(c){case"'":case"\"":b.value=a.slice(1,-1);b.literal=!0;break;case"#":b.value=Number(a),b.literal=!0;}b.literal||(b.rootProperty=YE(a),b.structured=XE(a),b.structured&&(b.wildcard=".*"==a.slice(-2),b.wildcard&&(b.name=a.slice(0,-2))));return b} function cDa(a,b,c){a=eF(a,c);void 0===a&&(a=b[c]);return a} function dDa(a,b,c,d){d={indexSplices:d};dd&&!a._overrideLegacyUndefined&&(b.splices=d);a.notifyPath(c+".splices",d);a.notifyPath(c+".length",b.length);dd&&!a._overrideLegacyUndefined&&(d.indexSplices=[])} function mF(a,b,c,d,f,h){dDa(a,b,c,[{index:d,addedCount:f,removed:h,object:b,type:"splice"}])} var oF=LE(function(a){var b=ICa(WE(a));a=function(){var c=b.call(this)||this;c.__isPropertyEffectsClient=!0;return c}; p(a,b);a.prototype._initializeProperties=function(){b.prototype._initializeProperties.call(this);this._registerHost();this.__dataClientsReady=!1;this.__dataLinkedPaths=this.__dataToNotify=this.__dataPendingClients=null;this.__dataHasPaths=!1;this.__dataCompoundStorage=this.__dataCompoundStorage||null;this.__dataHost=this.__dataHost||null;this.__dataTemp={};this.__dataClientsInitialized=!1}; a.prototype._registerHost=function(){if(nF.length){var c=nF[nF.length-1];c._enqueueClient(this);this.__dataHost=c}}; a.prototype._initializeProtoProperties=function(c){this.__data=Object.create(c);this.__dataPending=Object.create(c);this.__dataOld={}}; a.prototype._initializeInstanceProperties=function(c){var d=this.__readOnly,f;for(f in c)d&&d[f]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[f]=this.__dataPending[f]=c[f])}; a.prototype._addPropertyEffect=function(c,d,f){this._createPropertyAccessor(c,"__readOnly"==d);var h=iF(this,d,!0)[c];h||(h=this[d][c]=[]);h.push(f)}; a.prototype._removePropertyEffect=function(c,d,f){c=iF(this,d,!0)[c];f=c.indexOf(f);0<=f&&c.splice(f,1)}; a.prototype._hasPropertyEffect=function(c,d){d=this[d];return!(!d||!d[c])}; a.prototype._hasReadOnlyEffect=function(c){return this._hasPropertyEffect(c,"__readOnly")}; a.prototype._hasNotifyEffect=function(c){return this._hasPropertyEffect(c,"__notifyEffects")}; a.prototype._hasReflectEffect=function(c){return this._hasPropertyEffect(c,"__reflectEffects")}; a.prototype._hasComputedEffect=function(c){return this._hasPropertyEffect(c,"__computeEffects")}; a.prototype._setPendingPropertyOrPath=function(c,d,f,h){if(h||YE(Array.isArray(c)?c[0]:c)!==c){if(!h&&(h=eF(this,c),c=fF(this,c,d),!c||!b.prototype._shouldPropertyChange.call(this,c,d,h)))return!1;this.__dataHasPaths=!0;if(this._setPendingProperty(c,d,f)){if(f=this.__dataLinkedPaths)for(var l in f)h=f[l],$E(l,c)?(h=aF(l,h,c),this._setPendingPropertyOrPath(h,d,!0,!0)):$E(h,c)&&(h=aF(h,l,c),this._setPendingPropertyOrPath(h,d,!0,!0));return!0}}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[c])return this._setPendingProperty(c, d,f);this[c]=d}return!1}; a.prototype._setUnmanagedPropertyToNode=function(c,d,f){if(f!==c[d]||"object"==typeof f)"className"===d&&(c=ME(c)),c[d]=f}; a.prototype._setPendingProperty=function(c,d,f){var h=this.__dataHasPaths&&XE(c);if(this._shouldPropertyChange(c,d,(h?this.__dataTemp:this.__data)[c])){this.__dataPending||(this.__dataPending={},this.__dataOld={});c in this.__dataOld||(this.__dataOld[c]=this.__data[c]);h?this.__dataTemp[c]=d:this.__data[c]=d;this.__dataPending[c]=d;if(h||this.__notifyEffects&&this.__notifyEffects[c])this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[c]=f;return!0}return!1}; a.prototype._setProperty=function(c,d){this._setPendingProperty(c,d,!0)&&this._invalidateProperties()}; a.prototype._invalidateProperties=function(){this.__dataReady&&this._flushProperties()}; a.prototype._enqueueClient=function(c){this.__dataPendingClients=this.__dataPendingClients||[];c!==this&&this.__dataPendingClients.push(c)}; a.prototype._flushClients=function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}; a.prototype.__enableOrFlushClients=function(){var c=this.__dataPendingClients;if(c){this.__dataPendingClients=null;for(var d=0;dd?d=n.length-Math.floor(-d):d&&(d=Math.floor(d));var r=2===arguments.length?n.splice(d):n.splice.apply(n,[d,f].concat(ha(l)));(l.length||r.length)&&mF(this,n,m.path,d,l.length,r);return r}; a.prototype.shift=function(c){var d={path:""};c=eF(this,c,d);var f=!!c.length,h=c.shift();f&&mF(this,c,d.path,0,0,[h]);return h}; a.prototype.unshift=function(c,d){for(var f=[],h=1;hh&&f.push({literal:c.slice(h,l.index)});h=l[1][0];var m=!!l[2];l=l[3].trim();var n=!1,r="",v=-1;"{"==h&&0<(v=l.indexOf("::"))&&(r=l.substring(v+2),l=l.substring(0,v),n=!0);v=aDa(l);var z=[];if(v){var C=v,J=C.args;C=C.methodName;for(var E=0;Ec.indexOf(".")&&c==d&&this.__deselectChangedIdx(d))}; a.prototype.__applySplices=function(c){for(var d=this,f=this.__selectedMap,h={},l=0;l=v.$jscomp$loop$prop$s$2401.index+v.$jscomp$loop$prop$s$2401.removed.length?f.set(C,z+v.$jscomp$loop$prop$s$2401.addedCount-v.$jscomp$loop$prop$s$2401.removed.length):f.set(C,-1))}}(h)); for(var m=0;mv?(d.multi?d.splice("selected",r,1):d.selected=d.selectedItem=null,f.delete(z)):r++})}; a.prototype.__updateLinks=function(){var c=this;this.__dataLinkedPaths={};if(this.multi){var d=0;this.__selectedMap.forEach(function(f){0<=f&&c.linkPaths("items."+f,"selected."+d++)})}else this.__selectedMap.forEach(function(f){c.linkPaths("selected","items."+f); c.linkPaths("selectedItem","items."+f)})}; a.prototype.clearSelection=function(){this.__dataLinkedPaths={};this.__selectedMap=new Map;this.selected=this.multi?[]:null;this.selectedItem=null}; a.prototype.isSelected=function(c){return this.__selectedMap.has(c)}; a.prototype.isIndexSelected=function(c){return this.isSelected(this.items[c])}; a.prototype.__deselectChangedIdx=function(c){var d=this,f=this.__selectedIndexForItemIndex(c);if(0<=f){var h=0;this.__selectedMap.forEach(function(l,m){f==h++&&d.deselect(m)})}}; a.prototype.__selectedIndexForItemIndex=function(c){if(c=this.__dataLinkedPaths["items."+c])return parseInt(c.slice(9),10)}; a.prototype.deselect=function(c){var d=this.__selectedMap.get(c);if(0<=d){this.__selectedMap.delete(c);var f;this.multi&&(f=this.__selectedIndexForItemIndex(d));this.__updateLinks();this.multi?this.splice("selected",f,1):this.selected=this.selectedItem=null}}; a.prototype.deselectIndex=function(c){this.deselect(this.items[c])}; a.prototype.select=function(c){this.selectIndex(this.items.indexOf(c))}; a.prototype.selectIndex=function(c){var d=this.items[c];this.isSelected(d)?this.toggle&&this.deselectIndex(c):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(d,c),this.__updateLinks(),this.multi?this.push("selected",d):this.selected=this.selectedItem=d)}; g.Object.defineProperties(a,{properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}}, observers:{configurable:!0,enumerable:!0,get:function(){return["__updateSelection(multi, items.*)"]}}}); return a}),rDa=qDa(uF),vF=function(){return rDa.apply(this,arguments)||this}; p(vF,rDa);g.Object.defineProperties(vF,{is:{configurable:!0,enumerable:!0,get:function(){return"array-selector"}}, template:{configurable:!0,enumerable:!0,get:function(){return null}}}); customElements.define(vF.is,vF);var sDa=window.Polymer;window.Polymer=function(a){return window.Polymer._polymerFn(a)}; sDa&&Object.assign(Polymer,sDa);Polymer._polymerFn=function(){throw Error("Load polymer.html to use the Polymer() function.")};Polymer.ResolveUrl={resolveCss:Qc,resolveUrl:Pc,pathFromUrl:Rc};Polymer.DomModule=FE;Polymer.Async={timeOut:IE,animationFrame:JE,idlePeriod:wCa,microTask:KE};Polymer.dedupingMixin=LE;Polymer.wrap=ME;Polymer.PropertiesChanged=NE;Polymer.telemetry={instanceCount:OE,incrementInstanceCount:function(){OE++}, registrations:PE,register:QE,dumpRegistrations:function(){PE.forEach(_regLog$$module$third_party$javascript$polymer$v2$polymer$lib$utils$telemetry)}};Polymer.PropertiesMixin=yCa;Polymer.CaseMap={dashToCamelCase:SE,camelToDashCase:TE};Polymer.PropertyAccessors=WE;Polymer.TemplateStamp=ICa;Polymer.Path={isPath:XE,root:YE,isAncestor:ZE,isDescendant:$E,translate:aF,matches:bF,normalize:cF,split:dF,get:eF,set:fF,isDeep:XE};Polymer.Settings={useShadow:Sc,useNativeCSSProperties:Oba,useNativeCustomElements:Pba,get rootPath(){return Wc},setRootPath:function(a){Wc=a}, get sanitizeDOMValue(){return Xc},setSanitizeDOMValue:function(a){Xc=a}, get passiveTouchGestures(){return Yc},setPassiveTouchGestures:function(a){Yc=a}, get strictTemplatePolicy(){return Zc},setStrictTemplatePolicy:function(a){Zc=a}, get allowTemplateFromDomModule(){return $c},setAllowTemplateFromDomModule:function(a){$c=a}, get legacyOptimizations(){return ad},setLegacyOptimizations:function(a){ad=a}, get syncInitialRender(){return cd},setSyncInitialRender:function(a){cd=a}, get legacyUndefined(){return dd},setLegacyUndefined:function(a){dd=a}, get legacyWarnings(){return bd},setLegacyWarnings:function(a){bd=a}, get orderedComputed(){return ed},setOrderedComputed:function(a){ed=a}, get fastDomIf(){return gd},setFastDomIf:function(a){gd=a}, get removeNestedTemplates(){return fd},setRemoveNestedTemplates:function(a){fd=a}, get suppressTemplateNotifications(){return hd},setSuppressTemplateNotifications:hd};void 0!==Polymer.rootPath&&(Wc=Polymer.rootPath);void 0!==Polymer.sanitizeDOMValue&&(Xc=Polymer.sanitizeDOMValue);void 0!==Polymer.passiveTouchGestures&&(Yc=Polymer.passiveTouchGestures);void 0!==Polymer.strictTemplatePolicy&&(Zc=Polymer.strictTemplatePolicy);$c=void 0!==Polymer.allowTemplateFromDomModule?Polymer.allowTemplateFromDomModule:!0;void 0!==Polymer.legacyOptimizations&&(ad=Polymer.legacyOptimizations); void 0!==Polymer.syncInitialRender&&(cd=Polymer.syncInitialRender);void 0!==Polymer.legacyUndefined&&(dd=Polymer.legacyUndefined);void 0!==Polymer.legacyWarnings&&(bd=Polymer.legacyWarnings);void 0!==Polymer.orderedComputed&&(ed=Polymer.orderedComputed);void 0!==Polymer.fastDomIf&&(gd=Polymer.fastDomIf);void 0!==Polymer.removeNestedTemplates&&(fd=Polymer.removeNestedTemplates);void 0!==Polymer.suppressTemplateNotifications&&(hd=Polymer.suppressTemplateNotifications); Object.defineProperty(Polymer,"sanitizeDOMValue",{get:function(){return Xc}, set:function(a){Xc=a}});Polymer.PropertyEffects=oF;Polymer.StyleGather={stylesFromModules:fDa,stylesFromModule:gDa,stylesFromTemplate:pF,stylesFromModuleImports:hDa,cssFromModules:iDa,cssFromModule:jDa,cssFromTemplate:kDa,cssFromModuleImports:function(a){return(a=FE.import(a))?_cssFromModuleImports$$module$third_party$javascript$polymer$v2$polymer$lib$utils$style_gather(a):""}};Polymer.ElementMixin=qF;Polymer.updateStyles=function(a){window.ShadyCSS&&window.ShadyCSS.styleDocument(a)}; Polymer.version="3.4.1";Polymer.ArraySplice={calculateSplices:oDa};Polymer.html=tF;Polymer.htmlLiteral=function(a,b){for(var c=[],d=1;d=b.left&&c<=b.right&&a>=b.top&&a<=b.bottom)}return!1} var RDa=null,LF=null,VDa=0,WDa=0,XDa=-1,YDa=!1;function ZDa(a,b,c){a.movefn=b;a.upfn=c;document.addEventListener("mousemove",b);document.addEventListener("mouseup",c)} function MF(a){document.removeEventListener("mousemove",a.movefn);document.removeEventListener("mouseup",a.upfn);a.movefn=null;a.upfn=null} document.addEventListener("touchend",function(a){LF||TDa(!0);RDa=JF(a)[0];LF=GF(LF,IE.after(2500),function(){TDa();LF=RDa=null})},LDa?{passive:!0}:!1); var JF=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:function(a){return a.composedPath&&a.composedPath()||[]},NF={},OF=[]; function $Da(a,b){for(var c=document.elementFromPoint(a,b),d=c;d&&d.shadowRoot&&!window.ShadyDOM;){var f=d;d=d.shadowRoot.elementFromPoint(a,b);if(f===d)break;d&&(c=d)}return c} function _findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a){var b=JF(a);return 0f:"pan-y"===c&&(d=f>b));d?a.preventDefault(): PF("track")}} function QF(a,b,c){return NF[b]?(_add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1} function aEa(a,b,c){return NF[b]?(_remove$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c),!0):!1} function _add$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(a,b,c){var d=NF[b],f=d.deps,h=d.name,l=a.__polymerGestures;l||(a.__polymerGestures=l={});for(var m=0,n,r;m=d&&25>=f||UDa(b))||a.prevent||_fire$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures(h,"tap",{x:b.clientX,y:b.clientY,sourceEvent:b,preventer:c})} ;var eEa=LE(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._addEventListenerToNode=function(c,d,f){QF(c,d,f)||a.prototype._addEventListenerToNode.call(this,c,d,f)}; b.prototype._removeEventListenerFromNode=function(c,d,f){aEa(c,d,f)||a.prototype._removeEventListenerFromNode.call(this,c,d,f)}; return b});function fEa(a,b,c,d,f){var h;f&&(h="object"===typeof c&&null!==c)&&(d=a.__dataTemp[b]);d=d!==c&&(d===d||c===c);h&&d&&(a.__dataTemp[b]=c);return d} var UF=LE(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._shouldPropertyChange=function(c,d,f){return fEa(this,c,d,f,!0)}; return b}),gEa=LE(function(a){var b=function(){return a.apply(this,arguments)||this}; p(b,a);b.prototype._shouldPropertyChange=function(c,d,f){return fEa(this,c,d,f,this.mutableData)}; g.Object.defineProperties(b,{properties:{configurable:!0,enumerable:!0,get:function(){return{mutableData:Boolean}}}}); return b}); UF._mutablePropertyChange=fEa;var hEa=!1;function iEa(){if(ad&&!Sc){if(!hEa){hEa=!0;var a=document.createElement("style");a.textContent="dom-bind,dom-if,dom-repeat{display:none;}";document.head.appendChild(a)}return!0}return!1} ;var jEa=eEa(gEa(oF(HTMLElement))),VF=function(){var a=jEa.call(this)||this;if(Zc)throw Error("strictTemplatePolicy: dom-bind not allowed");a.root=null;a.$=null;a.__children=null;return a}; p(VF,jEa);e=VF.prototype;e.attributeChangedCallback=function(){this.mutableData=!0}; e.connectedCallback=function(){iEa()||(this.style.display="none");this.render()}; e.disconnectedCallback=function(){this.__removeChildren()}; e.__insertChildren=function(){ME(ME(this).parentNode).insertBefore(this.root,this)}; e.__removeChildren=function(){if(this.__children)for(var a=0;a child")}); c.observe(this,{childList:!0});return}this.root=this._stampTemplate(b);this.$=this.root.$;this.__children=[];for(var d=this.root.firstChild;d;d=d.nextSibling)this.__children[this.__children.length]=d;this._enableProperties()}this.__insertChildren();this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}; g.Object.defineProperties(VF,{observedAttributes:{configurable:!0,enumerable:!0,get:function(){return["mutable-data"]}}}); customElements.define("dom-bind",VF);Polymer.Debouncer=EF;Polymer.Gestures={gestures:NF,recognizers:OF,deepTargetFind:$Da,addListener:QF,removeListener:aEa,register:SF,setTouchAction:RF,prevent:PF,resetMouseCanceller:function(){LF&&LF.flush()}, findOriginalTarget:_findOriginalTarget$$module$third_party$javascript$polymer$v2$polymer$lib$utils$gestures,add:QF,remove:aEa};Polymer.GestureEventListeners=eEa;Polymer.MutableData=UF;Polymer.OptionalMutableData=gEa;Polymer.DomBind=VF;var WF=function(){do{var a=window.ShadyDOM&&ShadyDOM.flush();window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush();var b=HDa()}while(a||b)};var kEa=null;function lEa(){return kEa} lEa.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:lEa,writable:!0}});var mEa=oF(lEa),nEa=UF(mEa);function oEa(a,b){kEa=a;Object.setPrototypeOf(a,b.prototype);new b;kEa=null} var pEa=oF(function(){}); function qEa(a,b){for(var c=0;c can only be templatized once");a.__templatizeOwner=b;var d=(b?b.constructor:XF)._parseTemplate(a),f=d.templatizeInstanceClass;f||(f=tEa(a,d,c),d.templatizeInstanceClass=f);var h=sEa(a);vEa(a,d,c,h);c=function(){return f.apply(this,arguments)||this}; p(c,f);c.prototype._methodHost=h;c.prototype.__dataHost=a;c.prototype.__templatizeOwner=b;c.prototype.__hostProps=d.hostProps;return c} function xEa(a,b,c){c=c.constructor._properties;a=a.propertyEffects;b=b.instanceProps;for(var d in a)if(!(c[d]||b&&b[d]))for(var f=a[d],h=0;h child")}); c.observe(this,{childList:!0});return!1}this.__template=b}return!0}; e.__ensureInstance=function(){var a=ME(this).parentNode;if(this.__hasInstance()){var b=this.__getInstanceNodes();if(b&&b.length&&ME(this).previousSibling!==b[b.length-1])for(var c=0,d=void 0;c child")}); c.observe(this,{childList:!0});return!1}var d={};d[this.as]=!0;d[this.indexAs]=!0;d[this.itemsIndexAs]=!0;this.__ctor=YF(b,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:d,forwardHostProp:function(f,h){for(var l=this.__instances,m=0,n=void 0;m=f;a--)this.__detachAndRemoveInstance(a)}; e.__detachInstance=function(a){a=this.__instances[a];for(var b=ME(a.root),c=0;cd?c:c.substring(0,d);if(a==parseInt(a,10)){c=0>d?"":c.substring(d+1);this.__handleObservedPaths(c);if(a=this.__instances[this.__itemsIdxToInstIdx[a]])a._setPendingPropertyOrPath(this.as+(c?"."+c:""),b,!1,!0),a._flushProperties();return!0}}; e.itemForElement=function(a){return(a=this.modelForElement(a))&&a[this.as]}; e.indexForElement=function(a){return(a=this.modelForElement(a))&&a[this.indexAs]}; e.modelForElement=function(a){return AEa(this.template,a)}; g.Object.defineProperties(aG,{is:{configurable:!0,enumerable:!0,get:function(){return"dom-repeat"}}, template:{configurable:!0,enumerable:!0,get:function(){return null}}, properties:{configurable:!0,enumerable:!0,get:function(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!hd,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number, computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}}, observers:{configurable:!0,enumerable:!0,get:function(){return["__itemsChanged(items.*)"]}}}); aG.prototype._setRenderedItemCount=function(){}; customElements.define(aG.is,aG);Polymer.DomRepeat=aG;function bG(a){return"slot"===a.localName} var cG=function(a,b){var c=this;this._nativeChildrenObserver=this._shadyChildrenObserver=null;this._connected=!1;this._target=a;this.callback=b;this._effectiveNodes=[];this._observer=null;this._scheduled=!1;this._boundSchedule=function(){c._schedule()}; this.connect();this._schedule()}; cG.getFlattenedNodes=function(a){var b=ME(a);return bG(a)?b.assignedNodes({flatten:!0}):Array.from(b.childNodes).map(function(c){return bG(c)?ME(c).assignedNodes({flatten:!0}):[c]}).reduce(function(c,d){return c.concat(d)},[])}; e=cG.prototype;e.connect=function(){var a=this;bG(this._target)?this._listenSlots([this._target]):ME(this._target).children&&(this._listenSlots(ME(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,function(b){a._processMutations(b)}):(this._nativeChildrenObserver=new MutationObserver(function(b){a._processMutations(b)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))); this._connected=!0}; e.disconnect=function(){bG(this._target)?this._unlistenSlots([this._target]):ME(this._target).children&&(this._unlistenSlots(ME(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null));this._connected=!1}; e._schedule=function(){var a=this;this._scheduled||(this._scheduled=!0,KE.run(function(){return a.flush()}))}; e._processMutations=function(a){this._processSlotMutations(a);this.flush()}; e._processSlotMutations=function(a){if(a)for(var b=0;b *")}; var yFa=function(a,b,c){b=b.replace(tDa,function(d,f,h,l){return a._produceCssProperties(d,f,h,l,c)}); return a._consumeCssProperties(b,c)}; e=sG.prototype;e._getInitialValueForProperty=function(a){this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement));return window.getComputedStyle(this._measureElement).getPropertyValue(a)}; e._fallbacksFromPreviousRules=function(a){for(var b=this,c=a;c.parent;)c=c.parent;var d={},f=!1;qG(c,function(h){(f=f||h===a)||h.selector===a.selector&&Object.assign(d,b._cssTextToMap(h.parsedCssText))}); return d}; e._consumeCssProperties=function(a,b){for(var c;c=wF.exec(a);){var d=c[0],f=c[1];c=c.index;var h=c+d.indexOf("@apply");h=a.slice(0,h);a=a.slice(c+d.length);d=b?this._fallbacksFromPreviousRules(b):{};Object.assign(d,this._cssTextToMap(h));f=this._atApplyToCssProperties(f,d);a=""+h+f+a;wF.lastIndex=c+f.length}return a}; e._atApplyToCssProperties=function(a,b){a=a.replace(uFa,"");var c=[],d=this._map.get(a);d||(this._map.set(a,{}),d=this._map.get(a));if(d){this._currentElement&&(d.dependants[this._currentElement]=!0);var f,h=d.properties;for(f in h){var l=b&&b[f];d=[f,": var(",a,"_-_",f];l&&d.push(",",l.replace(wFa,""));d.push(")");wFa.test(h[f])&&d.push(" !important");c.push(d.join(""))}}return c.join("; ")}; e._replaceInitialOrInherit=function(a,b){var c=vFa.exec(b);c&&(b=c[1]?this._getInitialValueForProperty(a):"apply-shim-inherit");return b}; e._cssTextToMap=function(a,b){b=void 0===b?!1:b;a=a.split(";");for(var c,d,f={},h=0;hf?KE.cancel(~f):IE.cancel(f)}; a.prototype.create=function(f,h){f=document.createElement(f);if(h)if(f.setProperties)f.setProperties(h);else for(var l in h)f[l]=h[l];return f}; a.prototype.elementMatches=function(f,h){return FEa(h||this,f)}; a.prototype.toggleAttribute=function(f,h){var l=this;3===arguments.length&&(l=arguments[2]);1==arguments.length&&(h=!l.hasAttribute(f));if(h)return ME(l).setAttribute(f,""),!0;ME(l).removeAttribute(f);return!1}; a.prototype.toggleClass=function(f,h,l){l=l||this;1==arguments.length&&(h=!l.classList.contains(f));h?l.classList.add(f):l.classList.remove(f)}; a.prototype.transform=function(f,h){h=h||this;h.style.webkitTransform=f;h.style.transform=f}; a.prototype.translate3d=function(f,h,l,m){this.transform("translate3d("+f+","+h+","+l+")",m||this)}; a.prototype.arrayDelete=function(f,h){if(Array.isArray(f)){if(h=f.indexOf(h),0<=h)return f.splice(h,1)}else if(h=eF(this,f).indexOf(h),0<=h)return this.splice(f,h,1);return null}; a.prototype._logger=function(f,h){Array.isArray(h)&&1===h.length&&Array.isArray(h[0])&&(h=h[0]);switch(f){case"log":case"warn":case"error":console[f].apply(console,ha(h));}}; a.prototype._log=function(f){for(var h=[],l=0;lb.indexOf(f)&&(!c||0>c.indexOf(f))&&b.unshift(f):console.warn("behavior is null, check for missing or 404 import")}return b} function JFa(a,b){for(var c in b){var d=a[c],f=b[c];a[c]=!("value"in f)&&d&&"value"in d?Object.assign({value:d.value},f):f}} var KFa=wG(HTMLElement);function LFa(a,b,c){var d={},f=function(){return b.apply(this,arguments)||this}; p(f,b);f._finalizeClass=function(){if(this.hasOwnProperty("generatedFrom")){if(l)for(var n=0,r;nb?"#"+(16777216|c).toString(16).substr(1):"#"+c.toString(16)},YFa=/^#(?:[0-9a-f]{3}){1,2}$/i;var BG=function(a,b,c){if(isNaN(a)||0>a||255b||255c||255=this.compareBrowserRangeEndpoints(a,1,0):0<=this.compareBrowserRangeEndpoints(a,0,0)&&0>=this.compareBrowserRangeEndpoints(a,1,1)}catch(c){if(!se)throw c;return!1}}; HG.prototype.containsNode=function(a,b){return this.containsRange(IG(a),b)}; HG.prototype.getHtmlFragment=function(){var a=new ZFa;sj(this,function(b,c,d){3==b.nodeType?a.append(Dc(b.nodeValue.substring(d.getStartTextOffset(),d.getEndTextOffset()))):1==b.nodeType&&(-1==d.tagType?og(b)&&a.append(""):(c=b.cloneNode(!1),c=Dg(c),se&&"LI"==b.tagName?a.append(c):(b=c.lastIndexOf("<"),a.append(b?c.substr(0,b):c))))},this); return a.toString()}; HG.prototype.__iterator__=function(){return new GG(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())};var JG=function(a){this.range_=a}; u(JG,HG);var LG=function(a){var b=Zf(a).createRange();if(3==a.nodeType)b.setStart(a,0),b.setEnd(a,a.length);else if(KG(a)){for(var c,d=a;(c=d.firstChild)&&KG(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&KG(c);)d=c;b.setEnd(d,1==d.nodeType?d.childNodes.length:d.length)}else c=a.parentNode,a=db(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);return b},MG=function(a,b,c,d){var f=Zf(a).createRange(); f.setStart(a,b);f.setEnd(c,d);return f}; e=JG.prototype;e.clone=function(){return new this.constructor(this.range_.cloneRange())}; e.getContainer=function(){return this.range_.commonAncestorContainer}; e.getStartNode=function(){return this.range_.startContainer}; e.getStartOffset=function(){return this.range_.startOffset}; e.getEndNode=function(){return this.range_.endContainer}; e.getEndOffset=function(){return this.range_.endOffset}; e.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareBoundaryPoints(1==c?1==b?t.Range.START_TO_START:t.Range.START_TO_END:1==b?t.Range.END_TO_START:t.Range.END_TO_END,a)}; e.isCollapsed=function(){return this.range_.collapsed}; e.getText=function(){return this.range_.toString()}; e.getValidHtml=function(){var a=$f(this.range_.startContainer).createDom("DIV");a.appendChild(this.range_.cloneContents());a=a.innerHTML;if(Nb(a,"<")||!this.isCollapsed()&&!Rb(a,"<"))return a;var b=this.getContainer();b=1==b.nodeType?b:b.parentNode;return Dg(b.cloneNode(!1)).replace(">",">"+a)}; e.select=function(a){var b=kg(Zf(this.getStartNode()));this.selectInternal(b.getSelection(),a)}; e.selectInternal=function(a){a.removeAllRanges();a.addRange(this.range_)}; e.removeContents=function(){var a=this.range_;a.extractContents();if(a.startContainer.hasChildNodes()){var b=a.startContainer.childNodes[a.startOffset];if(b){var c=b.previousSibling;""==Jg(b)&&sg(b);c&&""==Jg(c)&&sg(c)}}if(ue){b=this.getStartNode();c=this.getStartOffset();var d=this.getEndNode(),f=this.getEndOffset(),h=b.nextSibling;b==d&&b.parentNode&&3==b.nodeType&&h&&3==h.nodeType&&(b.nodeValue+=h.nodeValue,sg(h),a.setStart(b,c),a.setEnd(d,f))}}; e.surroundContents=function(a){this.range_.surroundContents(a);return a}; e.insertNode=function(a,b){var c=this.range_.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a}; e.surroundWithNodes=function(a,b){var c=kg(Zf(this.getStartNode()));if(c=NG(c))var d=c.getStartNode(),f=c.getEndNode(),h=c.getStartOffset(),l=c.getEndOffset();var m=this.range_.cloneRange(),n=this.range_.cloneRange();m.collapse(!1);n.collapse(!0);m.insertNode(b);n.insertNode(a);m.detach();n.detach();if(c){if(3==d.nodeType)for(;h>d.length;){h-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(3==f.nodeType)for(;l>f.length;){l-=f.length;do f=f.nextSibling;while(f==a||f==b)}OG(d,h,f,l).select()}}; e.collapse=function(a){this.range_.collapse(a)};var PG=function(a){this.range_=a}; u(PG,JG);PG.prototype.selectInternal=function(a,b){!b||this.isCollapsed()?PG.superClass_.selectInternal.call(this,a,b):(a.collapse(this.getEndNode(),this.getEndOffset()),a.extend(this.getStartNode(),this.getStartOffset()))};var QG=function(a,b){this.endNode_=this.startNode_=this.parentNode_=null;this.endOffset_=this.startOffset_=-1;this.range_=a;this.doc_=b}; u(QG,HG);var RG=function(a){var b=Zf(a).body.createTextRange();if(1==a.nodeType)b.moveToElementText(a),KG(a)&&!a.childNodes.length&&b.collapse(!1);else{for(var c=0,d=a;d=d.previousSibling;){var f=d.nodeType;if(3==f)c+=d.length;else if(1==f){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b}; QG.prototype.clone=function(){var a=new QG(this.range_.duplicate(),this.doc_);a.parentNode_=this.parentNode_;a.startNode_=this.startNode_;a.endNode_=this.endNode_;return a}; QG.prototype.getBrowserRange=function(){return this.range_}; QG.prototype.clearCachedValues_=function(){this.parentNode_=this.startNode_=this.endNode_=null;this.startOffset_=this.endOffset_=-1}; QG.prototype.getContainer=function(){if(!this.parentNode_){var a=this.range_.text,b=this.range_.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&0c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;1==c.childNodes.length&&c.innerText==aGa(c.firstChild)&&KG(c.firstChild);)c=c.firstChild;0==a.length&&(c=bGa(this,c));this.parentNode_= c}return this.parentNode_}; var bGa=function(a,b){for(var c=b.childNodes,d=0,f=c.length;d=a.compareBrowserRangeEndpoints(l,1,0):a.range_.inRange(l))return bGa(a,h)}}return b}; e=QG.prototype;e.getStartNode=function(){this.startNode_||(this.startNode_=SG(this,1),this.isCollapsed()&&(this.endNode_=this.startNode_));return this.startNode_}; e.getStartOffset=function(){0>this.startOffset_&&(this.startOffset_=cGa(this,1),this.isCollapsed()&&(this.endOffset_=this.startOffset_));return this.startOffset_}; e.getEndNode=function(){if(this.isCollapsed())return this.getStartNode();this.endNode_||(this.endNode_=SG(this,0));return this.endNode_}; e.getEndOffset=function(){if(this.isCollapsed())return this.getStartOffset();0>this.endOffset_&&(this.endOffset_=cGa(this,0),this.isCollapsed()&&(this.startOffset_=this.endOffset_));return this.endOffset_}; e.compareBrowserRangeEndpoints=function(a,b,c){return this.range_.compareEndPoints((1==b?"Start":"End")+"To"+(1==c?"Start":"End"),a)}; var SG=function(a,b,c){c=c||a.getContainer();if(!c||!c.firstChild)return c;for(var d=1==b,f=0,h=c.childNodes.length;fa.compareBrowserRangeEndpoints(r,1, 0)&&0"+a+"";else if(a.match(/^\s*";else if(a.match(/^\s*";else if(a.match(/^\s*"+a+""}return a}; e.__iterator__=function(){return new GG(this.getStartNode(),this.getStartOffset(),this.getEndNode(),this.getEndOffset())}; e.select=function(){$G(this).select(this.isReversed_)}; e.removeContents=function(){$G(this).removeContents();this.clearCachedValues_()}; e.surroundContents=function(a){a=$G(this).surroundContents(a);this.clearCachedValues_();return a}; e.insertNode=function(a,b){a=$G(this).insertNode(a,b);this.clearCachedValues_();return a}; e.surroundWithNodes=function(a,b){$G(this).surroundWithNodes(a,b);this.clearCachedValues_()}; e.saveUsingDom=function(){return new bH(this)}; e.saveUsingCarets=function(){return this.getStartNode()&&this.getEndNode()?new WG(this):null}; e.collapse=function(a){a=this.isReversed()?!a:a;this.browserRangeWrapper_&&this.browserRangeWrapper_.collapse(a);a?(this.endNode_=this.startNode_,this.endOffset_=this.startOffset_):(this.startNode_=this.endNode_,this.startOffset_=this.endOffset_);this.isReversed_=!1}; var bH=function(a){Rg.call(this);this.anchorNode_=a.isReversed()?a.getEndNode():a.getStartNode();this.anchorOffset_=a.isReversed()?a.getEndOffset():a.getStartOffset();this.focusNode_=a.isReversed()?a.getStartNode():a.getEndNode();this.focusOffset_=a.isReversed()?a.getStartOffset():a.getEndOffset()}; u(bH,VG);bH.prototype.restoreInternal=function(){return OG(this.anchorNode_,this.anchorOffset_,this.focusNode_,this.focusOffset_)}; bH.prototype.disposeInternal=function(){bH.superClass_.disposeInternal.call(this);this.focusNode_=this.anchorNode_=null};var cH=function(){}; u(cH,DG);cH.prototype.containsRange=function(a,b){var c=EG(this);a=EG(a);return(b?jb:kb)(a,function(d){return jb(c,function(f){return f.containsRange(d,b)})})}; cH.prototype.containsNode=function(a,b){return this.containsRange(ZG(a),b)}; cH.prototype.insertNode=function(a,b){b?qg(a,this.getStartNode()):rg(a,this.getEndNode());return a}; cH.prototype.surroundWithNodes=function(a,b){this.insertNode(a,!0);this.insertNode(b,!1)};var dH=function(){this.sortedElements_=this.elements_=this.range_=null}; u(dH,cH);var lGa=function(a){var b=new dH;b.range_=a;return b},mGa=function(a){for(var b=Zf(arguments[0]).body.createControlRange(),c=0,d=arguments.length;cb.right){var f=this.currDragItem_.getBoundingClientRect();this.dragger_.deltaX=d-(d-f.left)/f.width*b.width}c=JD(this.dragger_,c);c>b.bottom&&(this.dragger_.deltaY+=c-b.bottom)}this.draggerEl_.style.visibility="";this.updateWhileDragging_&&(this.currDragItem_.style.display="none");EGa(this,this.currDragItem_);this.currDragItem_.style.display="";vi(this.dragger_,"drag",this.handleDragMove_,!1,this);this.dispatchEvent(new pH(uGa, this,a.browserEvent,this.currDragItem_,this.draggerEl_,this.dragger_))}else a.preventDefault(),this.cleanup_()}; e.handleDragMove_=function(a){var b=yh(this.draggerEl_);b=new Vf(b.x+this.draggerEl_.halfWidth,b.y+this.draggerEl_.halfHeight);a:{var c=null;if("none"!=this.currDragItem_.style.display){c=this.currDragItem_.parentNode;var d=Ch(c);if(FGa(b,d))break a}d=0;for(var f=this.dragLists_.length;dh?null:n}else l=null;if(!this.dispatchEvent(new pH(vGa,this,a,this.currDragItem_,this.draggerEl_,this.dragger_, b,c,l)))return!1;if(c&&1!=c.dlgDragPermission)this.updateWhileDragging_?this.currDragItem_.parentNode==c&&vg(this.currDragItem_)==l||c.insertBefore(this.currDragItem_,l):l&&(this.currHoverItem_=l),this.currDragItem_.style.display="",c.dlgDragHoverClass_&&lj(c,c.dlgDragHoverClass_);else for(this.isCurrDragItemAlwaysDisplayed_||(this.currDragItem_.style.display="none"),m=0,r=this.dragLists_.length;mb.left&&a.xb.top&&a.yb},pH=function(a,b,c,d,f,h,l,m,n){li.call(this,a); this.dragListGroup=b;this.event=c;this.currDragItem=d;this.draggerEl=f;this.dragger=h;this.draggerElCenter=l;this.hoverList=m;this.hoverNextItem=n}; u(pH,li);var qH=function(a,b,c){Rg.call(this);this.constrainScroll_=!1;this.horizontalScrolling_=!0;this.containerNode_=a;this.scrollTimer_=new $i(50);this.eventHandler_=new Pq(this);this.scrollDelta_=new Vf;this.containerBounds_=Ch(a);if("BODY"===a.tagName||"HTML"===a.tagName)a=gg(),this.containerBounds_.height=a.height,this.containerBounds_.width=a.width;this.margin_=b||0;if(b){if(b=this.containerBounds_.clone(),a=this.margin_){var d=Math.min(a,.25*b.height);b.top+=d;b.height-=2*d;a=Math.min(a,.25*b.width); b.left+=a;b.width-=2*a}}else b=this.containerBounds_;this.scrollBounds_=b;c||this.eventHandler_.listen(Zf(this.containerNode_),"mousemove",this.onMouseMove);this.eventHandler_.listen(this.scrollTimer_,"tick",this.onTick_)}; u(qH,Rg);qH.prototype.onTick_=function(){this.containerNode_.scrollTop+=this.scrollDelta_.y;this.containerNode_.scrollLeft+=this.scrollDelta_.x}; qH.prototype.onMouseMove=function(a){var b=this.horizontalScrolling_?MGa(a.clientX,this.scrollBounds_.left,this.scrollBounds_.width):0,c=MGa(a.clientY,this.scrollBounds_.top,this.scrollBounds_.height);this.scrollDelta_.x=b;this.scrollDelta_.y=c;!(b=!b&&!c)&&(b=this.constrainScroll_)&&(b=a.clientX,a=a.clientY,c=this.containerBounds_,b=!(c.left<=b&&c.left+c.width>=b&&c.top<=a&&c.top+c.height>=a));b?this.scrollTimer_.stop():this.scrollTimer_.enabled||this.scrollTimer_.start()}; var MGa=function(a,b,c){var d=0;ab+c&&(d=8);return d}; qH.prototype.disposeInternal=function(){qH.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.scrollTimer_.dispose()};var NGa={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0K"},1E4:{other:"00K"},1E5:{other:"000K"},1E6:{other:"0M"},1E7:{other:"00M"},1E8:{other:"000M"},1E9:{other:"0B"},1E10:{other:"00B"},1E11:{other:"000B"},1E12:{other:"0T"},1E13:{other:"00T"},1E14:{other:"000T"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 thousand"},1E4:{other:"00 thousand"},1E5:{other:"000 thousand"},1E6:{other:"0 million"},1E7:{other:"00 million"},1E8:{other:"000 million"},1E9:{other:"0 billion"},1E10:{other:"00 billion"},1E11:{other:"000 billion"}, 1E12:{other:"0 trillion"},1E13:{other:"00 trillion"},1E14:{other:"000 trillion"}}},rH=NGa;rH=NGa;var OGa=!1,QGa=function(){if(!OGa){for(var a in PGa)sH[a]=PGa[a];OGa=!0}},sH={AED:[2, "dh","\u062F.\u0625."],ALL:[0,"Lek","Lek"],AUD:[2,"$","AU$"],BDT:[2,"\u09F3","Tk"],BGN:[2,"lev","lev"],BRL:[2,"R$","R$"],CAD:[2,"$","C$"],CDF:[2,"FrCD","CDF"],CHF:[2,"CHF","CHF"],CLP:[0,"$","CL$"],CNY:[2,"\xA5","RMB\xA5"],COP:[32,"$","COL$"],CRC:[0,"\u20A1","CR\u20A1"],CZK:[50,"K\u010D","K\u010D"],DKK:[50,"kr.","kr."],DOP:[2,"RD$","RD$"],EGP:[2,"\xA3","LE"],ETB:[2,"Birr","Birr"],EUR:[2,"\u20AC","\u20AC"],GBP:[2,"\xA3","GB\xA3"],HKD:[2,"$","HK$"],HRK:[2,"kn","kn"],HUF:[34,"Ft","Ft"],IDR:[0, "Rp","Rp"],ILS:[34,"\u20AA","IL\u20AA"],INR:[2,"\u20B9","Rs"],IRR:[0,"Rial","IRR"],ISK:[0,"kr","kr"],JMD:[2,"$","JA$"],JPY:[0,"\xA5","JP\xA5"],KRW:[0,"\u20A9","KR\u20A9"],LKR:[2,"Rs","SLRs"],LTL:[2,"Lt","Lt"],MNT:[0,"\u20AE","MN\u20AE"],MVR:[2,"Rf","MVR"],MXN:[2,"$","Mex$"],MYR:[2,"RM","RM"],NOK:[50,"kr","NOkr"],PAB:[2,"B/.","B/."],PEN:[2,"S/.","S/."],PHP:[2,"\u20B1","PHP"],PKR:[0,"Rs","PKRs."],PLN:[50,"z\u0142","z\u0142"],RON:[2,"RON","RON"],RSD:[0,"din","RSD"],RUB:[50,"\u20BD","RUB"],SAR:[2, "Rial","Rial"],SEK:[50,"kr","kr"],SGD:[2,"$","S$"],THB:[2,"\u0E3F","THB"],TRY:[2,"\u20BA","TRY"],TWD:[2,"$","NT$"],TZS:[0,"TSh","TSh"],UAH:[2,"\u0433\u0440\u043D.","UAH"],USD:[2,"$","US$"],UYU:[2,"$","$U"],VND:[48,"\u20AB","VN\u20AB"],YER:[0,"Rial","Rial"],ZAR:[2,"R","ZAR"]},PGa={AFN:[48,"Af.","AFN"],AMD:[32,"Dram","dram"],ANG:[2,"NAf.","ANG"],AOA:[2,"Kz","Kz"],ARS:[34,"$","AR$"],AWG:[2,"Afl.","Afl."],AZN:[34,"\u20BC","AZN"],BAM:[2,"KM","KM"],BBD:[2,"$","Bds$"],BHD:[3,"din","din"],BIF:[0,"FBu","FBu"], BMD:[2,"$","BD$"],BND:[2,"$","B$"],BOB:[2,"Bs","Bs"],BSD:[2,"$","BS$"],BTN:[2,"Nu.","Nu."],BWP:[2,"P","pula"],BYN:[50,"\u0440.","BYN"],BYR:[48,"\u0440.","BYR"],BZD:[2,"$","BZ$"],CLF:[4,"UF","CLF"],CNH:[2,"\xA5","RMB\xA5"],CUC:[1,"$","CUC$"],CUP:[2,"$","CU$"],CVE:[2,"CVE","Esc"],DJF:[0,"Fdj","Fdj"],DZD:[2,"din","din"],ERN:[2,"Nfk","Nfk"],FJD:[2,"$","FJ$"],FKP:[2,"\xA3","FK\xA3"],GEL:[2,"GEL","GEL"],GHS:[2,"GHS","GHS"],GIP:[2,"\xA3","GI\xA3"],GMD:[2,"GMD","GMD"],GNF:[0,"FG","FG"],GTQ:[2, "Q","GTQ"],GYD:[0,"$","GY$"],HNL:[2,"L","HNL"],HTG:[2,"HTG","HTG"],IQD:[0,"din","IQD"],JOD:[3,"din","JOD"],KES:[2,"Ksh","Ksh"],KGS:[2,"KGS","KGS"],KHR:[2,"Riel","KHR"],KMF:[0,"CF","KMF"],KPW:[0,"\u20A9KP","KPW"],KWD:[3,"din","KWD"],KYD:[2,"$","KY$"],KZT:[2,"\u20B8","KZT"],LAK:[0,"\u20AD","\u20AD"],LBP:[0,"L\xA3","LBP"],LRD:[2,"$","L$"],LSL:[2,"LSL","LSL"],LYD:[3,"din","LD"],MAD:[2,"dh","MAD"],MDL:[2,"MDL","MDL"],MGA:[0,"Ar","MGA"],MKD:[2,"din","MKD"],MMK:[0,"K","MMK"],MOP:[2,"MOP","MOP$"],MRO:[0, "MRO","MRO"],MUR:[0,"MURs","MURs"],MWK:[2,"MWK","MWK"],MZN:[2,"MTn","MTn"],NAD:[2,"$","N$"],NGN:[2,"\u20A6","NG\u20A6"],NIO:[2,"C$","C$"],NPR:[2,"Rs","NPRs"],NZD:[2,"$","NZ$"],OMR:[3,"Rial","OMR"],PGK:[2,"PGK","PGK"],PYG:[16,"Gs.","PYG"],QAR:[2,"Rial","QR"],RWF:[0,"RF","RF"],SBD:[2,"$","SI$"],SCR:[2,"SCR","SCR"],SDG:[2,"SDG","SDG"],SHP:[2,"\xA3","SH\xA3"],SLL:[0,"SLL","SLL"],SOS:[0,"SOS","SOS"],SRD:[2,"$","SR$"],SSP:[2,"\xA3","SSP"],STD:[0,"Db","Db"],SYP:[0,"\xA3","SY\xA3"],SZL:[2,"SZL", "SZL"],TJS:[2,"Som","TJS"],TMT:[50,"m","TMT"],TND:[3,"din","DT"],TOP:[2,"T$","T$"],TTD:[2,"$","TT$"],UGX:[0,"UGX","UGX"],UZS:[0,"so\u02BCm","UZS"],VEF:[2,"Bs","Bs"],VES:[2,"Bs","Bs"],VUV:[0,"VUV","VUV"],WST:[2,"WST","WST"],XAF:[0,"FCFA","FCFA"],XCD:[2,"$","EC$"],XOF:[0,"CFA","CFA"],XPF:[48,"FCFP","FCFP"],ZMW:[0,"ZMW","ZMW"],ZWD:[0,"$","Z$"]};var tH=function(){},uH=function(a){if("number"==typeof a){var b=new tH; b.standardOffset_=a;var c=a;if(0==c)c="Etc/GMT";else{var d=["Etc/GMT",0>c?"-":"+"];c=Math.abs(c);d.push(Math.floor(c/60)%100);c%=60;0!=c&&d.push(":",Hc(c,2));c=d.join("")}b.timeZoneId_=c;c=RGa(a);a=SGa(a);b.tzNames_=[c,c];b.tzNamesExt_={STD_LONG_NAME_GMT:a,STD_GENERIC_LOCATION:a};b.transitions_=[];return b}b=new tH;b.timeZoneId_=a.id;b.standardOffset_=-a.std_offset;b.tzNames_=a.names;b.tzNamesExt_=a.names_ext;b.transitions_=a.transitions;return b},SGa=function(a){var b=["GMT"]; b.push(0>=a?"+":"-");a=Math.abs(a);b.push(Hc(Math.floor(a/60)%100,2),":",Hc(a%60,2));return b.join("")},RGa=function(a){if(0==a)return"UTC"; var b=["UTC",0>a?"+":"-"];a=Math.abs(a);b.push(Math.floor(a/60)%100);a%=60;0!=a&&b.push(":",a);return b.join("")}; tH.prototype.getTimeZoneData=function(){return{id:this.timeZoneId_,std_offset:-this.standardOffset_,names:rb(this.tzNames_),names_ext:y.clone(this.tzNamesExt_),transitions:rb(this.transitions_)}}; var vH=function(a,b){b=Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes())/36E5;for(var c=0;c=a.transitions_[c];)c+=2;return 0==c?0:a.transitions_[c-1]}; tH.prototype.getUTCString=function(a){return RGa(this.standardOffset_-vH(this,a))}; tH.prototype.getLongNameGMT=function(a){return 0a)var b=this.dateTimeSymbols_.DATEFORMATS[a];else if(8>a)b=this.dateTimeSymbols_.TIMEFORMATS[a-4];else if(12>a)b=this.dateTimeSymbols_.DATETIMEFORMATS[a-8],b=b.replace("{1}",this.dateTimeSymbols_.DATEFORMATS[a-8]),b=b.replace("{0}",this.dateTimeSymbols_.TIMEFORMATS[a-8]);else{this.applyStandardPattern_(10);return}this.applyPattern_(b)}; var yH=function(a,b){b=String(b);a=a.dateTimeSymbols_||MA;if(void 0!==a.ZERODIGIT&&!WGa){for(var c=[],d=0;d=f?String.fromCharCode(a.ZERODIGIT+f-48):b.charAt(d))}b=c.join("")}return b},WGa=!1,UGa=!1,zH=function(a){if(!(a.getHours&&a.getSeconds&&a.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields."); },VGa=function(a,b,c,d,f,h){var l=b.length; switch(b.charAt(0)){case"G":return c=0c&&(c=-c),2==l&&(c%=100),yH(a,Hc(c,l));case"Y":return c=new Date(OA(d.getFullYear(),d.getMonth(),d.getDate(),a.dateTimeSymbols_.FIRSTWEEKCUTOFFDAY,a.dateTimeSymbols_.FIRSTDAYOFWEEK)).getFullYear(),0>c&&(c=-c),2==l&&(c%=100),yH(a,Hc(c,l));case"M":a:switch(c=d.getMonth(),l){case 5:l=a.dateTimeSymbols_.NARROWMONTHS[c];break a;case 4:l=a.dateTimeSymbols_.MONTHS[c]; break a;case 3:l=a.dateTimeSymbols_.SHORTMONTHS[c];break a;default:l=yH(a,Hc(c+1,l));}return l;case"k":return zH(f),yH(a,Hc(xH(f)||24,l));case"S":return yH(a,(f.getMilliseconds()/1E3).toFixed(Math.min(3,l)).substr(2)+(3l?1:0];case"h":return zH(f),yH(a,Hc(xH(f)%12||12,l));case"K":return zH(f),yH(a,Hc(xH(f)%12,l)); case"H":return zH(f),yH(a,Hc(xH(f),l));case"c":a:switch(c=d.getDay(),l){case 5:l=a.dateTimeSymbols_.STANDALONENARROWWEEKDAYS[c];break a;case 4:l=a.dateTimeSymbols_.STANDALONEWEEKDAYS[c];break a;case 3:l=a.dateTimeSymbols_.STANDALONESHORTWEEKDAYS[c];break a;default:l=yH(a,Hc(c,1));}return l;case"L":a:switch(c=d.getMonth(),l){case 5:l=a.dateTimeSymbols_.STANDALONENARROWMONTHS[c];break a;case 4:l=a.dateTimeSymbols_.STANDALONEMONTHS[c];break a;case 3:l=a.dateTimeSymbols_.STANDALONESHORTMONTHS[c];break a; default:l=yH(a,Hc(c+1,l));}return l;case"Q":return c=Math.floor(d.getMonth()/3),4>l?a.dateTimeSymbols_.SHORTQUARTERS[c]:a.dateTimeSymbols_.QUARTERS[c];case"d":return yH(a,Hc(d.getDate(),l));case"m":return zH(f),yH(a,Hc(f.getMinutes(),l));case"s":return zH(f),yH(a,Hc(f.getSeconds(),l));case"v":return l=h||uH(c.getTimezoneOffset()),l.timeZoneId_;case"V":return a=h||uH(c.getTimezoneOffset()),2>=l?a.timeZoneId_:0l?a.tzNames_[0l?(l=-(b.standardOffset_-vH(b,c)),a=[0>l?"-":"+"],l=Math.abs(l),a.push(Hc(Math.floor(l/60)%100,2),Hc(l%60,2)),l=a.join("")):l=yH(a,SGa(b.standardOffset_-vH(b,c))),l;default:return"";}};var AH=function(a){this.patternParts_=[];this.dateTimeSymbols_=MA;"number"==typeof a?this.applyStandardPattern_(a):this.applyPattern_(a)}; AH.prototype.applyPattern_=function(a){for(var b=!1,c="",d=0;da)var b=this.dateTimeSymbols_.DATEFORMATS[a];else 8>a?b=this.dateTimeSymbols_.TIMEFORMATS[a-4]:(b=this.dateTimeSymbols_.DATETIMEFORMATS[a-8],b=b.replace("{1}",this.dateTimeSymbols_.DATEFORMATS[a-8]),b=b.replace("{0}",this.dateTimeSymbols_.TIMEFORMATS[a-8]));this.applyPattern_(b)}; AH.prototype.parse=function(a,b,c){return YGa(this,a,b,c||0,!1)}; var YGa=function(a,b,c,d,f){for(var h=new ZGa,l=[d],m=-1,n=0,r=0,v=0;vm&&a.patternParts_[v].abutStart&&(m=v,n=d,r=0),0<=m){var z=a.patternParts_[v].count;if(v==m&&(z-=r,r++,0==z))return 0;$Ga(a,b,l,a.patternParts_[v],z,h)||(v=m-1,l[0]=n)}else{if(m=-1,!$Ga(a,b,l,a.patternParts_[v],0,h))return 0}}else{m=-1;if(" "==a.patternParts_[v].text.charAt(0)){if(z=l[0],aHa(b,l),l[0]>z)continue}else if(b.indexOf(a.patternParts_[v].text,l[0])==l[0]){l[0]+= a.patternParts_[v].text.length;continue}return 0}a:{if(null==c)throw Error("Parameter 'date' should not be null.");void 0!=h.era&&void 0!=h.year&&0==h.era&&0b?b:a));"function"===typeof c.setHours&&(void 0==h.hours&&(h.hours=c.getHours()),void 0!=h.ampm&&0h.hours&&(h.hours+=12), c.setHours(h.hours));"function"===typeof c.setMinutes&&void 0!=h.minutes&&c.setMinutes(h.minutes);"function"===typeof c.setSeconds&&void 0!=h.seconds&&c.setSeconds(h.seconds);"function"===typeof c.setMilliseconds&&void 0!=h.milliseconds&&c.setMilliseconds(h.milliseconds);if(f&&(void 0!=h.year&&h.year!=c.getFullYear()||void 0!=h.month&&h.month!=c.getMonth()||void 0!=h.day&&h.day!=c.getDate()||24<=h.hours||60<=h.minutes||60<=h.seconds||1E3<=h.milliseconds))c=!1;else{void 0!=h.tzOffset&&c.setTime(c.getTime()+ 6E4*(h.tzOffset-c.getTimezoneOffset()));h.ambiguousYear&&(f=new Date,f.setFullYear(f.getFullYear()-80),c.getTime()=a.count)return!1; var b="MydhHmsSDkK".indexOf(a.text.charAt(0));return 0a.count},aHa=function(a,b){(a=a.substring(b[0]).match(/^\s+/))&&(b[0]+=a[0].length)},$Ga=function(a,b,c,d,f,h){aHa(b,c); var l=c[0],m=d.text.charAt(0),n=-1;if(XGa(d))if(0b.length)return!1;n=BH(a,b.substring(0,l+f),c)}else n=BH(a,b,c);switch(m){case"G":return n=CH(b,c,a.dateTimeSymbols_.ERAS),0<=n&&(h.era=n),!0;case"M":case"L":a:{d=n;if(0>d){d=CH(b,c,a.dateTimeSymbols_.MONTHS.concat(a.dateTimeSymbols_.STANDALONEMONTHS).concat(a.dateTimeSymbols_.SHORTMONTHS).concat(a.dateTimeSymbols_.STANDALONESHORTMONTHS));if(0>d){h=!1;break a}h.month=d%12}else h.month=d-1;h=!0}return h;case"E":return d=CH(b,c,a.dateTimeSymbols_.WEEKDAYS), 0>d&&(d=CH(b,c,a.dateTimeSymbols_.SHORTWEEKDAYS)),0>d?h=!1:(h.dayOfWeek=d,h=!0),h;case"a":return n=CH(b,c,a.dateTimeSymbols_.AMPMS),0<=n&&(h.ampm=n),!0;case"y":a:{if(0>n){var r=b.charAt(c[0]);if("+"!=r&&"-"!=r){h=!1;break a}c[0]++;n=BH(a,b,c);if(0>n){h=!1;break a}"-"==r&&(n=-n)}r||2!=c[0]-l||2!=d.count?h.year=n:(a=n,b=new Date().getFullYear()-80,c=b%100,h.ambiguousYear=a==c,a+=100*Math.floor(b/100)+(an?(d=CH(b,c,a.dateTimeSymbols_.QUARTERS),0> d&&(d=CH(b,c,a.dateTimeSymbols_.SHORTQUARTERS)),0>d?h=!1:(h.month=3*d,h.day=1,h=!0)):h=!1,h;case"d":return 0<=n&&(h.day=n),!0;case"S":return a=c[0]-l,h.milliseconds=3>a?n*Math.pow(10,3-a):Math.round(n/Math.pow(10,a-3)),!0;case"h":12==n&&(n=0);case"K":case"H":case"k":return 0<=n&&(h.hours=n),!0;case"m":return 0<=n&&(h.minutes=n),!0;case"s":return 0<=n&&(h.seconds=n),!0;case"z":case"Z":case"v":b.indexOf("GMT",c[0])==c[0]&&(c[0]+=3);a:if(c[0]>=b.length)h.tzOffset=0,h=!0;else{d=1;switch(b.charAt(c[0])){case"-":d= -1;case"+":c[0]++;}l=c[0];n=BH(a,b,c);if(0>n)h=!1;else{if(c[0]n){h=!1;break a}r+=n}else r=n,r=24>r&&2>=c[0]-l?60*r:r%100+r/100*60;h.tzOffset=-(r*d);h=!0}}return h;default:return!1;}},BH=function(a,b,c){if(a.dateTimeSymbols_.ZERODIGIT){for(var d=[],f=c[0];f=h?String.fromCharCode(h+48):b.charAt(f))}b=d.join("")}else b=b.substring(c[0]);a=b.match(/^\d+/);if(!a)return-1;c[0]+=a[0].length;return parseInt(a[0],10)},CH=function(a,b,c){var d=0,f=-1; a=a.substring(b[0]).toLowerCase();for(var h=0;hd&&0==a.indexOf(c[h].toLowerCase())&&(f=h,d=l)}0<=f&&(b[0]+=d);return f},ZGa=function(){};var bHa={DECIMAL_SEP:".",GROUP_SEP:",",PERCENT:"%",ZERO_DIGIT:"0",PLUS_SIGN:"+",MINUS_SIGN:"-",EXP_SYMBOL:"E",PERMILL:"\u2030",INFINITY:"\u221E",NAN:"NaN",DECIMAL_PATTERN:"#,##0.###",SCIENTIFIC_PATTERN:"#E0",PERCENT_PATTERN:"#,##0%",CURRENCY_PATTERN:"\xA4#,##0.00",DEF_CURRENCY_CODE:"USD"},cHa=bHa;cHa=bHa;var EH=function(a){var b;if(b=a){a:if(a&&3===a.length){for(b=0;3>b;b++){var c=a[b];if("A">c||"Z"c||"z"d&&m++;break;case"0":if(0d&&m++;break;case",":0f+h||1>this.minExponentDigits_)throw Error("Malformed exponential pattern \""+a+"\"");r=!1;break;default:b[0]--,r=!1;}0==h&&0d&&0f+h)||0==m)throw Error("Malformed pattern \""+a+"\"");l=f+h+l;this.maximumFractionDigits_=0<= d?l-d:0;0<=d&&(this.minimumFractionDigits_=f+h-d,0>this.minimumFractionDigits_&&(this.minimumFractionDigits_=0));this.minimumIntegerDigits_=(0<=d?d:l)-f;this.useExponentialNotation_&&(this.maximumIntegerDigits_=f+this.minimumIntegerDigits_,0==this.maximumFractionDigits_&&0==this.minimumIntegerDigits_&&(this.minimumIntegerDigits_=1));this.groupingArray_.push(Math.max(0,m));this.decimalSeparatorAlwaysShown_=0==d||d==l;c=b[0]-c;this.positiveSuffix_=GH(this,a,b);b[0]this.negativePrefix_.length?d=!1:this.positivePrefix_.length=T)J+=T,m=!0;else if(E==v.charAt(0)){if(h||l)break;J+=".";h=!0}else if(E==z.charAt(0)&&("\xA0"!=z.charAt(0)||b[0]+1=c?0:IH(c)).divisorBase,d=JH(d,-f),gHa(this,d),c=JH(c,-f),c=gHa(this,c),f=fHa(this,f+IH(c.intValue));a=JH(a,-f.divisorBase);(c=0>a||0==a&&0>1/a)?f.negative_prefix?b.push(f.negative_prefix):(b.push(f.prefix),b.push(this.negativePrefix_)):(b.push(f.prefix),b.push(this.positivePrefix_)); if(isFinite(a)){if(a=a*(c?-1:1)*this.multiplier_,this.useExponentialNotation_){if(0==a)hHa(this,a,this.minimumIntegerDigits_,b),iHa(this,0,b);else{d=Math.floor(Math.log(a)/Math.log(10)+2e-15);a=JH(a,-d);var h=this.minimumIntegerDigits_;1this.minimumIntegerDigits_?(h=d%this.maximumIntegerDigits_,0>h&&(h=this.maximumIntegerDigits_+h),a=JH(a,h),d-=h,h=1):1>this.minimumIntegerDigits_?(d++,a=JH(a,-1)):(d-=this.minimumIntegerDigits_-1,a=JH(a,this.minimumIntegerDigits_- 1));hHa(this,a,h,b);iHa(this,d,b)}}else hHa(this,a,this.minimumIntegerDigits_,b);}else b.push(DH(this).INFINITY);c?f.negative_suffix?b.push(f.negative_suffix):(b.push(f.suffix),b.push(this.negativeSuffix_)):(b.push(f.suffix),b.push(this.positiveSuffix_));return b.join("")}; var gHa=function(a,b){var c=JH(b,a.maximumFractionDigits_);0a.maximumFractionDigits_)throw Error("Min value must be less than max value"); d||(d=[]);b=gHa(a,b);var f=b.intValue,h=b.fracValue,l=0==f?0:IH(f)+1,m=0h.length&&(h="1"+Gc("0",a.maximumFractionDigits_-h.length)+h);for(a=h.length;"0"==h.charAt(a-1)&&a>b+1;)a--;for(f=1;fb?(b=-b,c.push(DH(a).MINUS_SIGN)):a.useSignForPositiveExponent_&&c.push(DH(a).PLUS_SIGN);b=""+b;for(var d=DH(a).ZERO_DIGIT,f=b.length;fb)return b-48;a=DH(a).ZERO_DIGIT.charCodeAt(0);return a<=b&&bb)return HH;b=Math.min(14,b);var c=a[JH(1,b)];for(--b;!c&&3<=b;)c=a[JH(1,b)],b--;if(!c)return HH;c=c.other;var d=a="",f=c.indexOf(";");0<=f&&(c=c.substring(0,f),f=c.substring(f+1))&&(d=/([^0]*)(0+)(.*)/.exec(f),a=d[1],d=d[3]);return c&&"0"!=c?(c=/([^0]*)(0+)(.*)/.exec(c))?{divisorBase:b+ 1-(c[2].length-1),negative_prefix:a,negative_suffix:d,prefix:c[1],suffix:c[3]}:HH:HH},IH=function(a){if(!isFinite(a))return 0=c)return 0;if(1<=c)return 1;for(var d=0,f=1,h=0,l=0;8>l;l++){h=LH(a,c);var m=(LH(a,c+1E-6)-h)/1E-6;if(1E-6>Math.abs(h-b))return c;if(1E-6>Math.abs(m))break;else hl;l++)hNumber(De)&&uc(a.iframe_,Yb(Db(Eb("javascript:\"\""))));var b=a.iframe_.style;b.visibility="hidden";b.width=b.height="10px";b.display="none";we?b.marginTop=b.marginLeft="-10px":(b.position="absolute",b.top=b.left="-10px");if(se&&!Ee("11")){a.form_.target=a.iframeName_||"";$f(a.form_).getDocument().body.appendChild(a.iframe_); a.ignoreResponse_||vi(a.iframe_,"readystatechange",a.onIeReadyStateChange_,!1,a);try{a.errorHandled_=!1,a.form_.submit()}catch(C){a.ignoreResponse_||zi(a.iframe_,"readystatechange",a.onIeReadyStateChange_,!1,a),a.handleError_(1)}}else{$f(a.form_).getDocument().body.appendChild(a.iframe_);b=a.iframeName_+"_inner";var c=Ag(a.iframe_);if(document.baseURI){var d=Dc(b);d=qc("",null)}else d=Dc(b),d=qc("",null);re&&!we?tc(c.documentElement,d):c.write(oc(d));a.ignoreResponse_||vi(c.getElementById(b),"load",a.onIframeLoaded_,!1,a);d=bg("TEXTAREA",a.form_);for(var f=0,h=d.length;f; Licensed under the MIT license */ var CHa="hammer_"+(1E6*Math.random()|0),DHa=function(){var a=document||document;if(!a[CHa]){var b=function(){(function(c,d,f,h){function l(H,Q,aa){return setTimeout(C(H,aa),Q)} function m(H,Q,aa){return Array.isArray(H)?(n(H,aa[Q],aa),!0):!1} function n(H,Q,aa){var na;if(H)if(H.forEach)H.forEach(Q,aa);else if(H.length!==h){var Oa=0;for(na=H.length;Oaqa(Oa,Ae)&&na.push(H[xb]);Oa[xb]=Ae}aa&&(na=Q?na.sort(function(Jo,Qjb){return Jo[Q]>Qjb[Q]}):na.sort()); return na} function yb(H,Q){for(var aa,na=Q[0].toUpperCase()+Q.slice(1),Oa=0,xb=YZa.length;Oa$H(Jo)?Ae:Jo,xb=Nc(xb,gc),Q.lastInterval=aa):(Ae=gc.velocity,na=gc.velocityX,Oa=gc.velocityY,xb=gc.direction);aa.velocity=Ae;aa.velocityX=na;aa.velocityY=Oa;aa.direction=xb;Q=H.element;a:{for(na=aa.srcEvent.target;na;){if(na==Q){na=!0;break a}na=na.parentNode}na=!1}na&&(Q=aa.srcEvent.target);aa.target=Q;H.emit("hammer.input",aa);H.recognize(aa);H.session.prevInput= aa} function pa(H){for(var Q=[],aa=0;aa=$H(Q)?0xb||(Q[xb]=H,this.callback(this.manager,na,{pointers:Q,changedPointers:[H],pointerType:Oa,srcEvent:H}),aa&&Q.splice(xb,1))}}); var akb={touchstart:1,touchmove:2,touchend:4,touchcancel:8};z(Oh,ma,{handler:function(H){var Q=akb[H.type];var aa=Array.prototype.slice.call(H.touches,0);var na=this.targetIds;if(Q&3&&1===aa.length)na[aa[0].identifier]=!0,na=[aa,aa];else{var Oa,xb=Array.prototype.slice.call(H.targetTouches,0),gc=Array.prototype.slice.call(H.changedTouches,0),Ae=[];if(1===Q)for(aa=0,Oa=xb.length;aana&&Q(!0);Q();8<=na&&Q(!0)}, tryEmit:function(H){if(this.canEmit())return this.emit(H);this.state=32}, canEmit:function(){for(var H=0;Hxb?2:4,aa=xb!=this.pX,na=Math.abs(H.deltaX)):(Oa=0===gc?1:0>gc?8:16,aa=gc!=this.pY,na=Math.abs(H.deltaY)));H.direction=Oa;return aa&&na>Q.threshold&&Oa&Q.direction}, attrTest:function(H){return Qk.prototype.attrTest.call(this,H)&&(this.state&2||!(this.state&2)&&this.directionTest(H))}, emit:function(H){this.pX=H.deltaX;this.pY=H.deltaY;var Q=b_a(H.direction);Q&&this.manager.emit(this.options.event+Q,H);this._super.emit.call(this,H)}}); z(hba,Qk,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]}, attrTest:function(H){return this._super.attrTest.call(this,H)&&(Math.abs(H.scale-1)>this.options.threshold||this.state&2)}, emit:function(H){this._super.emit.call(this,H);1!==H.scale&&this.manager.emit(this.options.event+(1>H.scale?"in":"out"),H)}}); z(iba,Ko,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return["auto"]}, process:function(H){var Q=this.options,aa=H.pointers.length===Q.pointers,na=H.distanceQ.time;this._input=H;if(!na||!aa||H.eventType&12&&!Oa)this.reset();else if(H.eventType&1)this.reset(),this._timer=l(function(){this.state=8;this.tryEmit()},Q.time,this);else if(H.eventType&4)return 8;return 32}, reset:function(){clearTimeout(this._timer)}, emit:function(H){8===this.state&&(H&&H.eventType&4?this.manager.emit(this.options.event+"up",H):(this._input.timeStamp=gba(),this.manager.emit(this.options.event,this._input)))}}); z(jba,Qk,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]}, attrTest:function(H){return this._super.attrTest.call(this,H)&&(Math.abs(H.rotation)>this.options.threshold||this.state&2)}}); z(kba,Qk,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:30,pointers:1},getTouchAction:function(){return IU.prototype.getTouchAction.call(this)}, attrTest:function(H){var Q=this.options.direction;if(Q&30)var aa=H.velocity;else Q&6?aa=H.velocityX:Q&24&&(aa=H.velocityY);return this._super.attrTest.call(this,H)&&Q&H.direction&&$H(aa)>this.options.velocity&&H.eventType&4}, emit:function(H){var Q=b_a(H.direction);Q&&this.manager.emit(this.options.event+Q,H);this.manager.emit(this.options.event,H)}}); z(JU,Ko,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return["manipulation"]}, process:function(H){var Q=this.options,aa=H.pointers.length===Q.pointers,na=H.distance\n \n\n
\n\n \n
\n \n
\n"], ["\n \n\n
\n\n \n
\n \n
\n"]); xG({_template:tF(HHa),is:"app-drawer",properties:{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},persistent:{type:Boolean,value:!1,reflectToAttribute:!0},transitionDuration:{type:Number,value:200},align:{type:String,value:"left"},position:{type:String,readOnly:!0,reflectToAttribute:!0},swipeOpen:{type:Boolean,value:!1,reflectToAttribute:!0},noFocusTrap:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1}},observers:["resetLayout(position, isAttached)","_resetPosition(align, isAttached)", "_styleTransitionDuration(transitionDuration)","_openedPersistentChanged(opened, persistent)"],_translateOffset:0,_trackDetails:null,_drawerState:0,_boundEscKeydownHandler:null,_firstTabStop:null,_lastTabStop:null,attached:function(){pG(this,function(){this._boundEscKeydownHandler=this._escKeydownHandler.bind(this);this.addEventListener("keydown",this._tabKeydownHandler.bind(this));this.listen(this,"track","_track");this.setScrollDirection("y")}); this.fire("app-reset-layout")}, detached:function(){document.removeEventListener("keydown",this._boundEscKeydownHandler)}, open:function(){this.opened=!0}, close:function(){this.opened=!1}, toggle:function(){this.opened=!this.opened}, getWidth:function(){return this._savedWidth||this.$.contentContainer.offsetWidth}, _isRTL:function(){return"rtl"===window.getComputedStyle(this).direction}, _resetPosition:function(){switch(this.align){case"start":this._setPosition(this._isRTL()?"right":"left");return;case"end":this._setPosition(this._isRTL()?"left":"right");return;}this._setPosition(this.align)}, _escKeydownHandler:function(a){27===a.keyCode&&(a.preventDefault(),this.close())}, _track:function(a){if(!this.persistent&&!this.disableSwipe)switch(a.preventDefault(),a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackMove(a);break;case"end":this._trackEnd(a);}}, _trackStart:function(){this._drawerState=this._DRAWER_STATE.TRACKING;var a=this.$.contentContainer.getBoundingClientRect();this._savedWidth=a.width;this._translateOffset="left"===this.position?a.left:a.right-window.innerWidth;this._trackDetails=[];this._styleTransitionDuration(0);this.style.visibility="visible"}, _trackMove:function(a){this._trackDetails&&(this._translateDrawer(a.detail.dx+this._translateOffset),this._trackDetails.push({dx:a.detail.dx,timeStamp:Date.now()}))}, _trackEnd:function(a){if(this._trackDetails){var b=a.detail.dx+this._translateOffset,c=this.getWidth();b="left"===this.position?0<=b||b<=-c:0>=b||b>=c;if(!b){var d=this._trackDetails;this._trackDetails=null;this._flingDrawer(a,d);if(this._drawerState===this._DRAWER_STATE.FLINGING)return}c/=2;a.detail.dx<-c?this.opened="right"===this.position:a.detail.dx>c&&(this.opened="left"===this.position);b?this.debounce("_resetDrawerState",this._resetDrawerState):this.debounce("_resetDrawerState",this._resetDrawerState, this.transitionDuration);this._styleTransitionDuration(this.transitionDuration);this._resetDrawerTranslate();this.style.visibility=""}}, _calculateVelocity:function(a,b){for(var c=Date.now(),d=c-100,f,h=0,l=b.length-1;h<=l;){var m=h+l>>1,n=b[m];n.timeStamp>=d?(f=n,l=m-1):h=m+1}return f?(a.detail.dx-f.dx)/(c-f.timeStamp||1):0}, _flingDrawer:function(a,b){b=this._calculateVelocity(a,b);if(!(Math.abs(b)\n \n\n
\n \n\n
\n \n
\n
\n"], ["\n \n\n
\n \n\n
\n \n
\n
\n"]); xG({_template:tF(JHa),is:"app-header-layout",behaviors:[IHa],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return iG(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var a=this.header;if(this.isAttached&&a){this.$.wrapper.classList.remove("initializing");a.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var b=a.offsetHeight; this.hasScrollingRegion?(a.style.left="",a.style.right=""):requestAnimationFrame(function(){var d=this.getBoundingClientRect(),f=document.documentElement.clientWidth-d.right;a.style.left=d.left+"px";a.style.right=f+"px"}.bind(this)); var c=this.$.contentContainer.style;a.fixed&&!a.condenses&&this.hasScrollingRegion?(c.marginTop=b+"px",c.paddingTop=""):(c.paddingTop=b+"px",c.marginTop="")}}});var _scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers={},_scrollTimer$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers=null;var KHa={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}}, observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(a,b){this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null);b&&("document"===a?this.scrollTarget=this._doc:"string"===typeof a?this.scrollTarget=(b=this.domHost)&&b.$?b.$[a]:iG(this.ownerDocument).querySelector("#"+a):this._isValidScrollTarget()&&(this._oldScrollTarget=a,this._toggleScrollListener(this._shouldHaveListener,a)))}, _scrollHandler:function(){}, get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(a){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,a):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop= a)},set _scrollLeft(a){this.scrollTarget===this._doc?window.scrollTo(a,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=a)},scroll:function(a,b){if("object"===typeof a){var c=a.left;b=a.top}else c=a;c=c||0;b=b||0;this.scrollTarget===this._doc?window.scrollTo(c,b):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=c,this.scrollTarget.scrollTop=b)}, get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement}, _toggleScrollListener:function(a,b){b=b===this._doc?window:b;a?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),b.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(b.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)}, toggleScrollListener:function(a){this._shouldHaveListener=a;this._toggleScrollListener(a,this.scrollTarget)}};var LHa=[KHa,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}}, disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){}, isOnScreen:function(){return!1}, isContentBelow:function(){return!1}, _effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},attached:function(){this._scrollStateChanged()}, detached:function(){this._tearDownEffects()}, createEffect:function(a,b){var c=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[a];if(!c)throw new ReferenceError(this._getUndefinedMsg(a));a=this._boundEffect(c,b||{});a.setUp();return a}, _effectsChanged:function(a,b,c){this._tearDownEffects();a&&c&&(a.split(" ").forEach(function(d){var f;""!==d&&((f=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers[d])?this._effects.push(this._boundEffect(f,b[d])):console.warn(this._getUndefinedMsg(d)))},this),this._setUpEffect())}, _layoutIfDirty:function(){return this.offsetWidth}, _boundEffect:function(a,b){b=b||{};var c=parseFloat(b.startsAt||0),d=parseFloat(b.endsAt||1),f=d-c,h=function(){}; d=0===c&&1===d?a.run:function(l,m){a.run.call(this,Math.max(0,(l-c)/f),m)}; return{setUp:a.setUp?a.setUp.bind(this,b):h,run:a.run?d.bind(this):h,tearDown:a.tearDown?a.tearDown.bind(this):h}}, _setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(a){!1!==a.setUp()&&this._effectsRunFn.push(a.run)},this))}, _tearDownEffects:function(){this._effects&&this._effects.forEach(function(a){a.tearDown()}); this._effectsRunFn=[];this._effects=[]}, _runEffects:function(a,b){this._effectsRunFn&&this._effectsRunFn.forEach(function(c){c(a,b)})}, _scrollHandler:function(){this._scrollStateChanged()}, _scrollStateChanged:function(){if(!this.disabled){var a=this._clampedScrollTop;this._updateScrollState(a);0=this.threshold)}}, _getDOMRef:function(a){console.warn("_getDOMRef","`"+a+"` is undefined")}, _getUndefinedMsg:function(a){return"Scroll effect `"+a+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+a+".html ?"}}];var MHa=da(["\n \n
\n \n
\n"]); xG({_template:tF(MHa),is:"app-header",behaviors:[LHa,IHa],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+ 5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var a=iG(this.$.slot).getDistributedNodes(),b=0,c;c=a[b];b++)if(c.nodeType===Node.ELEMENT_NODE)if(c.hasAttribute("sticky")){this._stickyElRef=c;break}else this._stickyElRef||(this._stickyElRef=c);return this._stickyElRef},_configChanged:function(){this.resetLayout();this._notifyLayoutChanged()}, _updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var a=this._clampedScrollTop,b=0===this._height||0===a,c=this.disabled;this._height=this.offsetHeight;this._stickyElRef=null;this.disabled=!0;b||this._updateScrollState(0,!0);this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0;this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0;this._setUpEffect();b?this._updateScrollState(a,!0):(this._updateScrollState(this._lastScrollTop, !0),this._layoutIfDirty());this.disabled=c}}, _updateScrollState:function(a,b){if(0!==this._height){var c=0,d=this._top;var f=this._maxHeaderTop;var h=a-this._lastScrollTop,l=Math.abs(h),m=a>this._lastScrollTop,n=performance.now();this._mayMove()&&(c=this._clamp(this.reveals?d+h:a,0,f));a>=this._dHeight&&(c=this.condenses&&!this.fixed?Math.max(this._dHeight,c):c,this.style.transitionDuration="0ms");if(this.reveals&&!this.disabled&&100>l){if(300=f&&( 30=f?c=f:!m&&a>=this._dHeight&&(c=this.condenses&&!this.fixed?this._dHeight:0),this.style.transitionDuration=this._clamp((c-d)/(h/(n-this._lastTimestamp)),0,300)+"ms"):c=this._top)}f=0===this._dHeight?0=this._stickyElTop?Math.min(a,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)}, _clamp:function(a,b,c){return Math.min(c,Math.max(b,a))}, _ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),iG(this.root).insertBefore(this._bgContainer,this.$.contentContainer))}, _getDOMRef:function(a){switch(a){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return iG(this).querySelector("[main-title]");case"condensedTitle":return iG(this).querySelector("[condensed-title]");}return null}, getScrollState:function(){return{progress:this._progress,top:this._top}}});if(null!=_scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"])throw Error("effect `parallax-background` is already registered."); _scrollEffects$$module$third_party$javascript$polymer$v2$app_layout$helpers$helpers["parallax-background"]={setUp:function(a){var b={};a=parseFloat(a.scalar);b.background=this._getDOMRef("background");b.backgroundFrontLayer=this._getDOMRef("backgroundFrontLayer");b.backgroundRearLayer=this._getDOMRef("backgroundRearLayer");b.deltaBg=b.backgroundFrontLayer.offsetHeight-b.background.offsetHeight;0===b.deltaBg?(isNaN(a)&&(a=.8),b.deltaBg=(this._dHeight||0)*a):(isNaN(a)&&(a=1),b.deltaBg*=a);this._fxParallaxBackground= b}, run:function(a){var b=this._fxParallaxBackground;this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundFrontLayer);b.backgroundRearLayer&&this.transform("translate3d(0px, "+b.deltaBg*Math.min(1,a)+"px, 0px)",b.backgroundRearLayer)}, tearDown:function(){delete this._fxParallaxBackground}};var NHa=da(["\n \n\n \n"]); xG({_template:tF(NHa),is:"app-toolbar"});/* Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ if(!window.polymerSkipLoadingFontRoboto)for(var OHa=k(["https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic","https://fonts.googleapis.com/css?family=Roboto+Mono:400,700"]),PHa=OHa.next();!PHa.done;PHa=OHa.next()){var QHa=PHa.value,RHa=document.createElement("link");RHa.rel="stylesheet";RHa.href=QHa;document.head.appendChild(RHa)};var SHa=da(["\n \n
[[_text]]
\n"]),UH=function(){}; UH=xG({_template:tF(SHa),is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){UH.instance||(UH.instance=this);document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))}, announce:function(a){this._text="";this.async(function(){this._text=a},this.timeout)}, _onIronAnnounce:function(a){a.detail&&a.detail.text&&this.announce(a.detail.text)}}); UH.instance=null;UH.requestAvailability=function(){UH.instance||(UH.instance=document.createElement("iron-a11y-announcer"));document.body?document.body.appendChild(UH.instance):document.addEventListener("load",function(){document.body.appendChild(UH.instance)})};Polymer.IronA11yAnnouncer=UH;var THa={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},UHa={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},VHa={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},WHa=/[a-z0-9*]/,XHa=/U\+/,YHa=/^arrow/,ZHa=/^space(bar)?/,$Ha=/^escape$/; function aIa(a,b){var c="";if(a)if(a=a.toLowerCase()," "===a||ZHa.test(a))c="space";else if($Ha.test(a))c="esc";else if(1==a.length){if(!b||WHa.test(a))c=a}else c=YHa.test(a)?a.replace("arrow",""):"multiply"==a?"*":a;return c} function VH(a,b){var c=a.hasModifiers;if(b.key)c=aIa(b.key,c);else if(b.detail&&b.detail.key)c=aIa(b.detail.key,c);else{c=b.keyIdentifier;var d="";c&&(c in THa?d=THa[c]:XHa.test(c)?(c=parseInt(c.replace("U+","0x"),16),d=String.fromCharCode(c).toLowerCase()):d=c.toLowerCase());(c=d)||(c=b.keyCode,d="",Number(c)&&(d=65<=c&&90>=c?String.fromCharCode(32+c):112<=c&&123>=c?"f"+(c-112+1):48<=c&&57>=c?String(c-48):96<=c&&105>=c?String(c-96):UHa[c]),c=d);c=c||""}return c===a.key&&(!a.hasModifiers||!!b.shiftKey=== !!a.shiftKey&&!!b.ctrlKey===!!a.ctrlKey&&!!b.altKey===!!a.altKey&&!!b.metaKey===!!a.metaKey)} function bIa(a){return 1===a.length?{combo:a,key:a,event:"keydown"}:a.split("+").reduce(function(b,c){var d=c.split(":");c=d[0];d=d[1];c in VHa?(b[VHa[c]]=!0,b.hasModifiers=!0):(b.key=c,b.event=d||"keydown");return b},{combo:a.split(":").shift()})} function WH(a){return a.trim().split(" ").map(function(b){return bIa(b)})} var XH={properties:{keyEventTarget:{type:Object,value:function(){return this}}, stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}}, _imperativeKeyBindings:{type:Object,value:function(){return{}}}}, observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()}, attached:function(){this._listenKeyEventListeners()}, detached:function(){this._unlistenKeyEventListeners()}, addOwnKeyBinding:function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()}, removeOwnKeyBindings:function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()}, keyboardEventMatchesKeys:function(a,b){b=WH(b);for(var c=0;c\n \n\n \n \n
 
\n\n \n
\n \n
\n"]); xG({_template:tF(dIa),is:"iron-autogrow-textarea",behaviors:[bI,YH],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},autocapitalize:{type:String,value:"none"},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean}, minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(a){this.$.textarea.selectionStart=a},set selectionEnd(a){this.$.textarea.selectionEnd=a},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&!navigator.userAgent.match(/OS 1[3456789]/)&&(this.$.textarea.style.marginLeft= "-3px")}, validate:function(){var a=this.$.textarea.validity.valid;a&&(this.required&&""===this.value?a=!1:this.hasValidator()&&(a=bI.validate.call(this,this.value)));this.invalid=!a;this.fire("iron-input-validate");return a}, _bindValueChanged:function(a){this.value=a}, _valueChanged:function(a){var b=this.textarea;b&&(b.value!==a&&(b.value=a||0===a?a:""),this.bindValue=a,this.$.mirror.textContent=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))}, _onInput:function(a){var b=iG(a).path;this.value=b?b[0].value:a.target.value}, _constrain:function(a){var b;a=a||[""];for(b=0this.maxRows?a.slice(0,this.maxRows):a.slice(0);0\n \n\n \n"]); xG({_template:tF(gIa),is:"iron-collapse",behaviors:[TH],properties:{horizontal:{type:Boolean,value:!1,observer:"_horizontalChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},transitioning:{type:Boolean,notify:!0,readOnly:!0},noAnimation:{type:Boolean},_desiredSize:{type:String,value:""}},get dimension(){return this.horizontal?"width":"height"},get _dimensionMax(){return this.horizontal?"maxWidth":"maxHeight"},get _dimensionMaxCss(){return this.horizontal?"max-width":"max-height"}, hostAttributes:{role:"group","aria-hidden":"true"},listeners:{transitionend:"_onTransitionEnd"},toggle:function(){this.opened=!this.opened}, show:function(){this.opened=!0}, hide:function(){this.opened=!1}, updateSize:function(a,b){a="auto"===a?"":a;b=b&&!this.noAnimation&&this.isAttached&&this._desiredSize!==a;this._desiredSize=a;this._updateTransition(!1);b&&(b=this._calcSize(),""===a&&(this.style[this._dimensionMax]="",a=this._calcSize()),this.style[this._dimensionMax]=b,this.scrollTop=this.scrollTop,this._updateTransition(!0),b=a!==b);this.style[this._dimensionMax]=a;b||this._transitionEnd()}, enableTransition:function(a){yG._warn("`enableTransition()` is deprecated, use `noAnimation` instead.");this.noAnimation=!a}, _updateTransition:function(a){this.style.transitionDuration=a&&!this.noAnimation?"":"0s"}, _horizontalChanged:function(){this.style.transitionProperty=this._dimensionMaxCss;this.style["maxWidth"===this._dimensionMax?"maxHeight":"maxWidth"]="";this.updateSize(this.opened?"auto":"0px",!1)}, _openedChanged:function(){this.setAttribute("aria-hidden",!this.opened);this._setTransitioning(!0);this.toggleClass("iron-collapse-closed",!1);this.toggleClass("iron-collapse-opened",!1);this.updateSize(this.opened?"auto":"0px",!0);this.opened&&this.focus()}, _transitionEnd:function(){this.style[this._dimensionMax]=this._desiredSize;this.toggleClass("iron-collapse-closed",!this.opened);this.toggleClass("iron-collapse-opened",this.opened);this._updateTransition(!1);this.notifyResize();this._setTransitioning(!1)}, _onTransitionEnd:function(a){iG(a).rootTarget===this&&this._transitionEnd()}, _calcSize:function(){return this.getBoundingClientRect()[this.dimension]+"px"}});var hIa={properties:{sizingTarget:{type:Object,value:function(){return this}}, fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight: this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var a=iG(this).parentNode;a&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(a=a.host);return a},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign}, get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){"undefined"===typeof this._memoizedIsRTL&&(this._memoizedIsRTL="rtl"==window.getComputedStyle(this).direction);return this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget;this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))}, detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)}, fit:function(){this.position();this.constrain();this.center()}, _discoverInfo:function(){if(!this._fitInfo){var a=window.getComputedStyle(this),b=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==a.top?"top":"auto"!==a.bottom?"bottom":null,horizontally:"auto"!==a.left? "left":"auto"!==a.right?"right":null},sizedBy:{height:"none"!==b.maxHeight,width:"none"!==b.maxWidth,minWidth:parseInt(b.minWidth,10)||0,minHeight:parseInt(b.minHeight,10)||0},margin:{top:parseInt(a.marginTop,10)||0,right:parseInt(a.marginRight,10)||0,bottom:parseInt(a.marginBottom,10)||0,left:parseInt(a.marginLeft,10)||0}}}}, resetFit:function(){var a=this._fitInfo||{},b;for(b in a.sizerInlineStyle)this.sizingTarget.style[b]=a.sizerInlineStyle[b];for(b in a.inlineStyle)this.style[b]=a.inlineStyle[b];this._fitInfo=null}, refit:function(){var a=this.sizingTarget.scrollLeft,b=this.sizingTarget.scrollTop;this.resetFit();this.fit();this.sizingTarget.scrollLeft=a;this.sizingTarget.scrollTop=b}, position:function(){if(this.__shouldPosition){this._discoverInfo();this.style.position="fixed";this.sizingTarget.style.boxSizing="border-box";this.style.left="0px";this.style.top="0px";var a=this.getBoundingClientRect(),b=this.__getNormalizedRect(this.positionTarget),c=this.__getNormalizedRect(this.fitInto),d=this._fitInfo.margin,f=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,{width:a.width+d.left+d.right,height:a.height+d.top+d.bottom},a,b,c);b=f.left+d.left;f=f.top+d.top;var h= Math.min(c.right-d.right,b+a.width),l=Math.min(c.bottom-d.bottom,f+a.height);b=Math.max(c.left+d.left,Math.min(b,h-this._fitInfo.sizedBy.minWidth));f=Math.max(c.top+d.top,Math.min(f,l-this._fitInfo.sizedBy.minHeight));this.sizingTarget.style.maxWidth=Math.max(h-b,this._fitInfo.sizedBy.minWidth)+"px";this.sizingTarget.style.maxHeight=Math.max(l-f,this._fitInfo.sizedBy.minHeight)+"px";this.style.left=b-a.left+"px";this.style.top=f-a.top+"px"}}, constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo;a.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px");a.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px");this.sizingTarget.style.boxSizing="border-box";var b=this.getBoundingClientRect();a.sizedBy.height||this.__sizeDimension(b,a.positionedBy.vertically,"top","bottom","Height");a.sizedBy.width||this.__sizeDimension(b,a.positionedBy.horizontally,"left","right", "Width")}}, _sizeDimension:function(a,b,c,d,f){this.__sizeDimension(a,b,c,d,f)}, __sizeDimension:function(a,b,c,d,f){var h=this._fitInfo,l=this.__getNormalizedRect(this.fitInto);l="Width"===f?l.width:l.height;b=b===d;var m="offset"+f;this.sizingTarget.style["max"+f]=l-h.margin[b?c:d]-(b?l-a[d]:a[c])-(this[m]-this.sizingTarget[m])+"px"}, center:function(){if(!this.__shouldPosition){this._discoverInfo();var a=this._fitInfo.positionedBy;if(!a.vertically||!a.horizontally){this.style.position="fixed";a.vertically||(this.style.top="0px");a.horizontally||(this.style.left="0px");var b=this.getBoundingClientRect(),c=this.__getNormalizedRect(this.fitInto);a.vertically||(this.style.top=c.top-b.top+(c.height-b.height)/2+"px");a.horizontally||(this.style.left=c.left-b.left+(c.width-b.width)/2+"px")}}}, __getNormalizedRect:function(a){return a===document.documentElement||a===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:a.getBoundingClientRect()}, __getOffscreenArea:function(a,b,c){return Math.abs(Math.min(0,a.top)+Math.min(0,c.bottom-(a.top+b.height)))*b.width+Math.abs(Math.min(0,a.left)+Math.min(0,c.right-(a.left+b.width)))*b.height}, __getPosition:function(a,b,c,d,f,h){var l=[{verticalAlign:"top",horizontalAlign:"left",top:f.top+this.verticalOffset,left:f.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:f.top+this.verticalOffset,left:f.right-c.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:f.bottom-c.height-this.verticalOffset,left:f.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:f.bottom-c.height-this.verticalOffset,left:f.right-c.width- this.horizontalOffset}];if(this.noOverlap){for(var m=0,n=l.length;mr||0===r&&( f||n))z=d}}return z}};var fI=Element.prototype,gI=fI.matches||fI.matchesSelector||fI.mozMatchesSelector||fI.msMatchesSelector||fI.oMatchesSelector||fI.webkitMatchesSelector,iIa=function(){},hI=function(a,b){var c=[]; return a._collectTabbableNodes(b,c)?a._sortByTabIndex(c):c}; e=iIa.prototype;e.isFocusable=function(a){return gI.call(a,"input, select, textarea, button, object")?gI.call(a,":not([disabled])"):gI.call(a,"a[href], area[href], iframe, [tabindex], [contentEditable]")}; e.isTabbable=function(a){return this.isFocusable(a)&&gI.call(a,":not([tabindex=\"-1\"])")&&this._isVisible(a)}; e._normalizedTabIndex=function(a){return this.isFocusable(a)?(a=a.getAttribute("tabindex")||0,Number(a)):-1}; e._collectTabbableNodes=function(a,b){if(a.nodeType!==Node.ELEMENT_NODE||!this._isVisible(a))return!1;var c=this._normalizedTabIndex(a),d=0b)return a;var c=Math.ceil(b/2);b=this._sortByTabIndex(a.slice(0,c));a=this._sortByTabIndex(a.slice(c));return this._mergeSortByTabIndex(b,a)}; e._mergeSortByTabIndex=function(a,b){for(var c=[];0a:a>b}; var jIa=new iIa;var kIa=da(["\n \n\n \n"]); xG({_template:tF(kIa),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null}, attached:function(){this.opened&&this._openedChanged(this.opened)}, prepare:function(){this.opened&&!this.parentNode&&iG(document.body).appendChild(this)}, open:function(){this.opened=!0}, close:function(){this.opened=!1}, complete:function(){this.opened||this.parentNode!==document.body||iG(this.parentNode).removeChild(this)}, _onTransitionend:function(a){a&&a.target===this&&this.complete()}, _openedChanged:function(a){a?this.prepare():(a=window.getComputedStyle(this),"0s"!==a.transitionDuration&&0!=a.opacity||this.complete());this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null;this.toggleClass("opened",this.opened)}.bind(this)))}});var iI=function(){this._overlays=[];this._minimumZ=101;this._backdropElement=null;QF(document.documentElement,"tap",function(){}); document.addEventListener("tap",this._onCaptureClick.bind(this),!0);document.addEventListener("focus",this._onCaptureFocus.bind(this),!0);document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}; iI.prototype._bringOverlayAtIndexToFront=function(a){var b=this._overlays[a];if(b){var c=this._overlays.length-1,d=this._overlays[c];d&&this._shouldBeBehindOverlay(b,d)&&c--;if(!(a>=c)){d=Math.max(this._getZ(jI(this)),this._minimumZ);for(this._getZ(b)<=d&&this._applyOverlayZ(b,d);a=Math.abs(b),f=0;fc?0b?0\n \n\n
\n \n
\n"]); xG({_template:tF(vIa),is:"iron-dropdown",behaviors:[YH,XH,mI,uIa],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"], get containedElement(){for(var a=iG(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n \n\n"]), xIa=tF(wIa);xIa.setAttribute("style","display: none;");document.head.appendChild(xIa.content);var yIa=da(["\n \n"]), zIa=new ZH({type:"iconset"});xG({_template:tF(yIa),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String}},observers:["_updateIcon(isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(a){a=(a||"").split(":");this._iconName=a.pop();this._iconsetName=a.pop()||this._DEFAULT_ICONSET;this._updateIcon()}, _srcChanged:function(){this._updateIcon()}, _usesIconset:function(){return this.icon||!this.src}, _updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&iG(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&((this._iconset=zIa.byKey(this._iconsetName))?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"), this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,iG(this.root).appendChild(this._img))}});xG({is:"iron-iconset-svg",_template:null,properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new ZH({type:"iconset",key:null,value:null})}, attached:function(){this.style.display="none"}, getIconNames:function(){this._icons=this._createIconMap();return Object.keys(this._icons).map(function(a){return this.name+":"+a},this)}, applyIcon:function(a,b){this.removeIcon(a);if(b=this._cloneIcon(b,this.rtlMirroring&&this._targetIsRTL(a))){var c=iG(a.root||a);c.insertBefore(b,c.childNodes[0]);return a._svgIcon=b}return null}, removeIcon:function(a){a._svgIcon&&(iG(a.root||a).removeChild(a._svgIcon),a._svgIcon=null)}, _targetIsRTL:function(a){null==this.__targetIsRTL&&(this.useGlobalRtlAttribute?this.__targetIsRTL="rtl"===(document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement).getAttribute("dir"):(a&&a.nodeType!==Node.ELEMENT_NODE&&(a=a.host),this.__targetIsRTL=a&&"rtl"===window.getComputedStyle(a).direction));return this.__targetIsRTL}, _nameChanged:function(){this._meta.value=null;this._meta.key=this.name;this._meta.value=this;this.async(function(){this.fire("iron-iconset-added",this,{node:window})})}, _createIconMap:function(){var a=Object.create(null);iG(this).querySelectorAll("[id]").forEach(function(b){a[b.id]=b}); return a}, _cloneIcon:function(a,b){this._icons=this._icons||this._createIconMap();return this._prepareSvgClone(this._icons[a],this.size,b)}, _prepareSvgClone:function(a,b,c){if(a){a=a.cloneNode(!0);var d=document.createElementNS("http://www.w3.org/2000/svg","svg");b=a.getAttribute("viewBox")||"0 0 "+b+" "+b;var f="pointer-events: none; display: block; width: 100%; height: 100%;";c&&a.hasAttribute("mirror-in-rtl")&&(f+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;");d.setAttribute("viewBox",b);d.setAttribute("preserveAspectRatio","xMidYMid meet");d.setAttribute("focusable","false");d.style.cssText=f;d.appendChild(a).removeAttribute("id"); return d}return null}});/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var AIa=ea(["\n \n\n \n
\n \n
\n"], ["\n \n\n \n
\n \n
\n"]); xG({_template:tF(AIa),is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1}, error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""}, _imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))}, _imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))}, _computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded}, _computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""}, _computeImgDivHidden:function(){return!this.sizing}, _computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0}, _computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()}, _computeImgHidden:function(){return!!this.sizing}, _widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"}, _heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"}, _loadStateObserver:function(a,b){var c=this._resolveSrc(a);c!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===a||b?this._setLoading(!1):(this._resolvedSrc=c,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage="url(\""+this._resolvedSrc+"\")",this._setLoading(!0)),this._setLoaded(!1),this._setError(!1))}, _placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?"url(\""+this.placeholder+"\")":""}, _transformChanged:function(){var a=this.$.sizedImgDiv.style,b=this.$.placeholder.style;a.backgroundSize=b.backgroundSize=this.sizing;a.backgroundPosition=b.backgroundPosition=this.sizing?this.position:"";a.backgroundRepeat=b.backgroundRepeat=this.sizing?"no-repeat":""}, _resolveSrc:function(a){a=Pc(a,this.$.baseURIAnchor.href);2<=a.length&&"/"===a[0]&&"/"!==a[1]&&(a=(location.origin||location.protocol+"//"+location.host)+a);return a}});var BIa=da(["\n \n \n"]); xG({_template:tF(BIa),is:"iron-input",behaviors:[bI],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){UH.requestAvailability();this._previousValidInput="";this._patternAlreadyChecked=!1}, attached:function(){this._observer=iG(this).observeNodes(function(){this._initSlottedInput()}.bind(this))}, detached:function(){this._observer&&(iG(this).unobserveNodes(this._observer),this._observer=null)}, get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0];this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value);this.fire("iron-input-ready")}, get _patternRegExp(){if(this.allowedPattern)var a=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":a=/[0-9.,e-]/;}return a},_bindValueChanged:function(a,b){b&&(void 0===a?b.value=null:a!==b.value&&(this.inputElement.value=a),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:a}))}, _onInput:function(){!this.allowedPattern||this._patternAlreadyChecked||this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput);this.bindValue=this._previousValidInput=this.inputElement.value;this._patternAlreadyChecked=!1}, _isPrintable:function(a){var b=19==a.keyCode||20==a.keyCode||45==a.keyCode||46==a.keyCode||144==a.keyCode||145==a.keyCode||32a.keyCode||111a.keyCode;return!(8==a.keyCode||9==a.keyCode||13==a.keyCode||27==a.keyCode)&&!(0==a.charCode&&b)}, _onKeypress:function(a){if(this.allowedPattern||"number"===this.inputElement.type){var b=this._patternRegExp;if(b&&!(a.metaKey||a.ctrlKey||a.altKey)){this._patternAlreadyChecked=!0;var c=String.fromCharCode(a.charCode);this._isPrintable(a)&&!b.test(c)&&(a.preventDefault(),this._announceInvalidCharacter("Invalid character "+c+" not entered."))}}}, _checkPatternValidity:function(){var a=this._patternRegExp;if(!a)return!0;for(var b=0;b\n \n\n \n\n
\n \n
\n"]), DIa=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),EIa=DIa&&8<=DIa[1]; xG({_template:tF(CIa),is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)", "_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[OFa,TH,KHa,DFa],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null, _focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return iG(iG(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight- this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var a=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,a-this._physicalCount)},set _virtualStart(a){a=this._clamp(a,0,this._maxVirtualStart);this.grid&&(a-=a%this._itemsPerRow);this._virtualStartVal=a},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(a){a%=this._physicalCount;0>a&&(a=this._physicalCount+a);this.grid&&(a-=a%this._itemsPerRow);this._physicalStartVal=a},get _physicalStart(){return this._physicalStartVal|| 0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(a){this._physicalCountVal=a},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?Infinity:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){var a=this._firstVisibleIndexVal;if(null==a){var b=this._physicalTop+this._scrollOffset;this._firstVisibleIndexVal= a=this._iterateItems(function(c,d){b+=this._getPhysicalSizeIncrement(c);if(b>this._scrollPosition)return this.grid?d-d%this._itemsPerRow:d;if(this.grid&&this._virtualCount-1===d)return d-d%this._itemsPerRow})||0}return a}, get lastVisibleIndex(){var a=this._lastVisibleIndexVal;if(null==a){if(this.grid)a=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var b=this._physicalTop+this._scrollOffset;this._iterateItems(function(c,d){bthis._physicalSize&&0=h||m<=c)break;if(a){if(f+b.length+1>=this._virtualCount)break;if(l+z>=n-this._scrollOffset)break;b.push(v); l+=z;v=(v+1)%h}else{if(0>=d-b.length)break;if(l+this._physicalSize-z<=r)break;b.push(v);l-=z;v=0===v?h-1:v-1}}return{indexes:b,physicalTop:l-this._scrollOffset}}, _update:function(a,b){if(!(a&&0===a.length||0===this._physicalCount)){this._manageFocus();this._assignModels(a);this._updateMetrics(a);if(b)for(;b.length;)a=b.pop(),this._physicalTop-=this._getPhysicalSizeIncrement(a);this._positionItems();this._updateScrollerSize()}}, _createPool:function(a){this._ensureTemplatized();var b,c=Array(a);for(b=0;b=this._scrollBottom&&this._physicalTop<=this._scrollPosition}, _increasePoolIfNeeded:function(a){a=this._clamp(this._physicalCount+a,3,this._virtualCount-this._virtualStart);a=this._convertIndexToCompleteRow(a);if(this.grid){var b=a%this._itemsPerRow;b&&a-b<=this._physicalCount&&(a+=this._itemsPerRow);a-=b}a-=this._physicalCount;b=Math.round(.5*this._physicalCount);if(!(0>a)){if(0this._physicalEnd&& this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===b||(this._isClientFull()?this._physicalSizethis._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render, JE);else if("items.splices"===a.path){this._adjustVirtualIndex(a.value.indexSplices);this._virtualCount=this.items?this.items.length:0;if(a.value.indexSplices.some(function(c){return 0=this._virtualStart&&c.index<=this._virtualEnd},this); this._isClientFull()&&!a||this._debounce("_render",this._render,JE)}else"items.length"!==a.path&&this._forwardItemPath(a.path,a.value)}, _forwardItemPath:function(a,b){a=a.slice(6);var c=a.indexOf(".");-1===c&&(c=a.length);var d,f=this.modelForElement(this._offscreenFocusedItem),h=parseInt(a.substring(0,c),10);if(d=this._isIndexRendered(h)){var l=this._getPhysicalIndex(h);var m=this.modelForElement(this._physicalItems[l])}else f&&(m=f);m&&m[this.indexAs]===h&&(a=a.substring(c+1),a=this.as+(a?"."+a:""),m._setPendingPropertyOrPath(a,b,!1,!0),m._flushProperties&&m._flushProperties(),d&&(this._updateMetrics([l]),this._positionItems(), this._updateScrollerSize()))}, _adjustVirtualIndex:function(a){a.forEach(function(b){b.removed.forEach(this._removeItem,this);b.index=this._physicalStart?this._virtualStart+(a-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+a}, _assignModels:function(a){this._iterateItems(function(b,c){var d=this._physicalItems[b],f=this.items&&this.items[c];if(null!=f){var h=this.modelForElement(d);h.__key__=null;this._forwardProperty(h,this.as,f);this._forwardProperty(h,this.selectedAs,this.$.selector.isSelected(f));this._forwardProperty(h,this.indexAs,c);this._forwardProperty(h,"tabIndex",this._focusedVirtualIndex===c?0:-1);this._physicalIndexForKey[h.__key__]=b;h._flushProperties&&h._flushProperties(!0);d.removeAttribute("hidden")}else d.setAttribute("hidden", "")},a)}, _updateMetrics:function(a){WF();var b=0,c=0,d=this._physicalAverageCount,f=this._physicalAverage;this._iterateItems(function(h){c+=this._physicalSizes[h];this._physicalSizes[h]=this._physicalItems[h].offsetHeight;b+=this._physicalSizes[h];this._physicalAverageCount+=this._physicalSizes[h]?1:0},a); this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(c=1===this._itemsPerRow?c:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+b-c,this._itemsPerRow=1);this._physicalAverageCount!==d&&(this._physicalAverage=Math.round((f*d+b)/this._physicalAverageCount))}, _updateGridMetrics:function(){this._itemWidth=0=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height=this._viewportHeight)this.$.items.style.height=this._estScrollHeight+ "px",this._scrollHeight=this._estScrollHeight}, scrollToItem:function(a){return this.scrollToIndex(this.items.indexOf(a))}, scrollToIndex:function(a){if(!("number"!==typeof a||0>a||a>this.items.length-1)&&(WF(),0!==this._physicalCount)){a=this._clamp(a,0,this._virtualCount-1);if(!this._isIndexRendered(a)||a>=this._maxVirtualStart)this._virtualStart=this.grid?a-2*this._itemsPerRow:a-1;this._manageFocus();this._assignModels();this._updateMetrics();this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var b=this._physicalStart,c=this._virtualStart,d=0,f=this._hiddenContentSize;ca||a>=this._virtualCount)){!this.multiSelection&&this.selectedItem&&this.clearSelection();if(this._isIndexRendered(a)){var b=this.modelForElement(this._physicalItems[this._getPhysicalIndex(a)]);b&&(b[this.selectedAs]=!0);this.updateSizeForIndex(a)}this.$.selector.selectIndex(a)}}, deselectItem:function(a){return this.deselectIndex(this.items.indexOf(a))}, deselectIndex:function(a){0>a||a>=this._virtualCount||(this._isIndexRendered(a)&&(this.modelForElement(this._physicalItems[this._getPhysicalIndex(a)])[this.selectedAs]=!1,this.updateSizeForIndex(a)),this.$.selector.deselectIndex(a))}, toggleSelectionForItem:function(a){return this.toggleSelectionForIndex(this.items.indexOf(a))}, toggleSelectionForIndex:function(a){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(a):this.$.selector.isSelected(this.items[a]))?this.deselectIndex(a):this.selectIndex(a)}, clearSelection:function(){this._iterateItems(function(a){this.modelForElement(this._physicalItems[a])[this.selectedAs]=!1}); this.$.selector.clearSelection()}, _selectionEnabledChanged:function(a){(a?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")}, _selectionHandler:function(a){var b=this.modelForElement(a.target);if(b){var c=iG(a).path[0];a=this._getActiveElement();var d=this._physicalItems[this._getPhysicalIndex(b[this.indexAs])];if("input"!==c.localName&&"button"!==c.localName&&"select"!==c.localName){c=b.tabIndex;b.tabIndex=-100;var f=a?a.tabIndex:-1;b.tabIndex=c;a&&d!==a&&d.contains(a)&&-100!==f||this.toggleSelectionForItem(b[this.as])}}}, _multiSelectionChanged:function(a){this.clearSelection();this.$.selector.multi=a}, updateSizeForItem:function(a){return this.updateSizeForIndex(this.items.indexOf(a))}, updateSizeForIndex:function(a){if(!this._isIndexRendered(a))return null;this._updateMetrics([this._getPhysicalIndex(a)]);this._positionItems();return null}, _manageFocus:function(){var a=this._focusedVirtualIndex;0<=a&&a=this._virtualStart&&a<=this._virtualEnd}, _isIndexVisible:function(a){return a>=this.firstVisibleIndex&&a<=this.lastVisibleIndex}, _getPhysicalIndex:function(a){return(this._physicalStart+(a-this._virtualStart))%this._physicalCount}, focusItem:function(a){this._focusPhysicalItem(a)}, _focusPhysicalItem:function(a){if(!(0>a||a>=this._virtualCount)){this._restoreFocusedItem();this._isIndexRendered(a)||this.scrollToIndex(a);var b=this._physicalItems[this._getPhysicalIndex(a)],c=this.modelForElement(b),d;c.tabIndex=-100;-100===b.tabIndex&&(d=b);d||(d=iG(b).querySelector("[tabindex=\"-100\"]"));c.tabIndex=0;this._focusedVirtualIndex=a;d&&d.focus()}}, _removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem);this._focusedItem=this._focusBackfillItem=this._offscreenFocusedItem=null;this._focusedPhysicalIndex=this._focusedVirtualIndex=-1}, _createFocusBackfillItem:function(){var a=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||0>this._focusedVirtualIndex)){if(!this._focusBackfillItem){var b=this.stamp(null);this._focusBackfillItem=b.root.querySelector("*");this._itemsParent.appendChild(b.root)}this._offscreenFocusedItem=this._physicalItems[a];this.modelForElement(this._offscreenFocusedItem).tabIndex=0;this._physicalItems[a]=this._focusBackfillItem;this._focusedPhysicalIndex=a;this.translate3d(0,"-10000px",0,this._offscreenFocusedItem)}}, _restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(0>this._focusedVirtualIndex)){this._assignModels();var a=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),b=this._physicalItems[a];if(b){var c=this.modelForElement(b),d=this.modelForElement(this._offscreenFocusedItem);c[this.as]===d[this.as]?(this._focusBackfillItem=b,c.tabIndex=-1,this._physicalItems[a]=this._offscreenFocusedItem,this.translate3d(0,"-10000px",0,this._focusBackfillItem)):(this._removeFocusedItem(), this._focusBackfillItem=null);this._offscreenFocusedItem=null}}}, _didFocus:function(a){a=this.modelForElement(a.target);var b=this.modelForElement(this._focusedItem),c=null!==this._offscreenFocusedItem,d=this._focusedVirtualIndex;a&&(b===a?this._isIndexVisible(d)||this.scrollToIndex(d):(this._restoreFocusedItem(),b&&(b.tabIndex=-1),a.tabIndex=0,this._focusedVirtualIndex=d=a[this.indexAs],this._focusedPhysicalIndex=this._getPhysicalIndex(d),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],c&&!this._offscreenFocusedItem&&this._update()))}, _keydownHandler:function(a){switch(a.keyCode){case 40:this._focusedVirtualIndexa.indexOf(b))&&this.setItemSelected(b,!1)},this)}; e.isSelected=function(a){return 0<=this.selection.indexOf(a)}; e.setItemSelected=function(a,b){if(null!=a&&b!==this.isSelected(a)){if(b)this.selection.push(a);else{var c=this.selection.indexOf(a);0<=c&&this.selection.splice(c,1)}this.selectCallback&&this.selectCallback(a,b)}}; e.select=function(a){this.multi?this.toggle(a):this.get()!==a&&(this.setItemSelected(this.get(),!1),this.setItemSelected(a,!0))}; e.toggle=function(a){this.setItemSelected(a,!this.isSelected(a))};var nI={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}, _excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}}, observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this);this._selection=new FIa(this._applySelection.bind(this))}, attached:function(){this._observer=this._observeItems(this);this._addListener(this.activateEvent)}, detached:function(){this._observer&&iG(this).unobserveNodes(this._observer);this._removeListener(this.activateEvent)}, indexOf:function(a){return this.items?this.items.indexOf(a):-1}, select:function(a){this.selected=a}, selectPrevious:function(){var a=this.items.length,b=a-1;void 0!==this.selected&&(b=(Number(this._valueToIndex(this.selected))-1+a)%a);this.selected=this._indexToValue(b)}, selectNext:function(){var a=0;void 0!==this.selected&&(a=(Number(this._valueToIndex(this.selected))+1)%this.items.length);this.selected=this._indexToValue(a)}, selectIndex:function(a){this.select(this._indexToValue(a))}, forceSynchronousItemUpdate:function(){this._observer&&"function"===typeof this._observer.flush?this._observer.flush():this._updateItems()}, get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()}, _addListener:function(a){this.listen(this,a,"_activateHandler")}, _removeListener:function(a){this.unlisten(this,a,"_activateHandler")}, _activateEventChanged:function(a,b){this._removeListener(b);this._addListener(a)}, _updateItems:function(){var a=iG(this).queryDistributedElements(this.selectable||"*");a=Array.prototype.filter.call(a,this._bindFilterItem);this._setItems(a)}, _updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))}, _updateSelected:function(){this._selectSelected(this.selected)}, _selectSelected:function(){if(this.items){var a=this._valueToItem(this.selected);a?this._selection.select(a):this._selection.clear();this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}}, _filterItem:function(a){return!this._excludedLocalNames[a.localName]}, _valueToItem:function(a){return null==a?null:this.items[this._valueToIndex(a)]}, _valueToIndex:function(a){if(this.attrForSelected)for(var b=0,c;c=this.items[b];b++){if(this._valueForItem(c)==a)return b}else return Number(a)}, _indexToValue:function(a){if(this.attrForSelected){if(a=this.items[a])return this._valueForItem(a)}else return a}, _valueForItem:function(a){if(!a)return null;if(!this.attrForSelected)return a=this.indexOf(a),-1===a?null:a;var b=a[SE(this.attrForSelected)];return void 0!=b?b:a.getAttribute(this.attrForSelected)}, _applySelection:function(a,b){this.selectedClass&&this.toggleClass(this.selectedClass,b,a);this.selectedAttribute&&this.toggleAttribute.call(a,this.selectedAttribute,b);this._selectionChange();this.fire("iron-"+(b?"select":"deselect"),{item:a})}, _selectionChange:function(){this._setSelectedItem(this._selection.get())}, _observeItems:function(a){return iG(a).observeNodes(function(b){this._updateItems();this._updateSelected();this.fire("iron-items-changed",b,{bubbles:!1,cancelable:!1})})}, _activateHandler:function(a){a=a.target;for(var b=this.items;a&&a!=this;){var c=b.indexOf(a);if(0<=c){b=this._indexToValue(c);this._itemActivate(b,a);break}a=a.parentNode}}, _itemActivate:function(a,b){this.fire("iron-activate",{selected:a,item:b},{cancelable:!0}).defaultPrevented||this.select(a)}};var GIa={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}}, selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}}, observers:["_updateSelected(selectedValues.splices)"],select:function(a){this.multi?this._toggleSelected(a):this.selected=a}, multiChanged:function(a){this._selection.multi=a;this._updateSelected()}, get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&0b?this.push("selectedValues",a):this.splice("selectedValues",b,1)}, _valuesToItems:function(a){return null==a?null:a.map(function(b){return this._valueToItem(b)},this)}},HIa=[nI, GIa];var oI={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:"Alt AltGraph CapsLock Control Fn FnLock Hyper Meta NumLock OS ScrollLock Shift Super Symbol SymbolLock".split(" "),_SEARCH_RESET_TIMEOUT_MS:1E3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"}, keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()}, select:function(a){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var b=this._valueToItem(a);b&&b.hasAttribute("disabled")||(this._setFocusedItem(b),GIa.select.apply(this,arguments))}, _resetTabindices:function(){var a=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(b){b.setAttribute("tabindex",b===a?"0":"-1");b.setAttribute("aria-selected",this._selection.isSelected(b))},this)}, _updateMultiselectable:function(a){a?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")}, _focusWithKeyboardEvent:function(a){if(-1===this._MODIFIER_KEYS.indexOf(a.key)){this.cancelDebouncer("_clearSearchText");var b=this._searchText||"";b+=(a.key&&1==a.key.length?a.key:String.fromCharCode(a.keyCode)).toLocaleLowerCase();a=b.length;for(var c=0,d;d=this.items[c];c++)if(!d.hasAttribute("disabled")){var f=this.attrForItemTitle||"textContent";f=(d[f]||d.getAttribute(f)||"").trim();if(!(f.length\n \n\n \n"]);xG({_template:tF(LIa),is:"iron-pages",behaviors:[TH,nI],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(){this.async(this.notifyResize)}});var MIa={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(a){return(this._clampValue(a)-this.min)/(this.max-this.min)}, _clampValue:function(a){return Math.min(this.max,Math.max(this.min,this._calcStep(a)))}, _calcStep:function(a){a=parseFloat(a);if(!this.step)return a;a=Math.round((a-this.min)/this.step);return 1>this.step?a/(1/this.step)+this.min:a*this.step+this.min}, _validateValue:function(){var a=this._clampValue(this.value);this.value=this.oldValue=isNaN(a)?this.oldValue:a;return this.value!==a}, _update:function(){this._validateValue();this._setRatio(100*this._calcRatio(this.value))}};Polymer.IronResizableBehavior=TH;xG({is:"iron-selector",_template:null,behaviors:[HIa]});var pI={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}}, isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")}, timingFromConfig:function(a){if(a.timing)for(var b in a.timing)this.animationTiming[b]=a.timing[b];return this.animationTiming}, setPrefixedProperty:function(a,b,c){for(var d={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[b],f,h=0;f=d[h];h++)a.style[f]=c;a.style[b]=c}, complete:function(){}};xG({is:"fade-in-animation",_template:null,behaviors:[pI],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(a))}});xG({is:"fade-out-animation",_template:null,behaviors:[pI],configure:function(a){return this._effect=new KeyframeEffect(a.node,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(a))}});/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var NIa=da(["\n \n\n
\n
\n"]), qI=function(a,b,c,d){a-=c;b-=d;return Math.sqrt(a*a+b*b)},rI=window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now; function OIa(a){this.element=a;this.width=this.boundingRect.width;this.height=this.boundingRect.height;this.size=Math.max(this.width,this.height)} OIa.prototype={get boundingRect(){return this.element.getBoundingClientRect()}};function PIa(a){this.element=a;this.color=window.getComputedStyle(a).color;this.wave=document.createElement("div");this.waveContainer=document.createElement("div");this.wave.style.backgroundColor=this.color;this.wave.classList.add("wave");this.waveContainer.classList.add("wave-container");iG(this.waveContainer).appendChild(this.wave);QIa(this)} var QIa=function(a){a.maxRadius=0;a.mouseDownStart=0;a.mouseUpStart=0;a.xStart=0;a.yStart=0;a.xEnd=0;a.yEnd=0;a.slideDistance=0;a.containerMetrics=new OIa(a.element)}; PIa.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){if(!this.mouseDownStart)return 0;var a=rI()-this.mouseDownStart;this.mouseUpStart&&(a-=this.mouseUpElapsed);return a},get mouseUpElapsed(){return this.mouseUpStart?rI()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1E3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1E3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+ this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var a=1.1*Math.min(Math.sqrt(this.containerMetrics.width*this.containerMetrics.width+this.containerMetrics.height*this.containerMetrics.height),300)+5;return Math.abs(a*(1-Math.pow(80,-(this.mouseInteractionSeconds/(1.1-a/300*.2)))))},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity): this.initialOpacity},get outerOpacity(){return Math.max(0,Math.min(.3*this.mouseUpElapsedSeconds,this.opacity))},get isOpacityFullyDecayed(){return .01>this.opacity&&this.radius>=Math.min(this.maxRadius,300)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,300)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size* 2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},draw:function(){this.wave.style.opacity=this.opacity;var a=this.radius/(this.containerMetrics.size/2);var b=this.xNow-this.containerMetrics.width/2;var c=this.yNow-this.containerMetrics.height/2;this.waveContainer.style.webkitTransform= "translate("+b+"px, "+c+"px)";this.waveContainer.style.transform="translate3d("+b+"px, "+c+"px, 0)";this.wave.style.webkitTransform="scale("+a+","+a+")";this.wave.style.transform="scale3d("+a+","+a+",1)"}, downAction:function(a){var b=this.containerMetrics.width/2,c=this.containerMetrics.height/2;QIa(this);this.mouseDownStart=rI();this.center?(this.xStart=b,this.yStart=c,this.slideDistance=qI(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=a?a.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=a?a.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2);this.recenters&&(this.xEnd=b,this.yEnd=c,this.slideDistance=qI(this.xStart, this.yStart,this.xEnd,this.yEnd));a=this.containerMetrics;b=this.xStart;c=this.yStart;this.maxRadius=Math.max(qI(b,c,0,0),qI(b,c,a.width,0),qI(b,c,0,a.height),qI(b,c,a.width,a.height));this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px";this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px";this.waveContainer.style.width=this.containerMetrics.size+"px";this.waveContainer.style.height=this.containerMetrics.size+"px"}, upAction:function(){this.isMouseDown&&(this.mouseUpStart=rI())}, remove:function(){iG(iG(this.waveContainer).parentNode).removeChild(this.waveContainer)}}; xG({_template:tF(NIa),is:"paper-ripple",behaviors:[XH],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}}, animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}}, get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==iG(this).parentNode.nodeType?this.keyEventTarget=iG(this).getOwnerRoot().host:this.keyEventTarget=iG(this).parentNode;var a=this.keyEventTarget;this.listen(a,"up","uiUpAction");this.listen(a,"down","uiDownAction")}, detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction");this.unlisten(this.keyEventTarget,"down","uiDownAction");this.keyEventTarget=null}, get shouldKeepAnimating(){for(var a=0;ab||(this.ripples.splice(b,1),a.remove(),this.ripples.length||this._setAnimating(!1))}, animate:function(){if(this._animating){var a;for(a=0;athis.getRipple().ripples.length&&this._ripple.uiDownAction()}, _spaceKeyUpHandler:function(a){cI._spaceKeyUpHandler.call(this,a);this.hasRipple()&&this._ripple.uiUpAction()}},SIa=[dI, YH,sI,RIa];var TIa={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.holdDown=a)}, _createRipple:function(){var a=sI._createRipple();a.id="ink";a.setAttribute("center","");a.classList.add("circle");return a}},UIa=[dI, YH,sI,TIa];var VIa=[UIa,fIa,{_checkedChanged:function(){eIa._checkedChanged.call(this);this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))}, _buttonStateChanged:function(){sI._buttonStateChanged.call(this);!this.disabled&&this.isAttached&&(this.checked=this.active)}}];Polymer.PaperRippleBehavior=sI;var WIa=document.createElement("template");WIa.setAttribute("style","display: none;");WIa.innerHTML=""; document.head.appendChild(WIa.content);var XIa=document.createElement("template");XIa.setAttribute("style","display: none;");XIa.innerHTML="\n \n"; document.head.appendChild(XIa.content);var YIa=da(["\n \n\n "]); xG({_template:tF(YIa),is:"paper-button",behaviors:[SIa],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?RIa._calculateElevation.apply(this):this._setElevation(0)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var ZIa=document.createElement("template");ZIa.setAttribute("style","display: none;");ZIa.innerHTML=""; document.head.appendChild(ZIa.content);var $Ia=document.createElement("template");$Ia.setAttribute("style","display: none;");$Ia.innerHTML=""; document.head.appendChild($Ia.content);var aJa=ea(["\n\n
\n
\n
\n
\n
\n\n
"], ["\n\n
\n
\n
\n
\n
\n\n
"]); xG({_template:tF(aJa),is:"paper-checkbox",behaviors:[VIa],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){pG(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var a=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),b="px",c=a.match(/[A-Za-z]+$/);null!==c&&(b=c[0]);a=parseFloat(a);c=8/3*a;"px"===b&&(c=Math.floor(c),c%2!==a%2&& c++);this.updateStyles({"--paper-checkbox-ink-size":c+b})}})}, _computeCheckboxClass:function(a,b){var c="";a&&(c+="checked ");b&&(c+="invalid");return c}, _computeCheckmarkClass:function(a){return a?"":"hidden"}, _createRipple:function(){this._rippleContainer=this.$.checkboxContainer;return TIa._createRipple.call(this)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var bJa={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick;this.__prevNoCancelOnEscKey=this.noCancelOnEscKey;this.__prevWithBackdrop=this.withBackdrop;this.__readied=!0}, _modalChanged:function(a,b){b&&(a?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.withBackdrop=this.noCancelOnEscKey=this.noCancelOnOutsideClick=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))}, _updateClosingReasonConfirmed:function(a){this.closingReason=this.closingReason||{};this.closingReason.confirmed=a}, _onDialogClick:function(a){for(var b=iG(a).path,c=0,d=b.indexOf(this);c\n \n"; document.head.appendChild(eJa.content);var fJa=da(["\n \n\n
\n \n
\n"]); xG({_template:tF(fJa),is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget();this.classList.add("no-padding")}, attached:function(){this._ensureTarget();requestAnimationFrame(this.updateScrollState.bind(this))}, updateScrollState:function(){this.toggleClass("is-scrolled",0=this.scrollTarget.scrollHeight)}, _ensureTarget:function(){(this.dialogElement=this.dialogElement||this.parentElement)&&this.dialogElement.behaviors&&0<=this.dialogElement.behaviors.indexOf(bJa)?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var gJa=da(["\n \n \n"]);xG({_template:tF(gJa),is:"paper-dialog",behaviors:[cJa,uIa],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation();this.playAnimation("entry")}, _renderClosed:function(){this.cancelAnimation();this.playAnimation("exit")}, _onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var hJa=document.createElement("template");hJa.setAttribute("style","display: none;");hJa.innerHTML="\n\n\n\n";document.head.appendChild(hJa.content);var iJa=document.createElement("template");iJa.setAttribute("style","display: none;");iJa.innerHTML="\n \n"; document.head.appendChild(iJa.content);xG({is:"paper-menu-grow-height-animation",_template:null,behaviors:[pI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;return this._effect=new KeyframeEffect(b,[{height:c/2+"px"},{height:c+"px"}],this.timingFromConfig(a))}}); xG({is:"paper-menu-grow-width-animation",_template:null,behaviors:[pI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c/2+"px"},{width:c+"px"}],this.timingFromConfig(a))}}); xG({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[pI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().width;return this._effect=new KeyframeEffect(b,[{width:c+"px"},{width:c-c/20+"px"}],this.timingFromConfig(a))}}); xG({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[pI],configure:function(a){var b=a.node,c=b.getBoundingClientRect().height;this.setPrefixedProperty(b,"transformOrigin","0 0");return this._effect=new KeyframeEffect(b,[{height:c+"px",transform:"translateY(0)"},{height:c/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(a))}});var jJa=da(["\n \n\n
\n \n
\n\n \n
\n \n
\n
\n"]), tI={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},uI=function(){}; e=uI.prototype;e.registered=function(){this._prepKeyBindings()}; e.addOwnKeyBinding=function(a,b){this._imperativeKeyBindings[a]=b;this._prepKeyBindings();this._resetKeyEventListeners()}; e.removeOwnKeyBindings=function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()}; e.keyboardEventMatchesKeys=function(a,b){b=WH(b);for(var c=0;c\n \n\n \n \n
\n \n
 
\n \n [[errorMessage]]\n
\n \n
\n"]), lJa=wG(HTMLElement); xG({_template:tF(kJa),is:"paper-dropdown-menu-light",behaviors:[dI,YH,sI,eI,bI],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,observer:"_valueChanged"},label:{type:String},placeholder:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1}, noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,hasContent:{type:Boolean,readOnly:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom:function(a){var b=ME(this);b.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:a});b.shadowRoot.appendChild(a);return lJa.prototype._attachDom.call(this,a)}, focus:function(){this.$["dropdown-trigger"].focus()}, attached:function(){var a=this.contentElement;a&&a.selectedItem&&this._setSelectedItem(a.selectedItem)}, get contentElement(){for(var a=iG(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n \n\n [[_charCounterStr]]\n"]); xG({_template:tF(rJa),is:"paper-input-char-counter",behaviors:[qJa],properties:{_charCounterStr:{type:String,value:"0"}},update:function(a){if(a.inputElement){a.value=a.value||"";var b=a.value.toString().length.toString();a.inputElement.hasAttribute("maxlength")&&(b+="/"+a.inputElement.getAttribute("maxlength"));this._charCounterStr=b}}});var sJa=da(["\n\n"]), tJa=da(["\n \n\n \n\n
\n \n\n
\n \n \n
\n\n \n
\n\n
\n
\n
\n
\n\n
\n \n
\n"]), uJa=tF(sJa);uJa.setAttribute("style","display: none;");document.head.appendChild(uJa.content); xG({_template:tF(tJa),is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},noUnfloatedLabelError:{type:Boolean,value:!1},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"}, _boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}}, _boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}}, _boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}}, _boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}}, listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return SE(this.attrForValue)},get _inputElement(){return iG(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0;this._addons||(this._addons=[]);this.addEventListener("focus",this._boundOnFocus, !0);this.addEventListener("blur",this._boundOnBlur,!0)}, attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput);this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)}, _onAddonAttached:function(a){this._addons||(this._addons=[]);a=a.target;-1===this._addons.indexOf(a)&&(this._addons.push(a),this.isAttached&&this._handleValue(this._inputElement))}, _onFocus:function(){this._setFocused(!0)}, _onBlur:function(){this._setFocused(!1);this._handleValueAndAutoValidate(this._inputElement)}, _onInput:function(a){this._handleValueAndAutoValidate(a.target)}, _onValueChanged:function(a){var b=a.target;if(this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,void 0===b.value||""===b.value))return;this._handleValueAndAutoValidate(a.target)}, _handleValue:function(a){var b=this._inputElementValue;b||0===b||"number"===a.type&&!a.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1;this.updateAddons({inputElement:a,value:b,invalid:this.invalid})}, _handleValueAndAutoValidate:function(a){this.autoValidate&&a&&(this.invalid=!(a.validate?a.validate(this._inputElementValue):a.checkValidity()));this._handleValue(a)}, _onIronInputValidate:function(){this.invalid=this._inputElement.invalid}, _invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})}, updateAddons:function(a){for(var b,c=0;b=this._addons[c];c++)b.update(a)}, _computeInputContentClass:function(a,b,c,d,f){var h="input-content";a?(f&&(h+=" label-is-hidden"),d&&!this.noUnfloatedLabelError&&(h+=" is-invalid")):(a=this.querySelector("label"),b||f?(h+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",d?h+=" is-invalid":c&&(h+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),d&&!this.noUnfloatedLabelError&&(h+=" is-invalid")));c&&(h+=" focused");return h}, _computeUnderlineClass:function(a,b){var c="underline";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c}, _computeAddOnContentClass:function(a,b){var c="add-on-content";b?c+=" is-invalid":a&&(c+=" is-highlighted");return c}});var vJa=ea(["\n \n\n \n
\n \n
\n"], ["\n \n\n \n
\n \n
\n"]); xG({_template:tF(vJa),is:"paper-input-error",behaviors:[qJa],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(a){this._setInvalid(a.invalid)}});var wJa=da(["\n \n\n \n\n \n\n \n\n \n \n \n \n\n \n\n \n\n \n\n \n "]); xG({is:"paper-input",_template:tF(wJa),behaviors:[pJa,eI],properties:{value:{type:String},noUnfloatedLabelError:{type:Boolean,value:!1},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input"));this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&( this.alwaysFloatLabel=!0);this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});var xJa=da(["\n \n\n \n \n
\n \n \n \n \n \n \n
\n \n
\n"]), yJa=wG(HTMLElement); xG({_template:tF(xJa),is:"paper-dropdown-menu",behaviors:[dI,YH,eI,bI],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean, value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom:function(a){var b=ME(this);b.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:a});b.shadowRoot.appendChild(a);return yJa.prototype._attachDom.call(this,a)}, focus:function(){this.$.input._focusableElement.focus()}, attached:function(){var a=this.contentElement;a&&a.selectedItem&&this._setSelectedItem(a.selectedItem)}, get contentElement(){for(var a=iG(this.$.content).getDistributedNodes(),b=0,c=a.length;b\n \n\n \n "], ["\n \n\n \n "]); xG({is:"paper-icon-button",_template:tF(zJa),hostAttributes:{role:"button",tabindex:"0"},behaviors:[UIa],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(a,b){var c=this.getAttribute("aria-label");c&&b!=c||this.setAttribute("aria-label",a)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var AJa=da(["\n \n\n \n\n \n\n \n\n \n\n \n\n \n"]); xG({_template:tF(AJa),is:"paper-textarea",behaviors:[pJa,eI],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0},noUnfloatedLabelError:{type:Boolean,value:!1}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(a){this.$.input.textarea.selectionStart=a},get selectionEnd(){return this.$.input.textarea.selectionEnd}, set selectionEnd(a){this.$.input.textarea.selectionEnd=a},_ariaLabelledByChanged:function(a){this._focusableElement.setAttribute("aria-labelledby",a)}, _ariaDescribedByChanged:function(a){this._focusableElement.setAttribute("aria-describedby",a)}, get _focusableElement(){return this.inputElement.textarea}});var BJa={hostAttributes:{role:"option",tabindex:"0"}},CJa=[dI,YH,BJa];var DJa=document.createElement("template");DJa.setAttribute("style","display: none;");DJa.innerHTML="\n \n"; document.head.appendChild(DJa.content);var EJa=da(["\n \n \n\n
\n \n
\n \n"]); xG({_template:tF(EJa),is:"paper-icon-item",behaviors:[CJa]});Polymer.PaperItemBehavior=CJa;Polymer.PaperItemBehaviorImpl=BJa;var FJa=da(["\n \n\n \n"]); xG({_template:tF(FJa),is:"paper-item-body"});var GJa,HJa=function(){if(void 0!==GJa)return GJa;var a=document.createElement("template");a.innerHTML=""; return GJa=a};var IJa=da(["\n \n \n"]);xG({_template:tF(IJa),is:"paper-item",behaviors:[CJa]});var JJa=da(["\n \n\n \n"]);xG({_template:tF(JJa),is:"paper-listbox",behaviors:[IIa],hostAttributes:{role:"listbox"}});var KJa=document.createElement("template");KJa.setAttribute("style","display: none;");KJa.innerHTML="\n \n"; document.head.appendChild(KJa.content);var LJa=da(["\n \n \n\n \n"]);xG({_template:tF(LJa),is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});Polymer.PaperMenuButton=uI;var MJa=da(["\n \n\n
\n
\n
\n
\n"]); xG({_template:tF(MJa),is:"paper-progress",behaviors:[MIa],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(a){this.toggleClass("indeterminate",a,this.$.primaryProgress)}, _transformProgress:function(a,b){a.style.transform=a.style.webkitTransform="scaleX("+b/100+")"}, _mainRatioChanged:function(a){this._transformProgress(this.$.primaryProgress,a)}, _progressChanged:function(a,b,c,d,f){a=this._clampValue(a);b=this._clampValue(b);var h=100*this._calcRatio(a),l=100*this._calcRatio(b);this._setSecondaryRatio(h);this._transformProgress(this.$.secondaryProgress,h);this._transformProgress(this.$.primaryProgress,l);this.secondaryProgress=a;f?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",b);this.setAttribute("aria-valuemin",c);this.setAttribute("aria-valuemax",d)}, _disabledChanged:function(a){this.setAttribute("aria-disabled",a?"true":"false")}, _hideSecondaryProgress:function(a){return 0===a}});var NJa=ea(["\n \n\n
\n
\n
\n
\n\n
\n "], ["\n \n\n
\n
\n
\n
\n\n
\n "]); xG({is:"paper-radio-button",_template:tF(NJa),behaviors:[VIa],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer}, attached:function(){pG(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var a=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),b=Math.floor(3*a);b%2!==a%2&&b++;this.updateStyles({"--paper-radio-button-ink-size":b+"px"})}})}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var OJa=da(["\n \n\n \n"]); xG({_template:tF(OJa),is:"paper-radio-group",behaviors:[KIa],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(a){var b=this._valueToItem(a);if(!b||!b.hasAttribute("disabled")){if(this.selected){b=this._valueToItem(this.selected);if(this.selected==a)if(this.allowEmptySelection)a="";else{b&&(b.checked= !0);return}b&&(b.checked=!1)}nI.select.apply(this,[a]);this.fire("paper-radio-group-changed")}}, _activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)}, _onUpKey:function(a){this._focusPrevious();a.preventDefault();this._activateFocusedItem()}, _onDownKey:function(a){this._focusNext();a.preventDefault();this._activateFocusedItem()}, _onLeftKey:function(a){JIa._onLeftKey.apply(this,arguments);this._activateFocusedItem()}, _onRightKey:function(a){JIa._onRightKey.apply(this,arguments);this._activateFocusedItem()}});var PJa=da(["\n \n\n
\n
\n \n \n
\n\n \n\n
\n
\n
\n
\n\n \n"]); xG({_template:tF(PJa),is:"paper-slider",behaviors:[XH,eI,UIa,MIa],properties:{value:{type:Number,value:0},snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},ignoreBarTouch:{type:Boolean,value:!1},dragging:{type:Boolean, value:!1,readOnly:!0,notify:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}}, observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},ready:function(){this.ignoreBarTouch&&RF(this.$.sliderBar,"auto")}, increment:function(){this.value=this._clampValue(this.value+this.step)}, decrement:function(){this.value=this._clampValue(this.value-this.step)}, _updateKnob:function(a,b,c){this.setAttribute("aria-valuemin",b);this.setAttribute("aria-valuemax",c);this.setAttribute("aria-valuenow",a);this._positionKnob(100*this._calcRatio(a))}, _valueChanged:function(){this.fire("value-change",{composed:!0})}, _immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue}, _secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)}, _expandKnob:function(){this._setExpand(!0)}, _resetKnob:function(){this.cancelDebouncer("expandKnob");this._setExpand(!1)}, _positionKnob:function(a){this._setImmediateValue(this._calcStep(this._calcKnobPosition(a)));this._setRatio(100*this._calcRatio(this.immediateValue));this.$.sliderKnob.style.left=this.ratio+"%";this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))}, _calcKnobPosition:function(a){return(this.max-this.min)*a/100+this.min}, _onTrack:function(a){a.stopPropagation();switch(a.detail.state){case"start":this._trackStart(a);break;case"track":this._trackX(a);break;case"end":this._trackEnd();}}, _trackStart:function(){this._setTransiting(!1);this._w=this.$.sliderBar.offsetWidth;this._knobstartx=this._startx=this._x=this.ratio*this._w/100;this._minx=-this._startx;this._maxx=this._w-this._startx;this.$.sliderKnob.classList.add("dragging");this._setDragging(!0)}, _trackX:function(a){this.dragging||this._trackStart(a);this._x=this._startx+Math.min(this._maxx,Math.max(this._minx,a.detail.dx*(this._isRTL?-1:1)));a=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(a);a=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(a+"px",0,0,this.$.sliderKnob)}, _trackEnd:function(){var a=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging");this._setDragging(!1);this._resetKnob();this.value=this.immediateValue;a.transform=a.webkitTransform="";this.fire("change",{composed:!0})}, _knobdown:function(a){this._expandKnob();a.preventDefault();this.focus()}, _bartrack:function(a){this._allowBarEvent(a)&&this._onTrack(a)}, _barclick:function(a){this._w=this.$.sliderBar.offsetWidth;var b=this.$.sliderBar.getBoundingClientRect();b=(a.detail.x-b.left)/this._w*100;this._isRTL&&(b=100-b);var c=this.ratio;this._setTransiting(!0);this._positionKnob(b);c===this.ratio&&this._setTransiting(!1);this.async(function(){this.fire("change",{composed:!0})}); a.preventDefault();this.focus()}, _bardown:function(a){this._allowBarEvent(a)&&(this.debounce("expandKnob",this._expandKnob,60),this._barclick(a))}, _knobTransitionEnd:function(a){a.target===this.$.sliderKnob&&this._setTransiting(!1)}, _updateMarkers:function(a,b,c,d){d||this._setMarkers([]);b=Math.round((c-b)/this.step);b>a&&(b=a);if(0>b||!isFinite(b))b=0;this._setMarkers(Array(b))}, _mergeClasses:function(a){return Object.keys(a).filter(function(b){return a[b]}).join(" ")}, _getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})}, _allowBarEvent:function(a){return!this.ignoreBarTouch||a.detail.sourceEvent instanceof MouseEvent}, get _isRTL(){void 0===this.__isRTL&&(this.__isRTL="rtl"===window.getComputedStyle(this).direction);return this.__isRTL},_leftKey:function(a){this._isRTL?this._incrementKey(a):this._decrementKey(a)}, _rightKey:function(a){this._isRTL?this._decrementKey(a):this._incrementKey(a)}, _incrementKey:function(a){this.disabled||("end"===a.detail.key?this.value=this.max:this.increment(),this.fire("change"),a.preventDefault())}, _decrementKey:function(a){this.disabled||("home"===a.detail.key?this.value=this.min:this.decrement(),this.fire("change"),a.preventDefault())}, _changeValue:function(a){this.value=a.target.value;this.fire("change",{composed:!0})}, _inputKeyDown:function(a){a.stopPropagation()}, _createRipple:function(){this._rippleContainer=this.$.sliderKnob;return TIa._createRipple.call(this)}, _focusedChanged:function(a){a&&this.ensureRipple();this.hasRipple()&&(this._ripple.style.display=a?"":"none",this._ripple.holdDown=a)}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var QJa={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(a,b){return[a||b?"active":"",b?"cooldown":""].join(" ")}, __activeChanged:function(a,b){this.__setAriaHidden(!a);this.__coolingDown=!a&&b}, __altChanged:function(a){"loading"===a?this.alt=this.getAttribute("aria-label")||a:(this.__setAriaHidden(""===a),this.setAttribute("aria-label",a))}, __setAriaHidden:function(a){a?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")}, __reset:function(){this.__coolingDown=this.active=!1}};var RJa=document.createElement("template");RJa.setAttribute("style","display: none;");RJa.innerHTML="\n \n"; document.head.appendChild(RJa.content);var SJa=da(["\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "]); xG({_template:tF(SJa),is:"paper-spinner-lite",behaviors:[QJa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var TJa=da(["\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "]); xG({_template:tF(TJa),is:"paper-spinner",behaviors:[QJa],registered:function(){this._template.setAttribute("strip-whitespace","")}});var UJa=da(["\n \n\n
\n \n
\n"]); xG({_template:tF(UJa),is:"paper-tab",behaviors:[YH,dI,sI],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()}, get _parentNoink(){var a=iG(this).parentNode;return!!a&&!!a.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink}, _onTap:function(a){if(this.link){var b=this.queryEffectiveChildren("a");b&&a.target!==b&&b.click()}}});var VJa=da(["\n\n\n\n\n"]),WJa=tF(VJa);document.head.appendChild(WJa.content);var XJa=ea(["\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n"], ["\n \n\n \n\n
\n
\n
\n \n
\n
\n\n \n"]); xG({_template:tF(XJa),is:"paper-tabs",behaviors:[TH,KIa],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},altNext:{type:String, value:""},altPrevious:{type:String,value:""},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null;this._pendingActivationTimeout= this._pendingActivationItem=void 0;this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this);this.addEventListener("blur",this._onBlurCapture.bind(this),!0)}, ready:function(){this.setScrollDirection("y",this.$.tabsContainer)}, detached:function(){this._cancelPendingActivation()}, _noinkChanged:function(a){iG(this).querySelectorAll("paper-tab").forEach(a?this._setNoinkAttribute:this._removeNoinkAttribute)}, _setNoinkAttribute:function(a){a.setAttribute("noink","")}, _removeNoinkAttribute:function(a){a.removeAttribute("noink")}, _computeScrollButtonClass:function(a,b,c){return!b||c?"hidden":a?"not-visible":""}, _computeTabsContentClass:function(a,b){return a?"scrollable"+(b?" fit-container":""):" fit-container"}, _computeSelectionBarClass:function(a,b){return a?"hidden":b?"align-bottom":""}, _onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll();this._tabChanged(this.selectedItem)},10)}, _makeString:function(a){return""+a}, _onIronSelect:function(a){this._tabChanged(a.detail.item,this._previousTab);this._previousTab=a.detail.item;this.cancelDebouncer("tab-changed")}, _onIronDeselect:function(){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab);this._previousTab=null},1)}, _activateHandler:function(){this._cancelPendingActivation();oI._activateHandler.apply(this,arguments)}, _scheduleActivation:function(a,b){this._pendingActivationItem=a;this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,b)}, _delayedActivationHandler:function(){var a=this._pendingActivationItem;this._pendingActivationTimeout=this._pendingActivationItem=void 0;a.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})}, _cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationTimeout=this._pendingActivationItem=void 0)}, _onArrowKeyup:function(){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)}, _onBlurCapture:function(a){a.target===this._pendingActivationItem&&this._cancelPendingActivation()}, get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(a,b){this.scrollable&&this._affectScroll(b&&-b.ddx||0)}, _down:function(){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)}, _affectScroll:function(a){this.$.tabsContainer.scrollLeft+=a;a=this.$.tabsContainer.scrollLeft;this._leftHidden=0===a;this._rightHidden=a===this._tabContainerScrollSize}, _onLeftScrollButtonDown:function(){this._scrollToLeft();this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)}, _onRightScrollButtonDown:function(){this._scrollToRight();this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)}, _onScrollButtonUp:function(){clearInterval(this._holdJob);this._holdJob=null}, _scrollToLeft:function(){this._affectScroll(-this._step)}, _scrollToRight:function(){this._affectScroll(this._step)}, _tabChanged:function(a,b){if(a){var c=this.$.tabsContent.getBoundingClientRect(),d=c.width,f=a.getBoundingClientRect();c=f.left-c.left;this._pos={width:this._calcPercent(f.width,d),left:this._calcPercent(c,d)};if(this.noSlide||null==b)this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(this._pos.width,this._pos.left);else{var h=b.getBoundingClientRect();b=this.items.indexOf(b);a=this.items.indexOf(a);this.$.selectionBar.classList.add("expand"); a=bb?this.$.tabsContainer.scrollLeft+=b:(b+=a-this.$.tabsContainer.offsetWidth,0\n \n\n {{text}}\n \n"]), vI=null; xG({_template:tF(YJa),is:"paper-toast",behaviors:[mI],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3E3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0},noIronAnnounce:{type:Boolean,value:!1}},listeners:{transitionend:"__onTransitionEnd"},get visible(){yG._warn("`visible` is deprecated, use `opened` instead");return this.opened}, get _canAutoClose(){return 0\n \n\n
\n
\n
\n
\n\n
\n "]); xG({is:"paper-toggle-button",_template:tF(ZJa),behaviors:[VIa],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},__calculateIsRtl:function(){return"rtl"===window.getComputedStyle(this).direction}, attached:function(){this.__calculateIsRtl()&&this.setAttribute("dir","rtl");pG(this,function(){RF(this,"pan-y")})}, _ontrack:function(a){a=a.detail;"start"===a.state?this._trackStart(a):"track"===a.state?this._trackMove(a):"end"===a.state&&this._trackEnd(a)}, _trackStart:function(){this._isRtl=this.__calculateIsRtl();this._width=this.$.toggleBar.offsetWidth/2;this._trackChecked=this.checked;this.$.toggleButton.classList.add("dragging")}, _trackMove:function(a){a=a.dx;this._x=this._isRtl?Math.max(-this._width,Math.min(0,this._trackChecked?-this._width+a:a)):Math.min(this._width,Math.max(0,this._trackChecked?this._width+a:a));this.translate3d(this._x+"px",0,0,this.$.toggleButton);this._isRtl?this._userActivate(this._x<-this._width/2):this._userActivate(this._x>this._width/2)}, _trackEnd:function(){this.$.toggleButton.classList.remove("dragging");this.transform("",this.$.toggleButton)}, _createRipple:function(){this._rippleContainer=this.$.toggleButton;var a=sI._createRipple();a.id="ink";a.setAttribute("recenters","");a.classList.add("circle","toggle-ink");return a}, registered:function(){this._template.setAttribute("strip-whitespace","")}});var $Ja=da(["\n \n\n
\n \n
\n"]); xG({_template:tF($Ja),is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object, value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}}, _showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var a=iG(this).parentNode,b=iG(this).getOwnerRoot();return this.for?iG(b).querySelector("#"+this.for):a.nodeType==Node.DOCUMENT_FRAGMENT_NODE?b.host:a},attached:function(){this._findTarget()}, detached:function(){this.manualMode||this._removeListeners()}, playAnimation:function(a){"entry"===a?this.show():"exit"===a&&this.hide()}, cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")}, show:function(){if(!this._showing){if(""===iG(this).textContent.trim()){for(var a=!0,b=iG(this).getEffectiveChildNodes(),c=0;cwindow.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,n)+"px",this.style.right="auto"),b.top+r+d.height>window.innerHeight?(this.style.bottom=b.height+"px",this.style.top="auto"):(this.style.top=Math.max(-b.top,r)+"px",this.style.bottom="auto")):(this.style.left=n+"px",this.style.top=r+"px")}}, _addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide"));this.listen(this.$.tooltip,"animationend","_onAnimationEnd");this.listen(this,"mouseenter","hide")}, _findTarget:function(){this.manualMode||this._removeListeners();this._target=this.target;this.manualMode||this._addListeners()}, _delayChange:function(a){500!==a&&this.updateStyles({"--paper-tooltip-delay-in":a+"ms"})}, _manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()}, _cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry"));this.$.tooltip.classList.remove(this._getAnimationType("exit"));this.$.tooltip.classList.remove("cancel-animation");this.$.tooltip.classList.add("hidden")}, _onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))}, _onAnimationEnd:function(){this._animationPlaying=!1;this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))}, _getAnimationType:function(a){if("entry"===a&&""!==this.animationEntry)return this.animationEntry;if("exit"===a&&""!==this.animationExit)return this.animationExit;if(this.animationConfig[a]&&"string"===typeof this.animationConfig[a][0].name){if(this.animationConfig[a][0].timing&&this.animationConfig[a][0].timing.delay&&0!==this.animationConfig[a][0].timing.delay){var b=this.animationConfig[a][0].timing.delay;"entry"===a?this.updateStyles({"--paper-tooltip-delay-in":b+"ms"}):"exit"===a&&this.updateStyles({"--paper-tooltip-delay-out":b+ "ms"})}return this.animationConfig[a][0].name}}, _removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide"));this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd");this.unlisten(this,"mouseenter","hide")}});/* Math.uuid.js (v1.4) http://www.broofa.com mailto:robert@broofa.com Copyright (c) 2010 Robert Kieffer Dual licensed under the MIT and GPL licenses. */ var aKa="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),wI=function(){for(var a=Array(36),b=0,c,d=0;36>d;d++)8==d||13==d||18==d||23==d?a[d]="-":14==d?a[d]="4":(2>=b&&(b=33554432+16777216*Math.random()|0),c=b&15,b>>=4,a[d]=aKa[19==d?c&3|8:c]);return a.join("")};/* The MIT License (MIT) Copyright (c) 2015-present Dan Abramov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var xI=function(){return function(a){function b(d){if(c[d])return c[d].exports;var f=c[d]={exports:{},id:d,loaded:!1};return a[d].call(f.exports,f,f.exports,b),f.loaded=!0,f.exports} var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(n){return n&&n.__esModule?n:{"default":n}} b.__esModule=!0;b.compose=b.applyMiddleware=b.bindActionCreators=b.combineReducers=b.createStore=void 0;a=c(2);a=d(a);var f=c(7);f=d(f);var h=c(6);h=d(h);var l=c(5);l=d(l);var m=c(1);m=d(m);c=c(3);d(c);b.createStore=a["default"];b.combineReducers=f["default"];b.bindActionCreators=h["default"];b.applyMiddleware=l["default"];b.compose=m["default"]}, function(a,b){b.__esModule=!0;b["default"]=function(){for(var c=arguments.length,d=Array(c),f=0;c>f;f++)d[f]=arguments[f];if(0===d.length)return function(h){return h}; c=function(){var h=d[d.length-1],l=d.slice(0,-1);return{v:function(){return l.reduceRight(function(m,n){return n(m)},h.apply(void 0,arguments))}}}(); return"object"==typeof c?c.v:void 0}}, function(a,b,c){function d(m,n,r){function v(Ea){if("function"!=typeof Ea)throw Error("Expected listener to be a function.");var yb=!0;la===T&&(la=T.slice());return la.push(Ea),function(){if(yb){yb=!1;la===T&&(la=T.slice());var ma=la.indexOf(Ea);la.splice(ma,1)}}} function z(Ea){if(!(0,f["default"])(Ea))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===Ea.type)throw Error("Actions may not have an undefined \"type\" property. Have you misspelled a constant?");if(qa)throw Error("Reducers may not dispatch actions.");try{qa=!0,E=J(E,Ea)}finally{qa=!1}for(var yb=T=la,ma=0;yb.length>ma;ma++)yb[ma]();return Ea} var C;if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(d)(m,n)}if("function"!=typeof m)throw Error("Expected the reducer to be a function.");var J=m,E=n,T=[],la=T,qa=!1;return z({type:l.INIT}),C={dispatch:z,subscribe:v,getState:function(){return E}, replaceReducer:function(Ea){if("function"!=typeof Ea)throw Error("Expected the nextReducer to be a function.");J=Ea;z({type:l.INIT})}},C[h["default"]]=function(){var Ea; return Ea={subscribe:function(yb){function ma(){yb.next&&yb.next(E)} if("object"!=typeof yb)throw new TypeError("Expected the observer to be an object.");ma();return{unsubscribe:v(ma)}}},Ea[h["default"]]=function(){return this},Ea},C} b.__esModule=!0;b.ActionTypes=void 0;b["default"]=d;var f=(a=c(4))&&a.__esModule?a:{"default":a},h=(c=c(11))&&c.__esModule?c:{"default":c},l=b.ActionTypes={INIT:"@@redux/INIT"}}, function(a,b){b.__esModule=!0;b["default"]=function(c){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(c);try{throw Error(c)}catch(d){}}}, function(a,b,c){var d=c(8),f=c(9),h=c(10);b=Object.prototype;var l=Function.prototype.toString,m=b.hasOwnProperty,n=l.call(Object),r=b.toString;a.exports=function(v){if(!h(v)||"[object Object]"!=r.call(v)||f(v))return!1;v=d(v);if(null===v)return!0;v=m.call(v,"constructor")&&v.constructor;return"function"==typeof v&&v instanceof v&&l.call(v)==n}}, function(a,b,c){b.__esModule=!0;var d=Object.assign||function(h){for(var l=1;arguments.length>l;l++){var m=arguments[l],n;for(n in m)Object.prototype.hasOwnProperty.call(m,n)&&(h[n]=m[n])}return h}; b["default"]=function(){for(var h=arguments.length,l=Array(h),m=0;h>m;m++)l[m]=arguments[m];return function(n){return function(r,v,z){r=n(r,v,z);var C=r.dispatch;v=[];var J={getState:r.getState,dispatch:function(E){return C(E)}}; return v=l.map(function(E){return E(J)}),C=f["default"].apply(void 0,v)(r.dispatch),d({},r,{dispatch:C})}}}; var f=function(h){return h&&h.__esModule?h:{"default":h}}(c(1))}, function(a,b){function c(d,f){return function(){return f(d.apply(void 0,arguments))}} b.__esModule=!0;b["default"]=function(d,f){if("function"==typeof d)return c(d,f);if("object"!=typeof d||null===d)throw Error("bindActionCreators expected an object or a function, instead received "+(null===d?"null":typeof d)+". Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");for(var h=Object.keys(d),l={},m=0;h.length>m;m++){var n=h[m],r=d[n];"function"==typeof r&&(l[n]=c(r,f))}return l}}, function(a,b,c){function d(h){Object.keys(h).forEach(function(l){var m=h[l];if(void 0===m(void 0,{type:f.ActionTypes.INIT}))throw Error("Reducer \""+l+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.");var n="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if(void 0===m(void 0,{type:n}))throw Error("Reducer \""+l+"\" returned undefined when probed with a random type. Don't try to handle "+( f.ActionTypes.INIT+" or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined."))})} b.__esModule=!0;b["default"]=function(h){for(var l=Object.keys(h),m={},n=0;l.length>n;n++){var r=l[n];"function"==typeof h[r]&&(m[r]=h[r])}var v=Object.keys(m);try{d(m)}catch(C){var z=C}return function(){var C=0la;la++){var qa=v[la],Ea=C[qa],yb=(0,m[qa])(Ea,J);if(void 0===yb)throw C=J&&J.type,Error("Given action "+(C&&"\""+C+"\""||"an action")+", reducer \""+qa+"\" returned undefined. To ignore an action, you must explicitly return the previous state."); T[qa]=yb;E=E||yb!==Ea}return E?T:C}}; var f=c(2);c(4);c(3)}, function(a){var b=Object.getPrototypeOf;a.exports=function(c){return b(Object(c))}}, function(a){a.exports=function(b){var c=!1;if(null!=b&&"function"!=typeof b.toString)try{c=!!(b+"")}catch(d){}return c}}, function(a){a.exports=function(b){return!!b&&"object"==typeof b}}, function(a,b,c){(function(d){a.exports=c(12)(d||window||this)}).call(b,function(){return this}())}, function(a){a.exports=function(b){var c;b=b.Symbol;return"function"==typeof b?b.observable?c=b.observable:(c="function"==typeof b["for"]?b["for"]("observable"):b("observable"),b.observable=c):c="@@observable",c}}])}; "object"==typeof exports&&"object"==typeof module?module.exports=xI():"function"==typeof define&&define.amd?define([],xI):"object"==typeof exports?exports.Redux=xI():this.Redux=xI();!0;/* Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt SPDX-License-Identifier: BSD-3-Clause */ var bKa=da(["\n\n"]), cKa=tF(bKa);cKa.setAttribute("style","display: none;");document.head.appendChild(cKa.content);var dKa=document.createElement("style");dKa.textContent="[hidden] { display: none !important; }";document.head.appendChild(dKa);/* Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt SPDX-License-Identifier: BSD-3-Clause */ var eKa=da(["\n \n\n
\n \n
[[heading]]
\n
\n\n \n"]); xG({_template:tF(eKa),is:"tp-yt-paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(a){return a? "false":"true"}, _headingChanged:function(a){var b=this.getAttribute("heading"),c=this.getAttribute("aria-label");"string"===typeof c&&c!==b||this.setAttribute("aria-label",a)}, _computeHeadingClass:function(a){return a?" over-image":""}, _computeAnimated:function(a){return a}});var yI=function(a){this.name_=a;this.files_=[];this.directories_=[];this.directoryMap_={}}; yI.prototype.getDirectory=function(a){return this.directoryMap_[a]}; yI.prototype.getName=function(){return this.name_};var AI=function(a,b){this.callback_=b;this.hasError_=!1;this.unscannedDirectories_=[];this.maxConcurrentScans_=5;this.fileOps_=this.directoryOps_=0;this.rootDirectory_=new yI("");fKa(this,a,this.rootDirectory_);zI(this)},fKa=function(a,b,c){for(var d=0;da.maxAttempts_)return!1;0==c?b():a.delayCallId_=aj(function(){a.delayCallId_=null;b()},pKa(a),a); a.attempt_=c;return!0}; oKa.prototype.reset=function(){this.delayCallId_&&bj(this.delayCallId_);this.attempt_=-1}; var pKa=function(a){var b=a.initialDelay_*Math.pow(a.backoffMultiplier_,a.attempt_);0<=a.maxDelayMs_&&(b=Math.min(b,a.maxDelayMs_));return b};var rKa=["Content-Length","Content-Type","Content-Encoding","Transfer-Encoding"];function II(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase())return a[c]} function sKa(a,b){for(var c in a)if(c.toLowerCase()===b.toLowerCase()){delete a[c];break}} function tKa(a){a=y.clone(a);for(var b=0;b=a?LI(this,"Server returned invalid headers."):( this.chunkSize_=Math.floor(this.maxChunkSize_/a)*a,this.transferHandle_=new lKa(c,a),this.dispatchEvent(new FI("o")),this.state_="Upload",this.retryIterator_.reset(),KI(this))}else KI(this)}; e.upload_=function(){var a=this.transferHandle_.getUploadUrl(),b=this.blob_.size;if(dCa()){var c=this.chunkSize_;var d=this.offset_+c>=b;b=rE(this.blob_,this.offset_,d?b:this.offset_+c)}else this.offset_=0,b=this.blob_,d=!0;this.request_=new HI;this.request_.withCredentials_=this.withCredentials_;this.eventHandler_.removeAll();this.eventHandler_.listen(this.request_,"progress",this.onUploadProgress_);c=Ua(this.onUploadComplete_,this,this.offset_+b.size,d);this.eventHandler_.listen(this.request_,"complete", c);this.lastCommand_="upload";this.lastCommandResponseCode_=null;this.dispatchEvent(new GI("p"));d=Object.assign({},this.headers_||{},{"X-Goog-Upload-Command":"upload"+(d?", finalize":""),"X-Goog-Upload-Offset":this.offset_});this.request_.send(a,"POST",b,d)}; e.onUploadProgress_=function(a){this.bytesTransferred_=this.offset_+a.loaded;this.dispatchEvent(new FI("j"))}; e.onUploadComplete_=function(a,b,c){var d=this,f,h;return Aa(function(l){switch(l.nextAddress){case 1:f=c.target;d.lastCommandResponseCode_=f.getStatus();d.dispatchEvent(new GI("q"));if(d.retryOnHttpClientErrorEnabled_?zKa(f)||404==f.getStatus():wKa(f))return d.bytesTransferred_=a,xKa(d,f),l.return();if(yKa(f)){l.jumpTo(2);break}if(!(h=d.detectCorruptedBlobEnabled_)){l.jumpTo(3);break}return q(l,AKa(d),4);case 4:h=l.yieldResult;case 3:if(h)return LI(d,"Blob has been modified or corrupted."),l.return(); d.requireUploadRequestModification_=400==f.getStatus();d.state_="Query";KI(d);return l.return();case 2:if(b)return LI(d,"Got a non-final success response after issuing a finalize command."),l.return();d.bytesTransferred_=a;d.offset_=a;d.retryIterator_.reset();KI(d);return l.return();}})}; e.onQueryComplete_=function(a){var b=a.target;this.lastCommandResponseCode_=b.getStatus();this.dispatchEvent(new GI("q"));wKa(b)?(200===b.getStatus()&&(this.bytesTransferred_=this.blob_.size),xKa(this,b)):yKa(b)?(a=tE(a.target.getAllResponseHeaders()),a=parseInt(II(a,"X-Goog-Upload-Size-Received"),10),isNaN(a)?LI(this,"Server did not respond with current offset."):aa},AKa=function(a){var b; return Aa(function(c){if(1==c.nextAddress){if(!a.blob_||0>=a.originalBlobSize_)return c.return(!1);if(a.blob_.size!==a.originalBlobSize_)return c.return(!0);ta(c,2);if(b=rE(a.blob_,0,1)){var d=new nH,f=pGa(d);d.readAsBinaryString(b);c=q(c,f,4)}else c=c.return(!0);return c}if(2!=c.nextAddress)return c.return(a.blob_.size!==a.originalBlobSize_);va(c);return c.return(!0)})};var MI=function(a,b,c,d,f,h){Ci.call(this);this.payload_=d;this.url_=a;this.method_=b;this.headers_=c;this.metadata_=f;this.metadataOverhead_=0;this.encoding_=h||"binary";a=new QA;this.boundary_="scotty-"+Ic()+"-"+a.toIsoString();this.transferRequest_=null;this.bytesTransferred_=0;this.responseText_=this.responseHeaders_=this.responseCode_=null;this.state_="Ready";this.errorDescription_=null;this.eventHandler_=new Pq(this);Sg(this,this.eventHandler_)}; p(MI,EI);e=MI.prototype; e.run=function(){var a=y.clone(this.headers_);null!=this.payload_.length&&(a["Content-Length"]=this.payload_.length);a=tKa(a);a["X-Goog-Upload-Protocol"]="multipart";a["Content-Type"]="multipart/related; boundary="+this.boundary_;this.state_="Transferring";this.transferRequest_=new HI;this.eventHandler_.removeAll();this.eventHandler_.listen(this.transferRequest_,"progress",this.onTransferProgress_);this.eventHandler_.listen(this.transferRequest_,"complete",this.onTransferComplete_);var b=this.transferRequest_, c=b.send,d=this.url_,f=this.method_,h="--"+this.boundary_+"\r\nContent-Disposition: form-data; name=\"metadata\"\r\n\r\n"+(this.metadata_+"\r\n--")+this.boundary_+"\r\nContent-Disposition: form-data; name=\"Filedata\"\r\nContent-Transfer-Encoding: "+(this.encoding_+"\r\n\r\n")+this.payload_+"\r\n--"+this.boundary_+"--\r\n";this.metadataOverhead_=h.length-this.payload_.length;c.call(b,d,f,h,a)}; e.getBytesTransferred=function(){return this.bytesTransferred_}; e.getIntermediateResponseHeaders=function(){return null}; e.getResponseCode=function(){return this.responseCode_}; e.getResponseHeaders=function(){return this.responseHeaders_}; e.getResponseText=function(){return this.responseText_}; e.getErrorDescription=function(){return this.errorDescription_}; e.getTransferHandle=function(){return null}; e.isCancelSupported=function(){return!0}; e.cancel=function(){"Complete"!=this.state_&&"Error"!=this.state_&&(this.eventHandler_.removeAll(),this.transferRequest_&&this.transferRequest_.abort(),this.state_="Cancel",this.dispatchEvent(new FI("n")))}; e.isPauseSupported=function(){return!1}; e.pause=function(){}; e.unpause=function(){}; e.getLastSentCommand=function(){return null}; e.getLastCommandResponseCode=function(){return null}; e.onTransferProgress_=function(a){this.bytesTransferred_=Math.max(0,a.loaded-this.metadataOverhead_);this.dispatchEvent(new FI("j"))}; e.onTransferComplete_=function(a){var b=a.target.getStatus();void 0===b||-1===b?(this.errorDescription_="Connection broken before response was received.",this.state_="Error",this.dispatchEvent(new FI("m"))):(this.responseCode_=b,a=a.target,b=tE(a.getAllResponseHeaders()),this.responseHeaders_=uKa(b),this.responseText_=a.getResponseText(),this.state_="Complete",this.dispatchEvent(new FI("k")))}; e.createXhrRequest=function(){return new HI};var NI=function(){},BKa=function(a,b,c){var d=void 0===d?!1:d; if(c instanceof CI)return new nKa(a,"POST",b,c.getInputElement(),"");if("string"===typeof c||c instanceof String)return new MI(a,"POST",b,c,"");var f=new JI(void 0);f.url_=a;f.method_="POST";f.headers_=b;f.blob_=c;f.originalBlobSize_=c.size;f.metadata_="";d&&(f.withCredentials_=d);f.state_="Start";return f}; NI.prototype.resumeTransfer=function(a,b,c){c=new JI(c);c.blob_=a;c.originalBlobSize_=a.size;c.transferHandle_=b;a=b.chunkGranularity_;c.chunkSize_=Math.floor(c.maxChunkSize_/a)*a;c.state_="Query";return c}; NI.prototype.newTransferFromBase64String=function(a,b,c,d,f){return new MI(a,b,c,d,f,"base64")}; NI.prototype.isFileOrBlob_=function(a){return a instanceof Blob||"[object File]"===a.toString()||"[object Blob]"===a.toString()};var OI=function(a,b,c){a.timeOfStartCall=new Date().getTime();var d=c||t,f=d.document,h=a.nonce||Ja(d);h&&!a.nonce&&(a.nonce=h);if("help"==a.flow){var l=Ka("document.location.href",d);!a.helpCenterContext&&l&&(a.helpCenterContext=l.substring(0,1200));l=!0;if(b&&JSON&&JSON.stringify){var m=JSON.stringify(b);(l=1200>=m.length)&&(a.psdJson=m)}l||(b={invalidPsd:!0})}b=[a,b,c];d.GOOGLE_FEEDBACK_START_ARGUMENTS=b;c=a.serverUri||"//www.google.com/tools/feedback";if(l=d.GOOGLE_FEEDBACK_START)l.apply(d,b);else {d=c+"/load.js?";for(var n in a)b=a[n],null==b||Qa(b)||(d+=encodeURIComponent(n)+"="+encodeURIComponent(b)+"&");a=$f(f).createElement("SCRIPT");h&&a.setAttribute("nonce",h);yc(a,ph(d));f.body.appendChild(a)}}; Ha("userfeedback.api.startFeedback",OI,void 0);var PI=function(a){G(this,a,0,-1,CKa,null)}; u(PI,F);var QI=function(a){G(this,a,0,-1,null,null)}; u(QI,F);var CKa=[1];PI.prototype.toObject=function(a){var b={linkStateList:ff(Kf(this,QI,1),DKa,a)};a&&(b.$jspbMessageInstance=this);return b}; PI.prototype.serializeBinary=function(){var a=new B;var b=Kf(this,QI,1);0f&&(b=a.substring(f,d),b=b.replace(OKa,""),b=b.replace(PKa,""),b=b.replace("debug-",""),b=b.replace("tracing-",""))}return b} ;var XI=function(){this.loading=!1;this.vm_=null}; XI.prototype.initialize=function(a,b,c,d,f,h){var l=this;h=void 0===h?!1:h;b?(this.loading=!0,WI(b,function(){l.loading=!1;var m=0<=b.indexOf("/th/");(m?window.trayride:window.botguard)?SKa(l,c,d,h,m):(m=QKa(b),spf.script.unload(m),Am(new Ul("Unable to load Botguard","from "+b)))})):a&&(f=ng("SCRIPT"),f.textContent=a,f.nonce=Ja(),document.head.appendChild(f),document.head.removeChild(f),((a=a.includes("trayride"))?window.trayride:window.botguard)?SKa(this,c,d,h,a):Am(Error("Unable to load Botguard from JS")))}; XI.prototype.isInitialized=function(){return!!this.vm_}; var SKa=function(a,b,c,d,f){f=f?window.trayride.ad:window.botguard.bg;if(d)try{a.vm_=new f(b,c?function(){return c(b)}:La)}catch(h){Am(h)}else{try{a.vm_=new f(b)}catch(h){Am(h)}c&&c(b)}}; XI.prototype.invoke=function(a){a=void 0===a?{}:a;return this.vm_?this.vm_.hot?this.vm_.hot(void 0,void 0,a):this.vm_.invoke(void 0,void 0,a):null}; var TKa=function(a,b){var c=ik("botguard_async_snapshot_timeout_ms",3E3);b=void 0===b?{}:b;c=void 0===c?3E3:c;return a.vm_?Promise.race([new Promise(function(d,f){setTimeout(function(){setTimeout(function(){setTimeout(function(){f(Error("Timed out waiting for snapshot"))},0)},0)},c)}), new Promise(function(d){return a.vm_.hot?a.vm_.hot(d,!0,b):a.vm_.invoke(d,!0,b)})]):Promise.resolve(null)}; XI.prototype.dispose=function(){this.vm_=null};function YI(){return Al("CONSENT","").startsWith("YES+")} ;var UKa=[],VKa=!1;function WKa(){if(!N("disable_ad_status_on_html5_clients")&&(!N("condition_ad_status_fetch_on_consent_cookie_html5_clients")||YI())&&"1"!=y.get(A("PLAYER_VARS",{}),"privembed",!1)){var a=function(){VKa=!0;"google_ad_status"in window?rd("DCLKSTAT",1):rd("DCLKSTAT",2)}; try{WI("//static.doubleclick.net/instream/ad_status.js",a)}catch(b){}UKa.push(Ck(Fk,function(){if(!(VKa||"google_ad_status"in window)){try{RKa("//static.doubleclick.net/instream/ad_status.js",a)}catch(b){}VKa=!0;rd("DCLKSTAT",3)}},5E3))}} function XKa(){return parseInt(A("DCLKSTAT",0),10)} ;var YKa=new XI;function ZKa(){return YKa.isInitialized()} function $Ka(a){a=void 0===a?{}:a;return YKa.invoke(a)} ;function aLa(){var a=y.clone(bLa),b;return Xi(new Oi(function(c,d){a.onSuccess=function(f){Oha(f)?c(f):d(new ZI("Request failed, status="+tl(f),"net.badstatus",f))}; a.onError=function(f){d(new ZI("Unknown request error","net.unknown",f))}; a.onTimeout=function(f){d(new ZI("Request timed out","net.timeout",f))}; b=vl("//googleads.g.doubleclick.net/pagead/id",a)}),function(c){c instanceof Yi&&b.abort(); return Ri(c)})} var ZI=function(a,b,c){ab.call(this,a+", errorCode="+b);this.errorCode=b;this.xhr=c;this.name="PromiseAjaxError"}; p(ZI,ab);var $I=function(a){this.wrappedPromise_=void 0===a?null:a;this.state_=0;this.value_=null}; $I.prototype.then=function(a,b,c){return this.wrappedPromise_?this.wrappedPromise_.then(a,b,c):1===this.state_&&a?(a=a.call(c,this.value_),Ni(a)?a:cLa(a)):2===this.state_&&b?(a=b.call(c,this.value_),Ni(a)?a:dLa(a)):this}; $I.prototype.getValue=function(){return this.value_}; $I.prototype.isRejected=function(){return 2==this.state_}; Mi($I);var dLa=function(a){var b=new $I;a=void 0===a?null:a;b.state_=2;b.value_=void 0===a?null:a;return b},cLa=function(a){var b=new $I; a=void 0===a?null:a;b.state_=1;b.value_=void 0===a?null:a;return b};var eLa=function(a){ab.call(this,a.message||a.description||a.name);this.isMissing=a instanceof aJ;this.isTimeout=a instanceof ZI&&"net.timeout"==a.errorCode;this.isCanceled=a instanceof Yi}; p(eLa,ab);eLa.prototype.name="BiscottiError";var aJ=function(){ab.call(this,"Biscotti ID is missing from server")}; p(aJ,ab);aJ.prototype.name="BiscottiMissingError";var bLa={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},bJ=null; function Eha(){if(N("disable_biscotti_fetch_on_html5_clients"))return Ri(Error("Fetching biscotti ID is disabled."));if(N("condition_biscotti_fetch_on_consent_cookie_html5_clients")&&!YI())return Ri(Error("User has not consented - not fetching biscotti id."));if("1"==y.get(A("PLAYER_VARS",{}),"privembed",!1))return Ri(Error("Biscotti ID is not available in private embed mode"));bJ||(bJ=Xi(aLa().then(fLa),function(a){return gLa(2,a)})); return bJ} function fLa(a){a=a.responseText;if(!Nb(a,")]}'"))throw new aJ;a=JSON.parse(a.substr(4));if(1<(a.type||1))throw new aJ;a=a.id;Fha(a);bJ=cLa(a);hLa(18E5,2);return a} function gLa(a,b){b=new eLa(b);Fha("");bJ=dLa(b);0a.byteLength||65496!==a.getUint16(0))a=-2;else{for(var b=2,c=a.byteLength;b>8)break;else b+=f+2}a=-1}switch(a){case 8:this.angle_=270; break;case 3:this.angle_=180;break;case 6:this.angle_=90;break;default:this.angle_=0;}null!=this.dataUrl_&&vLa(this)}; lJ.prototype.readError_=function(){this.reject_()}; var vLa=function(a){ui(a.image_,uLa,a.completeTransform_,!1,a);wc(a.image_,Zb(a.dataUrl_)||$b);"about:invalid#zClosurez"!=a.image_.src&&"data:image/"===a.image_.src.substr(0,11)||a.reject_()}; lJ.prototype.completeTransform_=function(){if("about:invalid#zClosurez"!=this.image_.src){var a=Zb(this.dataUrl_)||$b,b=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;this.invalidAspectRatio=b>this.maxAspectRatio_||b<1/this.maxAspectRatio_;if("image/gif"!==this.mime_||this.disableAnimation_){var c=this.image_.naturalWidth,d=this.image_.naturalHeight,f=b=0,h=this.image_.naturalHeight?this.image_.naturalWidth/this.image_.naturalHeight:null;h>this.maxAspectRatio_?(c= this.maxAspectRatio_*d,b=(c-this.image_.naturalWidth)/2,this.cropped=!0):h<1/this.maxAspectRatio_?(d=this.maxAspectRatio_*c,f=(d-this.image_.naturalHeight)/2,this.cropped=!0):"image/gif"===this.mime_&&this.disableAnimation_&&(this.cropped=!0);if(90==this.angle_||270==this.angle_)h=c,c=d,d=h,h=b,b=f,f=h;switch(this.angle_){case 90:f-=c;break;case 180:b-=c;f-=d;break;case 270:b-=d;}this.cropped||0!==this.angle_%360?(a=document.createElement("canvas"),a.width=c||1,a.height=d||1,this.image_.naturalWidth&& this.image_.naturalHeight&&(c=a.getContext("2d"),c.rotate(Math.PI/180*this.angle_),c.drawImage(this.image_,b,f,this.image_.naturalWidth,this.image_.naturalHeight)),b=a.toDataURL(this.mime_),this.transformedData=Zb(b)||$b):this.transformedData=a}else this.transformedData=a;this.resolve_(this)}};var mJ=function(a,b){li.call(this,a);this.value=b}; p(mJ,li); var nJ=function(a,b,c,d,f,h,l){l=void 0===l?!1:l;Ci.call(this);var m=this;this.url_=a;this.channelId_=b;this.maxFileSizeMb_=c;this.maxAspectRatio_=d;this.dropZoneEl_=f;this.rejectInvalidAspectRatio_=l;this.selectButtonEl_=h;this.reject_=this.resolve_=this.uploadPromise_=null;this.dropZoneOverlay_=new BI(this.dropZoneEl_);this.selectOverlay_=new DI(this.selectButtonEl_);"INPUT"==this.selectButtonEl_.nextSibling.tagName&&this.selectButtonEl_.nextSibling.setAttribute("accept","image/*");this.uploader_=new NI; this.image_=this.transfer_=null;this.handler_=new Pq(this);Sg(this,this.handler_);this.handler_.listen(this.dropZoneOverlay_,"g",this.onChange_).listen(this.dropZoneEl_,"dragover",this.onHover_).listen(this.dropZoneEl_,"dragleave",this.onHover_).listen(h,"click",function(){m.selectOverlay_.click()}).listen(this.selectOverlay_,"i",this.onChange_)}; p(nJ,Ci);nJ.prototype.disposeInternal=function(){for(var a=this.selectButtonEl_.nextSibling;a&&a.parentNode&&"INPUT"==a.tagName;)a.parentNode.removeChild(a),a=this.selectButtonEl_.nextSibling;this.cancel();Ci.prototype.disposeInternal.call(this)}; nJ.prototype.hasImage=function(){return null!=this.image_}; nJ.prototype.uploadPromise=function(){if(!this.hasImage())return null;this.uploadPromise_||this.upload_();return this.uploadPromise_}; nJ.prototype.cancel=function(){wLa(this);this.image_=null}; var wLa=function(a){a.transfer_&&a.transfer_.cancel();a.transfer_=null;a.uploadPromise_=null;a.resolve_=null;a.reject_=null}; e=nJ.prototype;e.upload_=function(){var a=this;wLa(this);this.transfer_=BKa(this.url_,{"X-YouTube-ChannelId":this.channelId_},this.image_);this.handler_.listenOnce(this.transfer_,"k",this.onUploadComplete_);this.handler_.listenOnce(this.transfer_,"m",this.onUploadError_);this.transfer_.run();this.uploadPromise_=new Promise(function(b,c){a.resolve_=b;a.reject_=c})}; e.onChange_=function(a){a.files.length&&(this.image_=a.files[0],this.image_.size>1048576*this.maxFileSizeMb_?(this.image_=null,this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"))):(this.upload_(),new lJ(this.maxAspectRatio_).transform(this.image_).then(Ua(this.onPreview_,this),Ua(this.onPreviewError_,this))))}; e.onPreview_=function(a){if(a.invalidAspectRatio&&(this.rejectInvalidAspectRatio_&&(this.image_=null),this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT")),this.rejectInvalidAspectRatio_))return;a.cropped&&this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.CROPPED_EVENT"));this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.CHANGE_EVENT",a.transformedData))}; e.onPreviewError_=function(){this.image_=null;this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.INVALID_EVENT"))}; e.onHover_=function(a){a.stopPropagation();a.preventDefault();if("dragover"===a.type)a=!0;else if("dragleave"===a.type)a=!1;else return;this.dispatchEvent(new mJ("yt.comments.ImageUploadOverlay.HOVER_EVENT",a))}; e.onUploadComplete_=function(){var a=wj(this.transfer_.getResponseText());this.resolve_(a.encryptedBlobId)}; e.onUploadError_=function(){this.reject_();wLa(this)};var xLa={"consent.google.com":!0,"consent.youtube.com":!0,"consent-daily-0.sandbox.youtube.com":!0,"consent-daily-1.sandbox.youtube.com":!0,"consent-daily-2.sandbox.youtube.com":!0,"consent-daily-3.sandbox.youtube.com":!0,"consent-daily-4.sandbox.youtube.com":!0,"consent-daily-5.sandbox.youtube.com":!0,"consent-daily-6.sandbox.youtube.com":!0,"consent-autopush.sandbox.youtube.com":!0,"daily-0.consent.corp.youtube.com":!0,"daily-1.consent.corp.youtube.com":!0,"daily-2.consent.corp.youtube.com":!0, "daily-3.consent.corp.youtube.com":!0,"daily-4.consent.corp.youtube.com":!0,"daily-5.consent.corp.youtube.com":!0,"daily-6.consent.corp.youtube.com":!0,"autopush.consent.corp.youtube.com":!0,"dev.consent.corp.youtube.com":!0,"consent-daily-0.sandbox.google.com":!0,"consent-daily-1.sandbox.google.com":!0,"consent-daily-2.sandbox.google.com":!0,"consent-daily-3.sandbox.google.com":!0,"consent-daily-4.sandbox.google.com":!0,"consent-daily-5.sandbox.google.com":!0,"consent-daily-6.sandbox.google.com":!0, "consent-autopush.sandbox.google.com":!0,"daily-0.consent.corp.google.com":!0,"daily-1.consent.corp.google.com":!0,"daily-2.consent.corp.google.com":!0,"daily-3.consent.corp.google.com":!0,"daily-4.consent.corp.google.com":!0,"daily-5.consent.corp.google.com":!0,"daily-6.consent.corp.google.com":!0,"autopush.consent.corp.google.com":!0,"dev.consent.corp.google.com":!0};var yLa=window,oJ=yLa.YT_I18N_FORMATTING_GOOG_LOCALE||"en",zLa=yLa.YT_I18N_FORMATTING_DATE_TIME_SYMBOLS||MA;UGa=WGa=!0;UGa=!1; uH({id:"America/Los_Angeles",names:["PST","PST","PDT","PDT"],std_offset:-480,transitions:[2770,60,7137,0,11506,60,16041,0,20410,60,24777,0,29146,60,33513,0,35194,60,42249,0,45106,60,50985,0,55354,60,59889,0,64090,60,68625,0,72994,60,77361,0,81730,60,86097,0,90466,60,94833,0,99202,60,103569,0,107938,60,112473,0,116674,60,121209,0,125578,60,129945,0,134314,60,138681,0,143050,60,147417,0,151282,60,156153,0,160018,60,165057,0,168754,60,173793,0,177490,60,182529,0,186394,60,191265,0,195130,60,200001,0, 203866,60,208905,0,212602,60,217641,0,221338,60,226377,0,230242,60,235113,0,238978,60,243849,0,247714,60,252585,0,256450,60,261489,0,265186,60,270225,0,273922,60,278961,0,282826,60,287697,0,291562,60,296433,0,300298,60,305337,0,309034,60,314073,0,317770,60,322809,0,326002,60,331713,0,334738,60,340449,0,343474,60,349185,0,352378,60,358089,0,361114,60,366825,0,369850,60,375561,0,378586,60,384297,0,387322,60,393033,0,396058,60,401769,0,404962,60,410673,0,413698,60,419409,0,422434,60,428145,0,431170, 60,436881,0,439906,60,445617,0,448810,60,454521,0,457546,60,463257,0,466282,60,471993,0,475018,60,480729,0,483754,60,489465,0,492490,60,498201,0,501394,60,507105,0,510130,60,515841,0,518866,60,524577,0,527602,60,533313,0,536338,60,542049,0,545242,60,550953,0,553978,60,559689,0,562714,60,568425,0,571450,60,577161,0,580186,60,585897,0,588922,60,594633,0]}); function ALa(a){a=BLa(a,2);return"ru"!==oJ&&"es_419"!==oJ&&"es-419"!==oJ&&"es"!==oJ&&"es_US"!==oJ&&"es-US"!==oJ&&"fr"!==oJ&&"pl"!==oJ&&"it"!==oJ&&"nl"!==oJ&&"uk"!==oJ&&"fr_CA"!==oJ&&"fr-CA"!==oJ||""===a?a:a[0].toLocaleUpperCase()+a.substring(1)} var DLa=CLa(function(){return{dateFormat:3,timeFormat:7,joinerStyle:3,capitalize:function(a){return a}}}); function CLa(a){return function(b){var c=a(),d=BLa(b,c.dateFormat);b=BLa(b,c.timeFormat);var f=c.capitalize,h=zLa.DATETIMEFORMATS[c.joinerStyle];h=h.replace(/'(?!')/g,"");h=h.replace("{0}",b);h=h.replace("{1}",d);return f.call(c,h)}} function ELa(a){return a?"string"===typeof a.seconds&&(void 0===a.nanos||"number"===typeof a.nanos):!1} function FLa(a){return new Date(1E3*Number(a.seconds)+1E-6*(a.nanos||0))} function BLa(a,b){if("function"===typeof a.getTime)a={date:a};else if(ELa(a))a={date:FLa(a)};else if(typeof ELa(a.timestamp)&&"number"===typeof a.i18nInternalSecondsEastOfUtc)a={date:FLa(a.timestamp),timeZone:uH(-a.i18nInternalSecondsEastOfUtc/60)};else throw Error("Ill-formed LocalTime or Timestamp "+JSON.stringify(a));var c=a;a=c.date;c=c.timeZone;b=GLa(b).format(a,c);if("my"===oJ&&b.includes("B")){var d=c?Number(GLa("H").format(a,c)):a.getHours();a=c?Number(GLa("m").format(a,c)):a.getMinutes(); b=12>d?b.replace("B","\u1014\u1036\u1014\u1000\u103A"):12===d&&0===a?b.replace("B","\u1019\u103D\u1014\u103A\u1038\u1010\u100A\u1037\u103A"):16>d?b.replace("B","\u1014\u1031\u1037\u101C\u101A\u103A"):19>d?b.replace("B","\u100A\u1014\u1031"):b.replace("B","\u100A")}return b} var HLa=new Map;function GLa(a){if(HLa.has(a))return HLa.get(a);var b=ILa(a);b=JLa(b);b=new wH(b,zLa);HLa.set(a,b);return b} function ILa(a){return new wH(a,zLa).patternParts_.map(function(b){return 0===b.type?"'"+b.text+"'":b.text}).join("")} function JLa(a){return"en"===oJ||"es_US"===oJ||"es-US"===oJ?a:a.replace(/(?:a\s?)?([hK]+)([:.]mm)(?:\s?a)?/g,function(b,c,d){return"H".repeat(c.length)+d})} ;function pJ(a,b){if(!a.includes("DATE_PLACEHOLDER"))return a;var c=new Date(0);c.setUTCSeconds(b);return a.replace("DATE_PLACEHOLDER",DLa(c))} ;function KLa(a){var b;mk(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)?qJ()==a&&(b=document):b=a;if(b&&(a=mk(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],b))){a.call(b)instanceof Promise||Promise.resolve();return}Promise.resolve()} function LLa(){var a=document;return lb(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(b){return"on"+b.toLowerCase()in a})} function qJ(){var a=void 0===a?!1:a;var b=mk(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);if(a)for(;b&&b.shadowRoot;)b=b.shadowRoot.fullscreenElement;return b?b:null} ;function MLa(a,b){b=void 0===b?!0:b;a.addEventListener("wheel",NLa);a.overscrollConfig={cooldown:b}} function OLa(a){a.overscrollConfig=void 0;a.removeEventListener("wheel",NLa)} function NLa(a){var b=a.deltaY,c=a.target,d=null;if(window.Polymer&&window.Polymer.Element){if(c=a.path||a.composedPath&&a.composedPath()){c=k(c);for(var f=c.next();!f.done&&(f=f.value,!PLa(f,b));f=c.next())if(f.overscrollConfig){d=f;break}}}else for(;c&&!PLa(c,b);){if(c.overscrollConfig){d=c;break}c=c.parentElement}d&&(b=d.overscrollConfig,b.cooldown?(d=a.deltaY,c=b.lastDeltaY||0,b.lastDeltaY=d,f=b.lastStopped||0,c&&f&&0=Math.abs(d)?(d=f+1200,c=!1):(d=f+600,c=!0):(d=Xa()+600, c=!0),d>Xa()&&(a.preventDefault(),c&&(b.lastStopped=Xa()))):a.preventDefault())} function PLa(a,b){return 0>b&&0=c.version.compare(a.currentVersion_))){var d=c.payload;d=d?JSON.parse(d):void 0;a.invalidationCallback_(b.name,d);c.version&&(a.currentVersion_=c.version)}},function(c){return Zm(c)})},function(){},this)}; e.unregister=function(){var a=this;this.initializationPromise_.then(function(){null!=a.subscription_&&(a.subscription_.unsubscribe(),a.subscription_=null)},function(){},this)}; e.waitForInitialized=function(){return this.initializationPromise_};var yNa=function(a){Gl.call(this,1,arguments);this.csn=a}; p(yNa,Gl);var kia=new Hl("screen-created",yNa),uJ=[],ANa=zNa,BNa=0;function CNa(a,b,c,d,f,h){var l=ANa();h={csn:l,pageVe:new Mn({veType:b,youtubeData:h}).getAsJson()};c&&c.visualElement?h.implicitGesture={parentCsn:c.clientScreenNonce,gesturedVe:c.visualElement.getAsJson()}:c&&Am(new Ul("newScreen() parent element does not have a VE - rootVe",b));d&&(h.cloneCsn=d);b={cttAuthInfo:f,sequenceGroup:l};a?jl("screenCreated",h,a,b):Bm("screenCreated",h,b);Kl(kia,new yNa(l));return l} function vJ(a,b,c,d){c={csn:b,parentVe:c.getAsJson(),childVes:gb(d,function(h){return h.getAsJson()})}; d=k(d);for(var f=d.next();!f.done;f=d.next())f=f.value.getAsJson(),(y.isEmpty(f)||!f.trackingParams&&!f.veType)&&Am(Error("Child VE logged with no data"));d={cttAuthInfo:Un(b),sequenceGroup:b};"UNDEFINED_CSN"==b?wJ("visualElementAttached",c,d):a?jl("visualElementAttached",c,a,d):Bm("visualElementAttached",c,d)} function DNa(a,b,c,d){c={csn:b,ve:c.getAsJson(),eventType:1};d&&(c.clientData=d);d={cttAuthInfo:Un(b),sequenceGroup:b};"UNDEFINED_CSN"==b?wJ("visualElementShown",c,d):a?jl("visualElementShown",c,a,d):Bm("visualElementShown",c,d)} function ENa(a,b,c,d){c={csn:b,ve:c.getAsJson(),eventType:4};d&&(c.clientData=d);d={cttAuthInfo:Un(b),sequenceGroup:b};"UNDEFINED_CSN"==b?wJ("visualElementShown",c,d):a?jl("visualElementShown",c,a,d):Bm("visualElementShown",c,d)} function FNa(a,b,c,d,f){var h=(d=void 0===d?!1:d)?16:8;c={csn:b,ve:c.getAsJson(),eventType:h};f&&(c.clientData=f);d={cttAuthInfo:Un(b),sequenceGroup:b,endOfSequence:d};"UNDEFINED_CSN"==b?wJ("visualElementHidden",c,d):a?jl("visualElementHidden",c,a,d):Bm("visualElementHidden",c,d)} function xJ(a,b,c,d,f){d=d||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK";c={csn:b,ve:c.getAsJson(),gestureType:d};f&&(c.clientData=f);f={cttAuthInfo:Un(b),sequenceGroup:b};"UNDEFINED_CSN"==b?wJ("visualElementGestured",c,f):a?jl("visualElementGestured",c,a,f):Bm("visualElementGestured",c,f)} function GNa(a,b,c,d){c={csn:b,ve:c.getAsJson(),clientData:d};d={cttAuthInfo:Un(b),sequenceGroup:b};"UNDEFINED_CSN"==b?wJ("visualElementStateChanged",c,d):a?jl("visualElementStateChanged",c,a,d):Bm("visualElementStateChanged",c,d)} function zNa(){for(var a=Math.random()+"",b=[],c=0,d=0;d>=8);b[c++]=f}return Le(b,3)} function wJ(a,b,c){uJ.push({payloadName:a,payload:b,options:c});BNa||(BNa=iia())} function jia(a){if(uJ){for(var b=k(uJ),c=b.next();!c.done;c=b.next())c=c.value,c.payload&&(c.payload.csn=a.csn,jl(c.payloadName,c.payload,null,c.options));uJ.length=0}BNa=0} ;function yJ(a,b,c){vJ(N("use_default_events_client")?void 0:Rm,a,b,[c])} function zJ(a,b){DNa(N("use_default_events_client")?void 0:Rm,a,b,void 0)} function AJ(a,b){var c=N("use_default_events_client")?void 0:Rm;eb(b,function(d){ENa(c,a,d,void 0)})} function HNa(a,b,c){var d=N("use_default_events_client")?void 0:Rm;eb(b,function(f){FNa(d,a,f,c,void 0)})} function BJ(a,b,c){xJ(N("use_default_events_client")?void 0:Rm,a,b,void 0,c)} function INa(a,b,c,d){xJ(N("use_default_events_client")?void 0:Rm,a,b,c,d)} function JNa(a,b,c){GNa(N("use_default_events_client")?void 0:Rm,a,b,c)} ;var CJ=function(){this.shownElements_=new Set;this.hiddenElements_=new Set;this.visibleState_=new Map;this.csn_=null;this.client_=Rm}; CJ.prototype.setClient=function(a){this.client_=a}; var KNa=function(){var a=CJ.getInstance();a.clear();a.csn_=Tn()}; CJ.prototype.clear=function(){this.shownElements_.clear();this.hiddenElements_.clear();this.visibleState_.clear();this.csn_=null}; var MNa=function(a,b,c){var d=DJ(0,b),f=b;N("enable_ve_tracker_key")&&(f=b.visualElement?b.visualElement:d);var h=a.shownElements_.has(f),l=a.visibleState_.get(f);a.shownElements_.add(f);a.visibleState_.set(f,!0);b.impressionLog&&!h&&b.impressionLog();if(d||b.visualElement)if(c=LNa(a,b,c))if(f=!(!b.data||!b.data.loggingDirectives),EJ(b)||f){d=b.visualElement?b.visualElement:Nn(d);var m=b.interactionLoggingClientData;f||h?EJ(b)&4?l||ENa(a.client_,c,d,m):EJ(b)&1&&!h&&DNa(a.client_,c,d,m):DNa(a.client_, c,d,m)}},FJ=function(a,b,c){var d=DJ(0,b),f=b; N("enable_ve_tracker_key")&&(f=b.visualElement?b.visualElement:d);var h=a.hiddenElements_.has(f),l=a.visibleState_.get(f);a.hiddenElements_.add(f);a.visibleState_.set(f,!1);if(!1===l)return!0;if(!d&&!b.visualElement)return!1;c=LNa(a,b,c);if(!c||!EJ(b)&&b.data&&b.data.loggingDirectives)return!1;d=b.visualElement?b.visualElement:Nn(d);EJ(b)&8?FNa(a.client_,c,d):EJ(b)&2&&!h&&(a=a.client_,b={csn:c,ve:d.getAsJson(),eventType:2},h={cttAuthInfo:Un(c),sequenceGroup:c},"UNDEFINED_CSN"==c?wJ("visualElementHidden", b,h):a?jl("visualElementHidden",b,a,h):Bm("visualElementHidden",b,h));return!0},NNa=function(a,b,c){var d=Array.from(b.children); b.shadowRoot&&(d=d.concat(b.shadowRoot.children));if(d&&d.length){b=d.length;for(var f=0;fh||m<=h||(l=a.getScreenLayer?a.getScreenLayer():void 0,l=Tn(l)||"",m=DJ(CJ.getInstance(),a),INa(l,a.visualElement?a.visualElement:Nn(m),"INTERACTION_LOGGING_GESTURE_TYPE_HOVER",{hoverData:{durationHoveredMs:h}}));ONa(a)},function(){HJ&&(HJ(),HJ=null); d&&(PNa(a),ONa(a))}); return f} function RNa(a){var b;return Xi(new Oi(function(c,d){HJ=function(){d(Error("mouse did not stop"))}; b=Fk.debounce(td(function(){Ai(f);c()}),1,ik("min_mouse_still_duration",100)); var f=vi(a,"mousemove",b)}),function(){var c=Fk,d=c.cancelDebouncedJobMap_.get(b); d&&c.cancelJob(d)})} function TNa(a){var b;return Xi(new Oi(function(c,d){HJ=function(){d(Error("mouse did not leave"))}; b=ui(a,"mouseleave",td(function(){c()}))}),function(){Ai(b)})} function SNa(a,b){return ui(a,"mouseleave",td(b))} ;var UNa={CAPTIONS_MANAGER_PAGE:29434,CHANNEL_PAGE_VIEW:3611,HOME_PAGE:3854,MANGO_NOTIFICATION_SOCIAL_MESSAGES:42993,SEARCH_PAGE:4724,TRENDING_PAGE:96370,ABANDONED_WATCH_NOTIFICATION:27686,ACCESSIBILITY_SETTINGS_SCREEN:85013,ACCOUNT_PAGE:23462,ADD_BY_EMAIL_PAGE:42016,ADD_BY_LINK_PAGE:62407,ADD_CONTACTS_PAGE:26926,ADDME_SHARE_PANEL_PAGE:43781,ADMIN_REVIEW_PAGE:51236,ADMIN_REVUE_PAGE:79148,ADMIN_TOOLBOX_PAGE:50160,ADMIN_YURT_PAGE:77504,ANALYTICS_CATALYST_FEEDBACK_SCREEN:87907,ANALYTICS_MAIN_SCREEN:18630, APP_PROMO_AD_ENGAGEMENT_PANEL_SCREEN:54445,AR_CAMERA_ENGAGEMENT_PANEL_SCREEN:80935,BACKGROUND_PLAYBACK_NOTIFICATION_SCREEN:105675,BACKSTAGE_FULLSCREEN_IMAGE_VIEWER_SCREEN:37521,BACKSTAGE_POST_DIALOG_SCREEN:47786,BEDTIME_REMINDER_DIALOG_PAGE:98349,BROWSE_PAGE:6827,CHANNEL_BROWSE_PAGE:7282,COMMENT_REPLIES_ENGAGEMENT_PANEL_SCREEN:32276,COMMENTS_ENGAGEMENT_PANEL_SCREEN:76278,CONFIRMATION_FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:93911,CONSENT_BUMP_PAGE:106531,CONTACTS_PERMISSION_DENIED_FOREVER_PAGE:27259,CONTACTS_PERMISSION_PRE_PROMPT_PAGE:27262, CONTACTS_PERMISSION_SYSTEM_DIALOG_PAGE:27263,CONVERSATION_PAGE:21759,CONVERSATION_PARTICIPANTS_PAGE:27107,CONVERSATION_VIDEO_PICKER_PAGE:62936,COWATCH_WATCH_PAGE:49568,CREATOR_STUDIO_ANALYTICS_SCREEN:38408,CREATOR_STUDIO_ARTIST_ANALYTICS_SCREEN:80637,CREATOR_STUDIO_ARTIST_CONCERTS_PAGE:68727,CREATOR_STUDIO_ARTIST_PRESS_KIT_PAGE:68728,CREATOR_STUDIO_ASSET_ANALYTICS_SCREEN:80353,CREATOR_STUDIO_ASSET_METADATA_SCREEN:80356,CREATOR_STUDIO_CHANNEL_COMMENTS_SCREEN:74610,CREATOR_STUDIO_CHANNEL_COPYRIGHT:45707, CREATOR_STUDIO_CHANNEL_COPYRIGHT_INTERSTITIAL_PAGE:83962,CREATOR_STUDIO_CHANNEL_COPYRIGHT_STRIKES_MODAL_PAGE:83970,CREATOR_STUDIO_CHANNEL_DASHBOARD_PAGE:46713,CREATOR_STUDIO_CHANNEL_EDITING_PAGE:89711,CREATOR_STUDIO_CHANNEL_MONETIZATION_SCREEN:74612,CREATOR_STUDIO_CHANNEL_SPONSORSHIPS_SCREEN:93265,CREATOR_STUDIO_CHANNEL_TRANSLATIONS_SCREEN:74611,CREATOR_STUDIO_CMS_ASSET_CLAIMED_VIDEOS_SCREEN:113533,CREATOR_STUDIO_CMS_ASSET_COMPOSITION_SCREEN:93252,CREATOR_STUDIO_CMS_ASSET_EMBEDDED_IN_SCREEN:99357, CREATOR_STUDIO_CMS_ASSET_GROUP_ASSETS_SCREEN:94521,CREATOR_STUDIO_CMS_ASSET_GROUP_CAMPAIGNS_SCREEN:114252,CREATOR_STUDIO_CMS_ASSET_GROUP_CLAIMED_VIDEOS_SCREEN:113532,CREATOR_STUDIO_CMS_ASSET_GROUP_METADATA_SCREEN:94522,CREATOR_STUDIO_CMS_ASSET_GROUPS_SCREEN:94583,CREATOR_STUDIO_CMS_ASSET_ISSUE_SCREEN:88E3,CREATOR_STUDIO_CMS_ASSET_METADATA_SCREEN:93253,CREATOR_STUDIO_CMS_ASSET_OWNERSHIP_POLICY_SCREEN:93254,CREATOR_STUDIO_CMS_ASSET_OWNERSHIP_SCREEN:94387,CREATOR_STUDIO_CMS_ASSET_POLICY_SCREEN:94388, CREATOR_STUDIO_CMS_ASSET_REFERENCE_SCREEN:93255,CREATOR_STUDIO_CMS_ASSET_SOUND_RECORDINGS_SCREEN:97424,CREATOR_STUDIO_CMS_ASSETS_LIST_SCREEN:72502,CREATOR_STUDIO_CMS_CAMPAIGNS_PAGE:110111,CREATOR_STUDIO_CMS_CHANNELS_PAGE:76019,CREATOR_STUDIO_CMS_CLAIMED_VIDEO_DETAIL_SCREEN:117092,CREATOR_STUDIO_CMS_CLAIMED_VIDEO_POLICY_SCREEN:117093,CREATOR_STUDIO_CMS_CLAIMED_VIDEOS_LIST_SCREEN:89431,CREATOR_STUDIO_CMS_CONTENT_DELIVERY_SCREEN:110466,CREATOR_STUDIO_CMS_DASHBOARD_PAGE:77240,CREATOR_STUDIO_CMS_ISSUES_LIST_SCREEN:60508, CREATOR_STUDIO_CMS_LICENSING_SCREEN:105350,CREATOR_STUDIO_CMS_MANUAL_CLAIMING_VIDEO_SEARCH_SCREEN:73393,CREATOR_STUDIO_CMS_POLICIES_SCREEN:113534,CREATOR_STUDIO_CMS_REPORTS_SCREEN:92098,CREATOR_STUDIO_CMS_VIDEO_DETAIL_SCREEN:84517,CREATOR_STUDIO_CMS_VIDEO_LIST_SCREEN:83759,CREATOR_STUDIO_CONTENT_OWNER_ANALYTICS_SCREEN:80357,CREATOR_STUDIO_GROUP_ANALYTICS_SCREEN:86113,CREATOR_STUDIO_LIVE_CHAT_MONETIZATION:72598,CREATOR_STUDIO_LIVE_STREAMING_PAGE:72733,CREATOR_STUDIO_MENTION_LIST_SCREEN:107349,CREATOR_STUDIO_MOBILE_ACCOUNT_SCREEN:118203, CREATOR_STUDIO_MOBILE_COMMENT_SCREEN:117431,CREATOR_STUDIO_MOBILE_NOTIFICATIONS_SCREEN:117429,CREATOR_STUDIO_MOBILE_NOTIFICATIONS_SETTINGS_SCREEN:117430,CREATOR_STUDIO_MOBILE_PLAYLIST_EDITOR_SCREEN:117432,CREATOR_STUDIO_MOBILE_SETTINGS_SCREEN:117259,CREATOR_STUDIO_MUSIC_SCREEN:97615,CREATOR_STUDIO_MY_VIDEOS_SCREEN:31402,CREATOR_STUDIO_PITCH_MUSIC_SCREEN:84774,CREATOR_STUDIO_PLAYLISTS_PAGE:95117,CREATOR_STUDIO_POST_COMMENTS_SCREEN:98930,CREATOR_STUDIO_POST_DETAILS_SCREEN:98931,CREATOR_STUDIO_POST_LIST_SCREEN:98932, CREATOR_STUDIO_SCREEN:43347,CREATOR_STUDIO_TAKEDOWN_WEBFORM_PAGE:45474,CREATOR_STUDIO_TOU_PAGE:100352,CREATOR_STUDIO_TOU_STRIKES_DIALOG_PAGE:84758,CREATOR_STUDIO_TOU_STRIKES_INTERSTITIAL_PAGE:98443,CREATOR_STUDIO_UNIFIED_TAKEDOWN_FORM_PAGE:117985,CREATOR_STUDIO_VIDEO_ANALYTICS_SCREEN:74613,CREATOR_STUDIO_VIDEO_COMMENTS_SCREEN:74614,CREATOR_STUDIO_VIDEO_COPYRIGHT_DIALOG:64502,CREATOR_STUDIO_VIDEO_DETAILS_SCREEN:74615,CREATOR_STUDIO_VIDEO_EDITOR_SCREEN:74616,CREATOR_STUDIO_VIDEO_MONETIZATION_SCREEN:74617, CREATOR_STUDIO_VIDEO_RIGHTS_MANAGEMENT_SCREEN:77820,CREATOR_STUDIO_VIDEO_TRANSLATIONS_SCREEN:74618,CREATOR_STUDIO_YPP_SIGNUP_INELIGIBLE:93278,CREATOR_STUDIO_YPP_SIGNUP_MAIN:93274,CREATOR_STUDIO_YPP_SIGNUP_OVERVIEW:93275,CREATOR_STUDIO_YPP_SIGNUP_REJECTED:93276,CROWDSOURCING_CONTRIBUTOR_QUEUE_PAGE:22110,CROWDSOURCING_EDITOR_PAGE:29433,DIRECT_SIGN_IN_AUTHZEN_CHALLENGE_PAGE:82047,DIRECT_SIGN_IN_DEVICE_PROMPT_CHALLENGE_PAGE:113550,DIRECT_SIGN_IN_IDENTIFIER_ENTRY_PAGE:75836,DIRECT_SIGN_IN_PASSWORD_ENTRY_PAGE:75837, DOWNLOADS_PAGE:42352,EDIT_CREATOR_COMPLIANCE_PAGE:84512,EDIT_INK_OVERLAY:76065,EDIT_VOLUME_SHEET_PANEL:75989,EMBED_PAGE:16623,EMBED_PREVIEW_PAGE:32594,EMBED_WATCH_PAGE:27240,ENGAGEMENT_PANEL_SCREEN:32633,EXPLORE_PAGE:74858,FEED_PAGE:3945,FEEDBACK_PAGE:16989,FINE_LOCATION_PERMISSION_SYSTEM_DIALOG_PAGE:45520,FIRST_TIME_SIGN_IN_COUNTERFACTUAL_PAGE:25488,FIRST_TIME_SIGN_IN_VARIANT1_PAGE:25492,FIRST_TIME_SIGN_IN_VARIANT2_PAGE:25494,FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:55760,FULL_SCREEN_WATCH_PAGE:14057, GAME_PAGE:18451,GAMING_ACCOUNT_LINK_CONFIRM_DIALOG:57204,GAMING_ACCOUNT_LINK_SETTING_DIALOG:57203,GAMING_LEFT_RAIL:17897,GAMING_MULTIPLE_ACCOUNT_LINK_DIALOG:57205,GAMING_ONBOARDING_PAGE:18198,GAMING_RIGHT_RAIL:17898,GAMING_WARM_WELCOME_PAGE:17909,GAMING_WATCH_NEXT_CONTAINER_SCREEN:43980,GENERIC_UPSELL_DIALOG_PAGE:46220,GUIDE_PAGE:11721,HELP_PAGE:49954,HISTORY_PAGE:96369,IMMERSIVE_AD_ENGAGEMENT_PANEL_SCREEN:56251,INLINE_SIGN_IN_PAGE:25624,INTERSTITIAL_PAGE:16906,INTERSTITIAL_PRODUCT_SHELF_ENGAGEMENT_PANEL_SCREEN:99999, INVITATION_FORMFILL_AD_ENGAGEMENT_PANEL_SCREEN:68172,INVITE_MORE_PANEL_PAGE:27068,JOIN_GROUP_PAGE:47973,KIDS_ACTION_PAGE:72773,KIDS_ALL_USER_CONSENT_FLOW_ACTIVITY_PAGE:26970,KIDS_ALL_USER_SIGN_IN_ACTIVITY_PAGE:26971,KIDS_ANNOUNCEMENT_DIALOG_PAGE:96805,KIDS_APP_REVIEW_FLOW_PAGE:17752,KIDS_EDIT_CORPUS_PREFERENCES_FLOW_PAGE:73233,KIDS_IMPRESSUM_NOTICE_FLOW_PAGE:109512,KIDS_NO_RED_ACCOUNT_CONSENT_FLOW_PAGE:22256,KIDS_ONBOARDING_FLOW_PAGE:14115,KIDS_ONBOARDING_FOR_EXISTING_USER_FLOW_PAGE:22696,KIDS_PARENT_PROFILE_SETTINGS_PAGE:89278, KIDS_PARENT_SETTINGS_PAGE:89277,KIDS_PRIVACY_NOTICE_FLOW_PAGE:109513,KIDS_PROFILE_CREATION_FLOW_PAGE:43278,KIDS_PROFILE_PIN_CREATION_PAGE:43459,KIDS_PROFILE_PIN_GATE:43464,KIDS_PROFILE_SETTINGS_PAGE:89279,KIDS_PROFILE_SWITCHER_PAGE:43717,KIDS_PROMO_EVENT_PAGE_VIEW:55764,KIDS_RED_ACCOUNT_CONSENT_FLOW_PAGE:22255,KIDS_SECRET_CODE_PAGE:89281,KIDS_SHOW_BROWSE_PAGE:40963,KIDS_SIGN_IN_FLOW_PAGE:43277,KIDS_UNICORN_ONBOARDING_FLOW_PAGE:43442,LABS_PAGE:91824,LIBRARY_PAGE:96367,LIGHTWEIGHT_CAMERA_PAGE:36850, LIGHTWEIGHT_CREATION_PAGE:72694,LIGHTWEIGHT_PLAYER_PAGE:37414,LIGHTWEIGHT_VIDEO_EDITING_PAGE:36851,LIVE_CHAT_ENGAGEMENT_PANEL_SCREEN:73491,LIVE_CHAT_PAGE:54473,LIVE_DASHBOARD_PAGE:43375,LIVE_STUDIO_PAGE:46674,MAIN_AUTO_OFFLINE_NOTIFICATIONS_PAGE:32473,MANGO_ACCOUNT_ERROR_PAGE:72901,MANGO_ACCOUNT_LOADING_PAGE:72906,MANGO_CHANNEL_DESCRIPTION_PAGE:50947,MANGO_CHANNEL_LIST_PAGE:50612,MANGO_CHANNEL_PREVIEW_PAGE:50613,MANGO_CHANNEL_VIDEOS_PAGE:50942,MANGO_DIALOG_YTB_EDUCATION:84938,MANGO_DIALOG_YTB_INVALID_FILE_ERROR:84943, MANGO_DIALOG_YTB_PERMISSION:84939,MANGO_DIALOG_YTB_PERMISSION_DEEP_LINK:84941,MANGO_DIALOG_YTB_PERMISSION_ERROR:84944,MANGO_DIALOG_YTB_PERMISSION_SETTINGS:84940,MANGO_DIALOG_YTB_PERMISSION_SETTINGS_DEEP_LINK:84942,MANGO_DISCO_SEND_PAGE:35585,MANGO_EXPLORATION_PAGE:51926,MANGO_GUEST_DOWNLOAD_TAB_PAGE:79983,MANGO_HOME_HOUSEWARMING_CARD_PAGE:63238,MANGO_HOME_PAGE:18921,MANGO_HOME_TOPICK_PICKER_PAGE:63241,MANGO_HOME_VIDEO_REPORTING_PAGE:57893,MANGO_LOW_APKVERSION_PAGE:41182,MANGO_MAIN_PAGE:33424,MANGO_NOTIFICATION_DAILY_VIDEOS_AVAILABLE_PAGE:22207, MANGO_NOTIFICATION_UPGRADE_AVAILABLE_PAGE:36229,MANGO_NOTIFICATION_VIDEO_TRANSFER_COMPLETED_PAGE:22206,MANGO_NOTIFICATION_VIDEO_TRANSFER_IN_PROGRESS_PAGE:22205,MANGO_ONBOARDING_ACCOUNT_CREATION_PAGE:18993,MANGO_ONBOARDING_COMPLETE_PAGE:19001,MANGO_ONBOARDING_LANGUAGE_SELECTION_PAGE:18990,MANGO_ONBOARDING_PHONE_NUMBER_SELECTION_PAGE:18991,MANGO_ONBOARDING_PHONE_VERIFICATION_PAGE:18997,MANGO_ONBOARDING_SCREEN:18725,MANGO_ONBOARDING_SLIDE_SHOW_PAGE:19003,MANGO_ONBOARDING_VIDEO_PREVIEW_PAGE:36874,MANGO_PROFILE_PAGE:44763, MANGO_SAVED_PAGE:33427,MANGO_SETTINGS_MANAGE_HISTORY_PAGE:67793,MANGO_SETTINGS_PAGE:22182,MANGO_SPLASH_PAGE:37091,MANGO_STORAGE_MANAGEMENT_PAGE:34650,MANGO_SUBSCRIPTIONS_FEED_PAGE:50617,MANGO_UNFORK_MIGRATION_ERROR_PAGE:47261,MANGO_UPDATE_APK_PAGE:22287,MANGO_VIDEO_FORMAT_SELECTION_PAGE:25144,MANUAL_SYNC_DOWNLOADED_PLAYLIST_DIALOG_PAGE:97917,MDX_ASSISTED_TV_SIGN_IN_DIALOG_PAGE:62397,MDX_FIJI_DRAWER:36961,MDX_LOCAL_NETWORK_PERMISSIONS_REQUEST_PAGE:108035,MDX_REMOTE_WATCH_DIALOG:27426,MDX_SMART_PAIRING_DELETE_TV_CODES_PAGE:27857, MDX_SMART_PAIRING_PAIR_WITH_TV_PAGE:27846,MDX_SMART_PAIRING_USE_TV_CODE_PAGE:27854,MDX_SMART_REMOTE_PERMISSION_REQUEST_PAGE:69692,MDX_SMART_REMOTE_SCREEN:61411,MDX_SYSTEM_NOTIFICATION_COUNTERFACTUAL_PAGE:39299,MDX_SYSTEM_NOTIFICATION_PAGE:38696,MDX_TOAST_PAGE:62520,MDX_TV_SIGN_IN_ACCOUNT_CHOOSER_PAGE:36382,MDX_TV_SIGN_IN_PASSIVE_ACCOUNT_CHOOSER_PAGE:108701,MDX_TV_SIGN_IN_PASSIVE_WAITING_PAGE:50663,MDX_TV_SIGN_IN_PERMISSIONS_PAGE:36387,MDX_WATCH_PAGE:14908,MEALBAR_PROMO_PAGE:37533,MEDIA_ACTIONS_BROWSE_PAGE:105443, MEDIA_BROWSER_ANDROID_AUTO_PAGE:61635,MEDIA_BROWSER_ANDROID_CLOCK_PAGE:62274,MEDIA_BROWSER_CAR_PLAY_ERROR_PAGE:65702,MEDIA_BROWSER_CAR_PLAY_LOADING_PAGE:65703,MEDIA_BROWSER_CAR_PLAY_SCREEN:65701,MEDIA_BROWSER_WAZE_PAGE:76256,MESSAGES_EXTENSION_CONVERSATION_PAGE:37671,METADATA_EDITOR_PAGE:49953,MOBILE_CREATION_PAGE:36216,MOBILE_LIVE_ADVANCED_SETTINGS_PAGE:28237,MOBILE_LIVE_LOCATION_SEARCH_PAGE:39553,MOBILE_LIVE_PERMISSION_REQUEST_PAGE:29222,MOBILE_LIVE_PREFERENCES_PAGE:26107,MOBILE_LIVE_SCHEDULED_BROADCASTS_PAGE:38050, MOBILE_LIVE_STATS_PAGE:26108,MOBILE_LIVE_STREAMING_PAGE:26109,MOBILE_LIVE_THUMBNAIL_PAGE:26110,MOBILE_SCREENCAST_THUMBNAIL_PAGE:66881,MOBILE_THUMBNAIL_EDITOR_PAGE:28236,MODAL_ACCOUNT_SWITCHER_PAGE:14586,MULTI_REEL_DISMISSAL_PAGE:57929,MUSIC_ADD_TO_PLAYLIST_POPUP:74723,MUSIC_ALBUM_PAGE:44098,MUSIC_ARTIST_PAGE:44099,MUSIC_AUDIO_CAST_UPSELL_PROMO:23528,MUSIC_AUDIO_PREVIEW_PAGE:61699,MUSIC_DEEP_LINK_PAGE:59149,MUSIC_IOSSDKSCREEN:101951,MUSIC_LIBRARY_ARTIST_PAGE:97346,MUSIC_LISTENING_REVIEW_PAGE:118051, MUSIC_LYRICS_PAGE:95102,MUSIC_NAVIGATION_ERROR_PAGE:64882,MUSIC_PERSISTED_WATCH_PAGE:63595,MUSIC_PLAYLIST_PAGE:63349,MUSIC_RELATED_PAGE:95101,MUSIC_REMOVE_DOWNLOADS_AFTER_REMOVING_FROM_LIBRARY_DIALOG_PAGE:75240,MUSIC_RESUME_PLAYBACK_MINIPLAYER_PAGE:27039,MUSIC_SHORTCUTS_SYSTEM_DIALOG_PAGE:68823,MUSIC_SIGN_IN_PAGE:21537,MUSIC_SIRI_MEDIA_INTENT_PAGE:83464,MUSIC_SONG_DETAIL_PAGE:75707,MUSIC_USER_CHANNEL_PAGE:83113,MUSIC_WATCH_APP_SCREEN:101952,MUSIC_WATCH_APP_UPGRADE_SCREEN:101953,MUSIC_WIDGET_WATCH_PAGE:79610, NEW_VERSION_AVAILABLE_FORCE_PAGE:24402,NEW_VERSION_AVAILABLE_NAG_PAGE:24400,NEW_VERSION_AVAILABLE_TIMER_PAGE:32925,NOTIFICATION_SETTINGS_PAGE:57173,OFFLINE_MUSIC_ALBUM_PAGE:64423,OFFLINE_MUSIC_PLAYLIST_PAGE:64424,OFFLINE_PROMO_RENDERER_PAGE:33986,OFFLINE_SEARCH_PAGE:100828,OFFLINE_VIDEO_PAGE:21409,PARENTAL_CONTROL_PAGE:11070,PARENTAL_CONTROL_TIMER_EXPIRED_PAGE:11074,PARENTAL_CONTROL_TIMER_PAGE:17880,PAUSE_AND_BUFFER_NOTIFICATIONS_PAGE:14001,PHONE_VERIFICATION_CODE_ENTRY_PAGE:30709,PHONE_VERIFICATION_INTRO_PAGE:30707, PHONE_VERIFICATION_RESULT_ERROR_PAGE:30711,PHONE_VERIFICATION_RESULT_SUCCESS_PAGE:30710,PHONE_VERIFICATION_TELEPHONE_NUMBER_ENTRY_PAGE:30708,PHONEBOOK_PAGE:26984,PIN_CONFIGURATION_SCREEN:63648,PIN_LOCK_SCREEN:63649,PLAYER_ERROR_PAGE:51879,PLAYLIST_ENGAGEMENT_PANEL_SCREEN:111059,PLAYLIST_PAGE:5754,PLAYLIST_SETTINGS_EDITOR_PAGE:20445,PREMIUM_YPC_OFFERS_BROWSE_PAGE:110386,PRODUCT_PANEL_SCREEN:113746,PROFILE_CARD_PAGE:66557,PUSH_NOTIFICATION_DIALOG:17310,PUSH_NOTIFICATION_PAGE:28631,QUICK_ACTION_PAGE:21589, REDEEM_PAGE:68012,REELS_CREATION_ONBOARDING_PAGE:60480,REELS_PERMISSION_REQUEST_PAGE:31571,REQUIRED_SIGN_IN_PAGE:76980,RESTORE_VIDEO_AFTER_CRASH_PAGE:41577,RETROACTIVE_SIGN_IN_PROMO_PAGE:45469,SCAN_CODE_PAGE:38669,SCREENCAST_CONTROLLER_PAGE:13768,SCREENCAST_LAUNCH_PAGE:13777,SEARCH_INPUT_PAGE:62985,SEARCH_SUGGESTION_PAGE:59369,SEND_SMS_PERMISSION_PRE_PROMPT_PAGE:43927,SEND_SMS_PERMISSION_SYSTEM_DIALOG_PAGE:43928,SETTINGS_OVERVIEW_PAGE:12924,SFV_AUDIO_PICKER_SEARCH_PAGE:100355,SHARE_CONVERSATION_INBOX_PAGE:56219, SHARE_CONVERSATION_PAGE:27669,SHARE_MENU:10337,SHARED_TAB_NEW_GROUP_PAGE:47896,SHORTS_CREATION_AUDIO_SCRUBBER_BOTTOM_SHEET_PAGE:107598,SHORTS_CREATION_CAMERA_PAGE:96639,SHORTS_CREATION_CAMERA_PERMISSIONS_PAGE:107536,SHORTS_CREATION_CREATION_PAGE:96661,SHORTS_CREATION_EDITOR_PAGE:96658,SHORTS_CREATION_EDITOR_TIMELINE_EDITOR_PAGE:116646,SHORTS_CREATION_GALLERY_PAGE:96660,SHORTS_CREATION_TIMER_BOTTOM_SHEET_PAGE:104443,SHORTS_CREATION_TRIM_PAGE:96659,SHORTS_CREATION_VOLUME_BALANCER_PAGE:106442,SIDELOADED_MUSIC_ALBUM_PAGE:63667, SIDELOADED_MUSIC_ARTIST_PAGE:63668,SIDELOADED_MUSIC_PLAYLIST_PAGE:63669,SPONSORSHIPS_COMMENTS_ENGAGEMENT_PANEL_SCREEN:78314,STORE_VISITS_AD_ENGAGEMENT_PANEL_SCREEN:55761,SUBSCRIPTIONS_PAGE:96368,SUGGESTED_PLAYLIST_VIDEOS_PAGE:67374,SUPER_CHAT_CONTRACT_PAGE:48992,THUMBNAIL_EDITOR_PAGE:49956,TODAY_WIDGET_PAGE:31961,TOMBSTONED_PAGE_VISUAL_ELEMENT:26388,TOPIC_EXPLORER_PAGE:23811,TOPIC_PICKER_PAGE:5E4,TUNEDER_FORM_PAGE:47355,TUNEDER_SWIPE_PAGE:47356,TV_SPLASH_PAGE:37935,UDC_LOCATION_REPORTING_CONSENT_FLOW_PAGE:45521, UNIFIED_SHARE_PANEL_PAGE:21760,UNKNOWN_PAGE:83769,UNLIMITED_FAMILY_MESSAGE_INTERSTITIAL_PAGE:49977,UNLIMITED_FAMILY_PROFILE_INTERSTITIAL_PAGE:49974,UNLIMITED_MANAGE_SUBSCRIPTION_PAGE:93497,UNLIMITED_ONBOARDING_PAGE:93498,UNLIMITED_POST_PURCHASE_WELCOME_PAGE:34325,UNPLUGGED_APP_OVERLAY_PAGE:115803,UNPLUGGED_INFO_DIALOG_PAGE:100081,UNPLUGGED_LOCATION_PAGE:35309,UNPLUGGED_ONBOARDING_ACCESS_PENDING_PAGE:68314,UNPLUGGED_ONBOARDING_PAGE:25602,UNPLUGGED_ONBOARDING_V2_PAGE:100339,UPLOAD_PAGE:59018,UPLOAD_VIDEO_CAMERA_EXTERNAL_PAGE:18248, UPLOAD_VIDEO_CAMERA_PAGE:50625,UPLOAD_VIDEO_EDITING_PAGE:9729,UPLOAD_VIDEO_EDITING_STICKER_CATALOG_PAGE:37168,UPLOAD_VIDEO_EDITING_TEXT_PAGE:37169,UPLOAD_VIDEO_METADATA_EDITING_PAGE:21667,UPLOAD_VIDEO_PERMISSION_PAGE:16749,UPLOAD_VIDEO_PERMISSION_REQUEST_PAGE:18635,UPLOAD_VIDEO_SELECTION_PAGE:39305,UPLOAD_VIDEO_SPLIT_PAGE:18046,VIDEO_GAME_TOPIC_CHANNEL_PAGE:53969,VIDEO_MANAGER_PAGE:8213,VIDEO_QUALITY_PERSISTENT_SETTINGS:93926,VOICE_SEARCH_EXTERNAL_LINK_PAGE:102852,VOICE_SEARCH_MOBILE_REMOTE_PAGE:110099, VOICE_SEARCH_PAGE:22678,VOICE_SEARCH_PERMISSION_REQUEST_PAGE:69076,VR_MOVIES_PAGE:100856,WATCH_IT_AGAIN_PAGE:17736,WATCH_PAGE:3832,WEBSITE_ACTIONS_AMP_AD_ENGAGEMENT_PANEL_SCREEN:55759,WEBSITE_ACTIONS_EXTENSIONS_AD_ENGAGEMENT_PANEL_SCREEN:64031,WELCOME_PAGE:93044,WHOS_WATCHING_PAGE:93045,YOU_TUBE_ORIGINALS_HOME_PAGE:34388,YPC_DONATION_POST_TRANSACTION:17657,YPC_DONATION_SCREEN:17655,YPC_MEMBERSHIP_CANCEL_SUCCESS_PAGE:39579,YPC_MEMBERSHIP_POST_TRANSACTION_PAGE:39578,YPC_OFFERS_MODULE_PAGE:77448,YPC_OFFERS_PAGE:8196, YPC_POST_TIP_PAGE:11357,YPC_SPONSORSHIP_OFFER_SCREEN:69877,YPC_TIP_PAGE:8197,YT_FLOWS_PAGE:82039};function VNa(){var a=Sn(),b=Tn();b&&a&&HNa(b,[a],!0)} ;function WNa(){var a=eJ.getInstance();a.set("utco",-Math.floor(new Date().getTimezoneOffset()));a.save()} var XNa={bluetooth:"CONN_DISCO",cellular:"CONN_CELLULAR_UNKNOWN",ethernet:"CONN_WIFI",none:"CONN_NONE",wifi:"CONN_WIFI",wimax:"CONN_CELLULAR_4G",other:"CONN_UNKNOWN",unknown:"CONN_UNKNOWN","slow-2g":"CONN_CELLULAR_2G","2g":"CONN_CELLULAR_2G","3g":"CONN_CELLULAR_3G","4g":"CONN_CELLULAR_4G"};function YNa(){if("undefined"!==typeof Intl)return new Intl.DateTimeFormat().resolvedOptions().timeZone} function ZNa(){var a=YNa();if(!a)return!1;a=a.replace("/",".");var b=eJ.getInstance();b.set("tz",a);b.save();return!0} function $Na(){var a,b=window.navigator;if(a=b?b.connection:void 0){b=XNa[a.type||"unknown"]||"CONN_UNKNOWN";a=XNa[a.effectiveType||"unknown"]||"CONN_UNKNOWN";"CONN_CELLULAR_UNKNOWN"===b&&"CONN_UNKNOWN"!==a&&(b=a);if("CONN_UNKNOWN"!==b)return b;if("CONN_UNKNOWN"!==a)return a}} ;function IJ(a){"kevlar_should_maintain_stable_list"===a?(a=$Na(),a="CONN_CELLULAR_2G"===a||"CONN_CELLULAR_3G"===a?!1:!0):a=N(a);return a} ;var aOa=!1,bOa=[],cOa=0,JJ=null,dOa=null,eOa=Rm;function fOa(){if("hidden"==lk())var a="FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND";else"visible"==lk()&&(a="FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND",JJ=null);a&&KJ(a)} function KJ(a){if("FOREGROUND_HEARTBEAT_TRIGGER_ON_BACKGROUND"==a||"FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"==a){if(dOa==a)return;dOa=a}var b=9E4+2E3*Math.random();if("FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"!=a||!(Pk()>b)&&"visible"==lk()){b=-1;JJ&&(b=Math.round(Zk()-JJ));var c=String;var d=Ka("_fact",window);d=null==d||-1==d?-1:Math.max(Xa()-d,0);jl("foregroundHeartbeat",{firstActivityMs:c(d),clientDocumentNonce:Ln,index:String(cOa),lastEventDeltaMs:String(b),trigger:a},eOa);Ha("_fact",-1,window); cOa++;JJ=Zk()}} ;function LJ(a,b,c,d,f){b=void 0===b?null:b;c=void 0===c?null:c;d=void 0===d?null:d;f=void 0===f?null:f;a={youThereEventType:a};c&&(a.lactThresholdMs=c.lactThresholdMs,a.mediaPosSec=c.promptDelaySec,a.lactServerRequestMs=c.lactServerRequestMs,a.triggerReason=c.triggerReason);null!=f&&(a.renderingMediaPosSec=Math.round(f));b||(b=Tn());b&&(a.clientScreenNonce=b);d&&(a.clientPlaybackNonce=d);Bm("youThere",a)} ;var gOa={AUTOPLAY:"atp",SKA_SKIPPABLE_ADS:"ska",QUEUE_SUPPORT:"que",MULTI_USER_SESSIONS:"mus",SINGLE_USER_SESSIONS:"sus",HAS_DISPLAY:"dsp",SCREEN_EXTENDED_QUEUE_SUPPORT:"seq",MIC:"mic",DPAD:"dpa"};var MJ=function(a){this.app=this.name=this.id="";this.type="REMOTE_CONTROL";this.obfuscatedGaiaId=this.avatar=this.username="";this.connected=!1;this.capabilities=new Set;this.experiments=new Set;this.theme="u";this.msn=-1;this.localChannel=null;this.queuedMessages=new tj;this.localChannelEncryptionKey=this.remoteControllerUrl="";this.deviceContext=void 0;a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.username=a.user||"",this.avatar=a.userAvatarUri|| "",this.obfuscatedGaiaId=a.obfuscatedGaiaId||"",this.theme=a.theme||"u",hOa(this,a.capabilities||""),this.setExperiments(a.experiments||""),this.remoteControllerUrl=a.remoteControllerUrl||"",this.localChannelEncryptionKey=a.localChannelEncryptionKey||"",this.deviceContext=a.deviceContext)}; MJ.prototype.toDisplayString=function(){var a=this.name||"";this.username&&(a=a+" ("+this.username+")");return a}; MJ.prototype.copy=function(){var a=new MJ({id:this.id,name:this.name,app:this.app,type:this.type,user:this.username,userAvatarUri:this.avatar,obfuscatedGaiaId:this.obfuscatedGaiaId,theme:this.theme,capabilities:Array.from(this.capabilities.values()).join(","),experiments:Array.from(this.experiments.values()).join(",")});a.connected=this.connected;a.remoteControllerUrl=this.remoteControllerUrl;a.localChannelEncryptionKey=this.localChannelEncryptionKey;a.deviceContext=this.deviceContext;return a}; MJ.prototype.equals=function(a){return a?this.id==a.id:!1}; var hOa=function(a,b){a.capabilities.clear();fb(b.split(","),Va(y.contains,gOa)).forEach(function(c){a.capabilities.add(c)})}; MJ.prototype.setExperiments=function(a){var b=this;this.experiments.clear();a.split(",").forEach(function(c){b.experiments.add(c)})};var iOa=function(a,b){this.action=a;this.params=b||{}};function jOa(a,b){Rg.call(this);this.delay_=new et(this.onTick_,0,this);Sg(this,this.delay_);this.interval_=5E3;this.nextTickTime_=0;if("function"===typeof a)b&&(a=Ua(a,b));else if(a&&"function"===typeof a.handleEvent)a=Ua(a.handleEvent,a);else throw Error("Invalid listener argument");this.listener_=a} u(jOa,Rg);e=jOa.prototype;e.onTick_=function(){this.interval_=Math.min(3E5,2*this.interval_);this.listener_();this.nextTickTime_&&this.start()}; e.start=function(){var a=this.interval_+15E3*Math.random();this.delay_.startIfNotActive(a);this.nextTickTime_=Xa()+a}; e.stop=function(){this.delay_.stop();this.nextTickTime_=0}; e.isActive=function(){return this.delay_.isActive()}; e.reset=function(){this.delay_.stop();this.interval_=5E3};function NJ(a,b,c,d,f){c=void 0===c?!1:c;d=void 0===d?function(){return""}:d; f=void 0===f?!1:f;this.pathPrefix_=a;this.defaultQueryParams_=b;this.pubsub_=new zj;this.reconnectTimer_=new jOa(this.safeReconnect_,this);this.channel_=this.logger_=null;this.disposed_=!1;this.connectionParams_=null;this.sCookie_="";this.disconnectUi_=this.connectUi_=0;this.pendingMessages_=[];this.enableAsyncTest_=c;this.getXsrfToken_=d;this.enableLoungeTokenRefresh_=f} u(NJ,Cr);e=NJ.prototype;e.subscribe=function(a,b,c){return this.pubsub_.subscribe(a,b,c)}; e.unsubscribe=function(a,b,c){return this.pubsub_.unsubscribe(a,b,c)}; e.unsubscribeByKey=function(a){return this.pubsub_.unsubscribeByKey(a)}; e.publish=function(a,b){return this.pubsub_.publish.apply(this.pubsub_,arguments)}; e.dispose=function(){this.disposed_||(this.disposed_=!0,Qg(this.pubsub_),this.disconnect(),Qg(this.reconnectTimer_),this.reconnectTimer_=null,this.getXsrfToken_=function(){return""})}; e.isDisposed=function(){return this.disposed_}; var kOa=function(a){return{firstTestResults:[""],secondTestResults:a.channel_.isBuffered(),sessionId:a.channel_.getSessionId(),arrayId:a.channel_.lastArrayId_}}; e=NJ.prototype; e.connect=function(a,b,c){if(!this.channel_||2!=this.channel_.getState()){this.sCookie_="";this.reconnectTimer_.stop();this.connectionParams_=a||null;this.connectUi_=b||0;a=this.pathPrefix_+"/test";b=this.pathPrefix_+"/bind";var d=new yr("1",c?c.firstTestResults:null,c?c.secondTestResults:null,this.enableAsyncTest_),f=this.channel_;f&&f.setHandler(null);d.setHandler(this);this.channel_=d;lOa(this);if(this.channel_){d=A("ID_TOKEN");var h=this.channel_.extraHeaders_||{};d?h["x-youtube-identity-token"]=d: delete h["x-youtube-identity-token"];this.channel_.setExtraHeaders(h)}f?(f.getState(),this.channel_.connect(a,b,this.defaultQueryParams_,f.getSessionId(),f.lastArrayId_)):c?this.channel_.connect(a,b,this.defaultQueryParams_,c.sessionId,c.arrayId):this.channel_.connect(a,b,this.defaultQueryParams_)}}; e.disconnect=function(a){this.disconnectUi_=a||0;this.reconnectTimer_.stop();lOa(this);this.channel_&&(3==this.channel_.getState()&&this.channel_.startForwardChannel_(),this.channel_.disconnect());this.disconnectUi_=0}; e.sendMessage=function(a,b){a={_sc:a};b&&y.extend(a,b);this.isReconnecting()||2==(this.channel_?this.channel_.getState():0)?this.pendingMessages_.push(a):this.channel_&&3==this.channel_.getState()&&(lOa(this),this.channel_.sendMap(a))}; e.channelOpened=function(){this.reconnectTimer_.reset();this.connectionParams_=null;this.connectUi_=0;if(this.pendingMessages_.length){var a=this.pendingMessages_;this.pendingMessages_=[];for(var b=0,c=a.length;bUb(a,"10.0")&&(this.supportCors=!1))} var PJ=function(a,b){var c=a.basePath;a.supportCors&&(c=a.scheme+"://"+a.domain+a.port+a.basePath);return Id(c+b,{})},mOa=function(a,b,c,d,f){a={format:"JSON", method:"POST",context:a,timeout:5E3,withCredentials:!1,onSuccess:Va(a.onSuccess_,d,!0),onError:Va(a.onError_,f),onTimeout:Va(a.onTimeout_,f)};c&&(a.postParams=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return vl(b,a)}; OJ.prototype.onSuccess_=function(a,b,c,d){b?a(d):a({text:c.responseText})}; OJ.prototype.onError_=function(a,b){a(Error("Request error: "+b.status))}; OJ.prototype.onTimeout_=function(a){a(Error("request timed out"))};var nOa=Xa(),QJ=null,RJ=Array(50),SJ=-1,TJ=!1;function oOa(){var a=pOa;qOa();QJ.push(a);rOa()} function UJ(a,b){qOa();var c=sOa(a,String(b));0==QJ.length?tOa(c):(rOa(),eb(QJ,function(d){d(c)}))} function qOa(){QJ||(QJ=Ka("yt.mdx.remote.debug.handlers_")||[],Ha("yt.mdx.remote.debug.handlers_",QJ,void 0))} function tOa(a){var b=(SJ+1)%50;SJ=b;RJ[b]=a;TJ||(TJ=49==b)} function rOa(){var a=QJ;if(RJ[0]){var b=TJ?SJ:-1;do{b=(b+1)%50;var c=RJ[b];eb(a,function(d){d(c)})}while(b!=SJ); RJ=Array(50);SJ=-1;TJ=!1}} function sOa(a,b){var c=(Xa()-nOa)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")} ;function VJ(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||"";this.idType=a.screenIdType||"normal"} var WJ=function(a,b){return!!b&&(a.id==b||a.uuid==b)},uOa=function(a){return{name:a.name, screenId:a.id,loungeToken:a.token,dialId:a.uuid,screenIdType:a.idType}},vOa=function(a){return new VJ(a)},wOa=function(a){return Array.isArray(a)?gb(a,vOa):[]},XJ=function(a){return a?"{name:\""+a.name+"\",id:"+a.id.substr(0,6)+"..,token:"+((a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+",idType:"+a.idType+"}"):"null"},xOa=function(a){return Array.isArray(a)?"["+gb(a,XJ).join(",")+"]":"null"};function yOa(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})} function zOa(a){return gb(a,function(b){return{key:b.id,name:b.name}})} function AOa(a,b){return lb(a,function(c){return c||b?!c!=!b?!1:c.id==b.id:!0})} function YJ(a,b){return lb(a,function(c){return WJ(c,b)})} ;var ZJ=function(a){a=void 0===a?!1:a;Rg.call(this);this.pubSub_=new zj(a);Sg(this,this.pubSub_)}; u(ZJ,Rg);e=ZJ.prototype;e.subscribe=function(a,b,c){return this.isDisposed()?0:this.pubSub_.subscribe(a,b,c)}; e.unsubscribe=function(a,b,c){return this.isDisposed()?!1:this.pubSub_.unsubscribe(a,b,c)}; e.unsubscribeByKey=function(a){return this.isDisposed()?!1:this.pubSub_.unsubscribeByKey(a)}; e.publish=function(a,b){return this.isDisposed()?!1:this.pubSub_.publish.apply(this.pubSub_,arguments)}; e.subscribeAll=function(a,b){for(var c in a)this.subscribe(c,a[c],b)}; e.unsubscribeAll=function(a,b){for(var c in a)this.unsubscribe(c,a[c],b)}; e.getPubSub=function(){return this.pubSub_};function $J(a){ZJ.call(this);this.logName_=a;this.screens=[]} u($J,ZJ);$J.prototype.getScreens=function(){return this.screens}; $J.prototype.contains=function(a){return!!AOa(this.screens,a)}; $J.prototype.get=function(a){return a?YJ(this.screens,a):null}; var BOa=function(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c)return a=c.name,c.id=b.id||c.id,c.name=b.name,c.token=b.token,c.uuid=b.uuid||c.uuid,c.name!=a;a.screens.push(b);return!0},COa=function(a,b){var c=a.screens.length!=b.length; a.screens=fb(a.screens,function(h){return!!AOa(b,h)}); for(var d=0,f=b.length;d=FOa.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=FOa[this.pollIndex_],this.timer_=wk(Ua(this.poll_,this),a),this.pollIndex_++):this.publish("pairingFailed",Error("Server error "+a.status))}; e.onTimeout_=function(){this.xhr_=null;this.publish("pairingFailed",Error("Server not responding"))}; var FOa=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];var bK=function(a,b,c){var d=c&&0d&&sb(c,-(d+1),0,b)}a=JOa(a);if(0==a.length)try{Bl("remote_sid")}catch(f){}else try{zl("remote_sid",a.join(","),-1)}catch(f){}},fK=function(){var a=cK("yt-remote-connected-devices")||[]; ub(a);return a},JOa=function(a){if(0==a.length)return[]; var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return gb(a,function(d,f){return 0==f?d:d.substring(c.length)})},LOa=function(a){bK("yt-remote-connected-devices",a,86400)},gK=function(){if(MOa)return MOa; var a=cK("yt-remote-device-id");a||(a=yOa(),bK("yt-remote-device-id",a,31536E3));for(var b=fK(),c=1,d=a;nb(b,d);)c++,d=a+"#"+c;return MOa=d},NOa=function(){return cK("yt-remote-session-browser-channel")},IOa=function(){return cK("yt-remote-session-screen-id")},QOa=function(a){5d?c(f):a.checkScreenAvailabilityTimeoutKey_=wk(function(){lPa(a,b,c,d-1)},300)})}; rK.prototype.getCastSession=function(){return this.session_}; rK.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("Cast session died."),this.onSessionStopped())}; var fPa=function(a){yk(a.getScreenTimeoutKey_);a.getScreenTimeoutKey_=0;yk(a.checkScreenAvailabilityTimeoutKey_);a.checkScreenAvailabilityTimeoutKey_=0;yk(a.sessionStatusTimeoutKey_);a.sessionStatusTimeoutKey_=0;yk(a.onLoungeTokenTimeoutKey_);a.onLoungeTokenTimeoutKey_=0;yk(a.getLoungeTokenTimeoutKey_);a.getLoungeTokenTimeoutKey_=0};var sK=function(a,b,c){pK.call(this,a,b,"DialSession");this.session_=this.launchData_=null;this.reversePairingCode_="";this.theme_=c;this.connectData_=null;this.deferredLaunch_=La;this.deferredLaunchDeadlineTimer_=NaN;this.boundSessionUpdate_=Ua(this.onSessionUpdate_,this);this.cancelPolling_=La}; p(sK,pK);sK.prototype.setCastSession=function(a){this.session_=a;this.session_.addUpdateListener(this.boundSessionUpdate_)}; sK.prototype.launchWithParams=function(a){this.connectData_=a;this.deferredLaunch_()}; sK.prototype.stop=function(){this.cancelPolling_();this.cancelPolling_=La;yk(this.deferredLaunchDeadlineTimer_);if(this.session_)this.session_.stop(Ua(this.onSessionStopped,this,null),Ua(this.onSessionStopped,this,"Failed to stop DIAL device."));else this.onSessionStopped()}; sK.prototype.disposeInternal=function(){this.cancelPolling_();this.cancelPolling_=La;yk(this.deferredLaunchDeadlineTimer_);this.session_&&this.session_.removeUpdateListener(this.boundSessionUpdate_);this.session_=null;pK.prototype.disposeInternal.call(this)}; var nPa=function(a){a.cancelPolling_=a.screenService_.getScreenByPollingPairingCode(a.reversePairingCode_,a.receiver_.label,a.receiver_.friendlyName,Ua(function(b){this.cancelPolling_=La;qK(this,b)},a),Ua(function(b){this.cancelPolling_=La; this.onSessionStopped(b)},a))}; sK.prototype.onSessionUpdate_=function(a){this.isDisposed()||a||(this.warn("DIAL session died."),this.cancelPolling_(),this.cancelPolling_=La,this.onSessionStopped())}; var oPa=function(a){var b={};b.pairingCode=a.reversePairingCode_;b.theme=a.theme_;TOa()&&(b.env_useStageMdx=1);return Hd(b)}; sK.prototype.initReversePairingPromise_=function(a){this.reversePairingCode_=yOa();if(this.connectData_){var b=new chrome.cast.DialLaunchResponse(!0,oPa(this));a(b);nPa(this)}else this.deferredLaunch_=Ua(function(){yk(this.deferredLaunchDeadlineTimer_);this.deferredLaunch_=La;this.deferredLaunchDeadlineTimer_=NaN;var c=new chrome.cast.DialLaunchResponse(!0,oPa(this));a(c);nPa(this)},this),this.deferredLaunchDeadlineTimer_=wk(Ua(function(){this.deferredLaunch_()},this),100)}; sK.prototype.initScreenLookupPromise_=function(a,b,c){$Oa(this.screenService_,this.launchData_.receiver.label,a,this.receiver_.friendlyName,Ua(function(d){d&&d.token?(qK(this,d),b(new chrome.cast.DialLaunchResponse(!1))):this.initReversePairingPromise_(b,c)},this),Ua(function(d){this.warn("Failed to get DIAL screen: "+d); this.initReversePairingPromise_(b,c)},this))};var tK=function(a,b){pK.call(this,a,b,"ManualSession");this.deferredLaunchDeadlineTimer_=wk(Ua(this.launchWithParams,this,null),150)}; p(tK,pK);tK.prototype.stop=function(){this.onSessionStopped()}; tK.prototype.setCastSession=function(){}; tK.prototype.launchWithParams=function(){yk(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;var a=YJ(this.screenService_.getScreens(),this.receiver_.label);if(a)qK(this,a);else this.onSessionStopped(Error("No such screen"))}; tK.prototype.disposeInternal=function(){yk(this.deferredLaunchDeadlineTimer_);this.deferredLaunchDeadlineTimer_=NaN;pK.prototype.disposeInternal.call(this)};var uK=function(a,b){ZJ.call(this);this.config_=b;this.screenService_=a;this.appId_=b.appId||"233637DE";this.theme_=b.theme||"cl";this.disableDial_=b.disableCastApi||!1;this.launchParams_=this.session_=null;this.hasCastReceiver_=!1;this.customReceivers_=[];this.boundReceiverActionListener_=Ua(this.onReceiverAction_,this)}; p(uK,ZJ); uK.prototype.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest(this.appId_);this.disableDial_||(c.dialRequest=new chrome.cast.DialRequest("YouTube"));var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED;a=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION;var f=Ua(this.onReceiverUpdated_,this);c=new chrome.cast.ApiConfig(c,Ua(this.onSessionEstablished_,this),f,d,a);c.customDialLaunchCallback=Ua(this.onDialLaunchRequested_,this); chrome.cast.initialize(c,Ua(function(){this.isDisposed()||(chrome.cast.addReceiverActionListener(this.boundReceiverActionListener_),oOa(),this.screenService_.subscribe("onlineScreenChange",Ua(this.onScreenChange_,this)),this.customReceivers_=pPa(this),chrome.cast.setCustomReceivers(this.customReceivers_,La,Ua(function(h){this.warn_("Failed to set initial custom receivers: "+xj(h))},this)),this.publish("yt-remote-cast2-availability-change",vK(this)),b(!0))},this),Ua(function(h){this.warn_("Failed to initialize API: "+ xj(h)); b(!1)},this))}; uK.prototype.setConnectedScreenStatus=function(a,b){this.info_("Setting connected screen ID: "+a+" -> "+b);if(this.session_){var c=this.session_.getScreen();if(!a||c&&c.id!=a)this.info_("Unsetting old screen status: "+this.session_.receiver_.friendlyName),wK(this,null)}if(a&&b){if(!this.session_){c=YJ(this.screenService_.getScreens(),a);if(!c){this.info_("setConnectedScreenStatus: Unknown screen.");return}if("shortLived"==c.idType){this.info_("setConnectedScreenStatus: Screen with id type to be short lived."); return}a=qPa(this,c);a||(this.info_("setConnectedScreenStatus: Connected receiver not custom..."),a=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),a.receiverType=chrome.cast.ReceiverType.CUSTOM,this.customReceivers_.push(a),chrome.cast.setCustomReceivers(this.customReceivers_,La,Ua(function(d){this.warn_("Failed to set initial custom receivers: "+xj(d))},this))); this.info_("setConnectedScreenStatus: new active receiver: "+a.friendlyName);wK(this,new tK(this.screenService_,a),!0)}this.session_.setDisplayStatus(b)}else this.info_("setConnectedScreenStatus: no screen.")}; var qPa=function(a,b){return b?lb(a.customReceivers_,function(c){return WJ(b,c.label)},a):null}; e=uK.prototype;e.setLaunchParams=function(a){this.isDisposed()?this.warn_("Setting connection data on disposed cast v2"):this.session_?this.session_.launchWithParams(a):this.warn_("Setting connection data without a session")}; e.stopSession=function(){this.isDisposed()?this.warn_("Stopping session on disposed cast v2"):this.session_?(this.session_.stop(),wK(this,null)):this.info_("Stopping non-existing session")}; e.handleBrowserChannelAuthError=function(){this.session_?this.session_.handleBrowserChannelAuthError():this.warn_("handleBrowserChannelAuthError for a non-existing session")}; e.requestSession=function(){chrome.cast.requestSession(Ua(this.onSessionEstablished_,this),Ua(this.onSessionRequestFailed_,this))}; e.disposeInternal=function(){this.screenService_.unsubscribe("onlineScreenChange",Ua(this.onScreenChange_,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.boundReceiverActionListener_);var a=pOa,b=Ka("yt.mdx.remote.debug.handlers_");ob(b||[],a);Qg(this.session_);ZJ.prototype.disposeInternal.call(this)}; e.info_=function(a){UJ("Controller",a)}; e.warn_=function(a){UJ("Controller",a)}; var pOa=function(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)},vK=function(a){return a.hasCastReceiver_||!!a.customReceivers_.length||!!a.session_},wK=function(a,b,c){b!=a.session_&&(Qg(a.session_),(a.session_=b)?(c?a.publish("yt-remote-cast2-receiver-resumed",b.receiver_):a.publish("yt-remote-cast2-receiver-selected",b.receiver_),b.subscribe("sessionScreen",Ua(a.onSessionScreen_,a,b)),b.getScreen()?a.publish("yt-remote-cast2-session-change",b.getScreen()):c&&a.session_.launchWithParams(null)): a.publish("yt-remote-cast2-session-change",null))}; e=uK.prototype;e.onSessionScreen_=function(a,b){this.session_==a&&(b||wK(this,null),this.publish("yt-remote-cast2-session-change",b))}; e.onReceiverAction_=function(a,b){if(!this.isDisposed())if(a)switch(a.friendlyName=chrome.cast.unescape(a.friendlyName),this.info_("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.session_)if(this.session_.receiver_.label!=a.label)this.info_("onReceiverAction_: Stopping active receiver: "+this.session_.receiver_.friendlyName),this.session_.stop();else{this.info_("onReceiverAction_: Casting to active receiver.");this.session_.getScreen()&&this.publish("yt-remote-cast2-session-change", this.session_.getScreen());break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:wK(this,new tK(this.screenService_,a));break;case chrome.cast.ReceiverType.DIAL:wK(this,new sK(this.screenService_,a,this.theme_));break;case chrome.cast.ReceiverType.CAST:wK(this,new rK(this.screenService_,a,this.config_));break;default:this.warn_("Unknown receiver type: "+a.receiverType);}break;case chrome.cast.ReceiverAction.STOP:this.session_&&this.session_.receiver_.label==a.label?this.session_.stop(): this.warn_("Stopping receiver w/o session: "+a.friendlyName);}else this.warn_("onReceiverAction_ called without receiver.")}; e.onDialLaunchRequested_=function(a){if(this.isDisposed())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.warn_("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.session_?this.session_.receiver_:null;if(!c||c.label!=b.label)return this.warn_("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!= chrome.cast.ReceiverType.DIAL){if(this.session_.getScreen())return this.info_("Reselecting dial screen."),this.publish("yt-remote-cast2-session-change",this.session_.getScreen()),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.warn_("Changing CAST intent from \""+c.receiverType+"\" to \"dial\" for "+b.friendlyName);wK(this,new sK(this.screenService_,b,this.theme_))}b=this.session_;b.launchData_=a;return b.launchData_.appState==chrome.cast.DialAppState.RUNNING?new Promise(Ua(b.initScreenLookupPromise_, b,(b.launchData_.extraData||{}).screenId||null)):new Promise(Ua(b.initReversePairingPromise_,b))}; e.onSessionEstablished_=function(a){if(!this.isDisposed()){this.info_("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.session_)if(b.receiverType==chrome.cast.ReceiverType.CAST)this.info_("Got resumed cast session before resumed mdx connection."),b.friendlyName=chrome.cast.unescape(b.friendlyName),wK(this,new rK(this.screenService_,b,this.config_),!0);else{this.warn_("Got non-cast session without previous mdx receiver event, or mdx resume."); return}var c=this.session_.receiver_,d=YJ(this.screenService_.getScreens(),c.label);d&&WJ(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==chrome.cast.ReceiverType.CAST&&(this.info_("onSessionEstablished_: manual to cast session change "+b.friendlyName),Qg(this.session_),this.session_=new rK(this.screenService_,b,this.config_),this.session_.subscribe("sessionScreen",Ua(this.onSessionScreen_,this,this.session_)),this.session_.launchWithParams(null));this.session_.setCastSession(a)}}}; e.getCastSession=function(){return this.session_?this.session_.getCastSession():null}; e.onSessionRequestFailed_=function(a){this.isDisposed()||(this.warn_("Failed to estabilish a session: "+xj(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&wK(this,null))}; e.onReceiverUpdated_=function(a){this.info_("Receiver availability updated: "+a);if(!this.isDisposed()){var b=vK(this);this.hasCastReceiver_=a==chrome.cast.ReceiverAvailability.AVAILABLE;vK(this)!=b&&this.publish("yt-remote-cast2-availability-change",vK(this))}}; var pPa=function(a){var b=a.screenService_.getOnlineScreens(),c=a.session_&&a.session_.receiver_;a=gb(b,function(d){c&&WJ(d,c.label)&&(c=null);var f=d.uuid?d.uuid:d.id,h=qPa(this,d);h?(h.label=f,h.friendlyName=d.name):(h=new chrome.cast.Receiver(f,d.name),h.receiverType=chrome.cast.ReceiverType.CUSTOM);return h},a); c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}; uK.prototype.onScreenChange_=function(){this.isDisposed()||(this.customReceivers_=pPa(this),this.info_("Updating custom receivers: "+xj(this.customReceivers_)),chrome.cast.setCustomReceivers(this.customReceivers_,La,Ua(function(){this.warn_("Failed to set custom receivers.")},this)),this.publish("yt-remote-cast2-availability-change",vK(this)))}; uK.prototype.setLaunchParams=uK.prototype.setLaunchParams;uK.prototype.setConnectedScreenStatus=uK.prototype.setConnectedScreenStatus;uK.prototype.stopSession=uK.prototype.stopSession;uK.prototype.getCastSession=uK.prototype.getCastSession;uK.prototype.requestSession=uK.prototype.requestSession;uK.prototype.init=uK.prototype.init;uK.prototype.dispose=uK.prototype.dispose;var xPa=function(a,b,c){c.disableCastApi?xK("Cannot initialize because disabled by Mdx config."):rPa()?sPa(a,c)&&(tPa(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?uPa(b):(window.__onGCastApiAvailable=function(d,f){d?uPa(b):(yK("Failed to load cast API: "+f),vPa(!1),tPa(!1),dK("yt-remote-cast-available"),dK("yt-remote-cast-receiver"),wPa(),b(!1))},c.loadCastApiSetupScript?WI("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"):0<=window.navigator.userAgent.indexOf("Android")&&0<=window.navigator.userAgent.indexOf("Chrome/")&& window.navigator.presentation?Pqa():!window.chrome||!window.navigator.presentation||0<=window.navigator.userAgent.indexOf("Edge")?Nt():(Oqa(),Mt(Qqa.map(Mqa))))):xK("Cannot initialize because not running Chrome")},wPa=function(){xK("dispose"); var a=zK();a&&a.dispose();Ha("yt.mdx.remote.cloudview.instance_",null,void 0);yPa(!1);rha();sha.length=0},zPa=function(){return!!cK("yt-remote-cast-installed")},APa=function(){var a=cK("yt-remote-cast-receiver"); return a?a.friendlyName:null},BPa=function(){xK("clearCurrentReceiver"); dK("yt-remote-cast-receiver")},CPa=function(){return zPa()?zK()?zK().getCastSession():(yK("getCastSelector: Cast is not initialized."),null):(yK("getCastSelector: Cast API is not installed!"),null)},AK=function(a,b){DPa()?zK().setConnectedScreenStatus(a,b):yK("setConnectedScreenStatus called before ready.")},rPa=function(){var a=0<=fc.search(/ (CrMo|Chrome|CriOS)\//); return Ie||a},sPa=function(a,b){var c=!1; zK()||(a=new uK(a,b),a.subscribe("yt-remote-cast2-availability-change",function(d){bK("yt-remote-cast-available",d);Xk("yt-remote-cast2-availability-change",d)}),a.subscribe("yt-remote-cast2-receiver-selected",function(d){xK("onReceiverSelected: "+d.friendlyName); bK("yt-remote-cast-receiver",d);Xk("yt-remote-cast2-receiver-selected",d)}),a.subscribe("yt-remote-cast2-receiver-resumed",function(d){xK("onReceiverResumed: "+d.friendlyName); bK("yt-remote-cast-receiver",d);Xk("yt-remote-cast2-receiver-resumed",d)}),a.subscribe("yt-remote-cast2-session-change",function(d){xK("onSessionChange: "+XJ(d)); d||dK("yt-remote-cast-receiver");Xk("yt-remote-cast2-session-change",d)}),Ha("yt.mdx.remote.cloudview.instance_",a,void 0),c=!0); xK("cloudview.createSingleton_: "+c);return c},zK=function(){return Ka("yt.mdx.remote.cloudview.instance_")},uPa=function(a){vPa(!0); tPa(!1);zK().init(!1,function(b){b?(yPa(!0),Wk("yt-remote-cast2-api-ready")):(yK("Failed to initialize cast API."),vPa(!1),dK("yt-remote-cast-available"),dK("yt-remote-cast-receiver"),wPa());a(b)})},xK=function(a){UJ("cloudview",a)},yK=function(a){UJ("cloudview",a)},vPa=function(a){xK("setCastInstalled_ "+a); bK("yt-remote-cast-installed",a)},DPa=function(){return!!Ka("yt.mdx.remote.cloudview.apiReady_")},yPa=function(a){xK("setApiReady_ "+a); Ha("yt.mdx.remote.cloudview.apiReady_",a,void 0)},tPa=function(a){Ha("yt.mdx.remote.cloudview.initializing_",a,void 0)},sha=[];function BK(a){this.index=-1;this.videoId=this.listId="";this.volume=this.playerState=-1;this.muted=!1;this.audioTrackId=null;this.playerTimeAt_=this.playerTime_=0;this.trackData=null;this.hasNext=this.hasPrevious=!1;this.loadedTime=this.duration_=this.seekableEnd_=this.seekableStart_=0;this.liveIngestionTime_=NaN;this.isLive_=!1;this.reset(a)} var EPa=function(a){a.audioTrackId=null;a.trackData=null;a.playerState=-1;a.hasPrevious=!1;a.hasNext=!1;a.playerTime_=0;a.playerTimeAt_=Xa();a.seekableStart_=0;a.seekableEnd_=0;a.duration_=0;a.loadedTime=0;a.liveIngestionTime_=NaN;a.isLive_=!1},CK=function(a){return 1==a.playerState?(Xa()-a.playerTimeAt_)/1E3:0}; BK.prototype.reset=function(a){this.listId="";this.index=-1;this.videoId="";EPa(this);this.volume=-1;this.muted=!1;a&&(this.index=a.index,this.listId=a.listId,this.videoId=a.videoId,this.playerState=a.playerState,this.volume=a.volume,this.muted=a.muted,this.audioTrackId=a.audioTrackId,this.trackData=a.trackData,this.hasPrevious=a.hasPrevious,this.hasNext=a.hasNext,this.playerTime_=a.playerTime,this.playerTimeAt_=a.playerTimeAt,this.seekableStart_=a.seekableStart,this.seekableEnd_=a.seekableEnd,this.duration_= a.duration,this.loadedTime=a.loadedTime,this.liveIngestionTime_=a.liveIngestionTime,this.isLive_=!isNaN(this.liveIngestionTime_))}; BK.prototype.isAdPlaying=function(){return 1081==this.playerState}; var DK=function(a,b){a.playerTime_=b;a.playerTimeAt_=Xa()}; BK.prototype.setDuration=function(a){this.duration_=isNaN(a)?0:a}; var EK=function(a){switch(a.playerState){case 1:case 1081:return(Xa()-a.playerTimeAt_)/1E3+a.playerTime_;case-1E3:return 0;}return a.playerTime_}; BK.prototype.getSeekableStartTime=function(){return 0=c?c:c-1)-b}):KK(this,Va(this.moveVideo,a,b,c))}; e.insertVideo=function(a){this.isReady_()?this.sendMessage_("insertVideo",{videoId:a}):KK(this,Va(this.insertVideo,a))}; e.playVideo=function(a,b,c,d,f,h,l){var m=IK(this);c=c||0;var n={videoId:a,currentIndex:c};FK(m,a,c);void 0!==b&&(DK(m,b),n.currentTime=b);void 0!==d&&(n.listId=d);null!=f&&(n.playerParams=f);null!=h&&(n.clickTrackingParams=h);null!=l&&(n.locationInfo=xj(l));this.sendMessage_("setPlaylist",n);d||LK(this,m)}; e.playVideoList=function(a,b){var c=IK(this),d=db(b,a);b={videoId:a,videoIds:b.join(",")};this.sendMessage_("setPlaylist",b);FK(c,a,d);LK(this,c)}; e.prevVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=IK(this);FK(c,a,b);LK(this,c)}this.sendMessage_("previous")}else KK(this,Va(this.prevVideo,a,b))}; e.nextVideo=function(a,b){if(this.isReady_()){if(a&&b){var c=IK(this);FK(c,a,b);LK(this,c)}this.sendMessage_("next")}else KK(this,Va(this.nextVideo,a,b))}; e.clearPlaylist=function(){if(this.isReady_()){this.sendMessage_("clearPlaylist");var a=IK(this);a.reset();LK(this,a);this.publish("remotePlayerChange")}else KK(this,this.clearPlaylist)}; e.dismissAutoplay=function(){this.isReady_()?this.sendMessage_("dismissAutoplay"):KK(this,this.dismissAutoplay)}; e.setAutoplayEnabled=function(a){this.isReady_()?a?this.sendMessage_("setAutoplayMode",{autoplayMode:"ENABLED"}):this.sendMessage_("setAutoplayMode",{autoplayMode:"DISABLED"}):KK(this,Va(this.setAutoplayEnabled,a))}; e.dispose=function(){if(3!=this.state_){var a=this.state_;this.state_=3;this.publish("proxyStateChange",a,this.state_)}ZJ.prototype.dispose.call(this)}; e.disposeInternal=function(){IPa(this);this.connection_=null;this.actionQueue_.clear();GK(this,null);ZJ.prototype.disposeInternal.call(this)}; var GPa=function(a){eb("nowAutoplaying autoplayDismissed remotePlayerChange remoteQueueChange autoplayModeChange autoplayUpNext previousNextChange".split(" "),function(b){this.contextSubscriptions_.push(this.connection_.subscribe(b,Va(this.onProxyEvent_,b),this))},a)},IPa=function(a){eb(a.contextSubscriptions_,function(b){this.connection_.unsubscribeByKey(b)},a); a.contextSubscriptions_.length=0}; HK.prototype.isReady_=function(){return 1==this.getState()}; var KK=function(a,b){50>a.actionQueue_.getCount()&&a.actionQueue_.enqueue(b)},HPa=function(a,b,c){var d=IK(a); DK(d,c);-1E3!=d.playerState&&(d.playerState=b);LK(a,d)}; HK.prototype.sendMessage_=function(a,b){this.connection_.sendMessage(a,b)}; var LK=function(a,b){IPa(a);a.connection_.setPlayerContextData(FPa(b));GPa(a)}; HK.prototype.setState_=function(a){if((a!=this.state_||2==a)&&3!=this.state_&&0!=a){var b=this.state_;this.state_=a;this.publish("proxyStateChange",b,a);if(1==a)for(;!this.actionQueue_.isEmpty();)this.actionQueue_.dequeue().apply(this);else 3==a&&this.dispose()}}; HK.prototype.onProxyEvent_=function(a,b){this.publish(a,b)}; var GK=function(a,b){a.castSession_&&(a.castSession_.removeUpdateListener(a.boundCastStatusListener_),a.castSession_.removeMediaListener(a.boundCastMediaListener_),a.onCastMediaChange_(null));a.castSession_=b;if(a.castSession_&&(a.info_("Setting cast session: "+a.castSession_.sessionId),a.castSession_.addUpdateListener(a.boundCastStatusListener_),a.castSession_.addMediaListener(a.boundCastMediaListener_),a.castSession_.media.length))a.onCastMediaChange_(a.castSession_.media[0])}; HK.prototype.getCastSession=function(){return this.castSession_}; HK.prototype.onCastStatusUpdate_=function(a){if(!a)this.onCastMediaChange_(null),GK(this,null);else if(this.castSession_.receiver.volume){a=this.castSession_.receiver.volume;var b=IK(this),c=Math.round(100*a.level||0);if(b.volume!=c||b.muted!=a.muted)this.info_("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=c,b.muted=!!a.muted,LK(this,b)}}; HK.prototype.onCastMediaChange_=function(a){this.info_("Cast media: "+!!a);this.castMedia_&&this.castMedia_.removeUpdateListener(this.boundCastMediaUpdateListener_);if(this.castMedia_=a)this.castMedia_.addUpdateListener(this.boundCastMediaUpdateListener_),JPa(this),this.publish("remotePlayerChange")}; var JPa=function(a){var b=a.castMedia_.media,c=a.castMedia_.customData;if(b&&c){var d=IK(a);b.contentId!=d.videoId&&a.info_("Cast changing video to: "+b.contentId);d.videoId=b.contentId;d.playerState=c.playerState;DK(d,a.castMedia_.getEstimatedTime());LK(a,d)}else a.info_("No cast media video. Ignoring state update.")}; e=HK.prototype;e.onCastMediaUpdate_=function(a){if(a)JPa(this),this.publish("remotePlayerChange");else this.onCastMediaChange_(null)}; e.toggleVideoInfo=function(){this.sendMessage_("sendDebugCommand",{debugCommand:"stats4nerds "})}; e.onCloudviewAvailabilityChange_=function(){var a=CPa();a&&GK(this,a)}; e.info_=function(a){UJ("CP",a)}; e.warn_=function(a){UJ("CP",a)}; var JK=function(a,b,c){return Ua(function(d){this.warn_("Failed to "+b+" with cast v2 channel. Error code: "+d.code);d.code!=chrome.cast.ErrorCode.TIMEOUT&&(this.warn_("Retrying "+b+" using MDx browser channel."),this.sendMessage_(b,c))},a)};var MK=function(a,b,c){ZJ.call(this);this.connectTimerId_=NaN;this.reconnecting_=!1;this.idleDisconnectTimerId_=this.clientSetVideoTimerId_=this.playingSyncTimerId_=this.reconnectedCheckScreenTimeout_=NaN;this.listeners_=[];this.autoplayMode_=this.autoplayVideoId_=this.clientVideoId_=this.playerContext_=this.handler_=null;this.http_=a;this.listeners_.push(sk(window,"beforeunload",Ua(this.handleBeforeUnload_,this)));this.connectedDevices_=[];this.playerContext_=new BK;this.currentScreenId_=b.id;this.currentScreenIdType_= b.idType;this.handler_=KPa(this,c);this.handler_.subscribe("handlerOpened",this.onChannelOpened_,this);this.handler_.subscribe("handlerClosed",this.onChannelClosed_,this);this.handler_.subscribe("handlerError",this.onChannelError_,this);this.handler_.subscribe("handlerMessage",this.onChannelMessage_,this);this.handler_.setLoungeToken(b.token);this.subscribe("remoteQueueChange",function(){var d=this.playerContext_.videoId;IOa()&&bK("yt-remote-session-video-id",d)},this)}; p(MK,ZJ); MK.prototype.connect=function(a,b){if(b){var c=b.listId,d=b.videoId,f=b.playerParams,h=b.clickTrackingParams,l=b.index,m={videoId:d},n=b.currentTime;b=b.locationInfo;void 0!==n&&(m.currentTime=5>=n?0:n);f&&(m.playerParams=f);b&&(m.locationInfo=b);h&&(m.clickTrackingParams=h);c&&(m.listId=c);void 0!==l&&(m.currentIndex=l);c&&(this.playerContext_.listId=c);this.playerContext_.videoId=d;this.playerContext_.index=l||0;this.playerContext_.state=3;DK(this.playerContext_,n);this.autoplayMode_="UNSUPPORTED";NK("Connecting with setPlaylist and params: "+ xj(m));this.handler_.connect({method:"setPlaylist",params:xj(m)},a,NOa())}else NK("Connecting without params"),this.handler_.connect({},a,NOa());LPa(this)}; MK.prototype.setLoungeToken=function(a){this.handler_.setLoungeToken(a)}; MK.prototype.dispose=function(){this.isDisposed()||(this.publish("beforeDispose"),OK(this,3));ZJ.prototype.dispose.call(this)}; MK.prototype.disposeInternal=function(){MPa(this);NPa(this);OPa(this);yk(this.clientSetVideoTimerId_);this.clientSetVideoTimerId_=NaN;yk(this.idleDisconnectTimerId_);this.idleDisconnectTimerId_=NaN;this.clientVideoId_=null;tk(this.listeners_);this.listeners_.length=0;this.handler_.dispose();ZJ.prototype.disposeInternal.call(this);this.autoplayMode_=this.autoplayVideoId_=this.connectedDevices_=this.playerContext_=this.handler_=null}; var NK=function(a){UJ("conn",a)}; MK.prototype.handleBeforeUnload_=function(){this.disconnect_(2)}; var KPa=function(a,b){return new NJ(PJ(a.http_,"/bc"),b,!1,function(){return a.getXsrfToken_()},"shortLived"==a.currentScreenIdType_)},OK=function(a,b){a.publish("proxyStateChange",b)},LPa=function(a){a.connectTimerId_=wk(Ua(function(){NK("Connecting timeout"); this.disconnect_(1)},a),2E4)},MPa=function(a){yk(a.connectTimerId_); a.connectTimerId_=NaN},OPa=function(a){yk(a.reconnectedCheckScreenTimeout_); a.reconnectedCheckScreenTimeout_=NaN},PPa=function(a){NPa(a); a.playingSyncTimerId_=wk(Ua(function(){this.sendMessage_("getNowPlaying")},a),2E4)},NPa=function(a){yk(a.playingSyncTimerId_); a.playingSyncTimerId_=NaN}; MK.prototype.isConnected_=function(){var a=this.handler_;return!!a.channel_&&3==a.channel_.getState()&&isNaN(this.connectTimerId_)}; MK.prototype.onChannelOpened_=function(){NK("Channel opened");this.reconnecting_&&(this.reconnecting_=!1,OPa(this),this.reconnectedCheckScreenTimeout_=wk(Ua(function(){NK("Timing out waiting for a screen.");this.disconnect_(1)},this),15E3)); ROa(kOa(this.handler_),this.currentScreenId_)}; MK.prototype.onChannelClosed_=function(){NK("Channel closed");isNaN(this.connectTimerId_)?hK(!0):hK();this.dispose()}; MK.prototype.onChannelError_=function(a,b){hK();isNaN(this.getReconnectTimeout_())?(b&&"shortLived"==this.currentScreenIdType_&&this.publish("browserChannelAuthError",a),NK("Channel error: "+a+" without reconnection"),this.dispose()):(this.reconnecting_=!0,NK("Channel error: "+a+" with reconnection in "+this.getReconnectTimeout_()+" ms"),OK(this,2))}; var RPa=function(a,b){b&&(MPa(a),OPa(a));b==a.isConnected_()?b&&(OK(a,1),a.sendMessage_("getSubtitlesTrack")):b?(a.getOtherConnectedRemoteId_()&&a.playerContext_.reset(),OK(a,1),a.sendMessage_("getNowPlaying"),QPa(a)):a.disconnect_(1)},SPa=function(a,b){var c=b.params.videoId; delete b.params.videoId;c==a.playerContext_.videoId&&(y.isEmpty(b.params)?a.playerContext_.trackData=null:a.playerContext_.trackData=b.params,a.publish("remotePlayerChange"))},TPa=function(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10); a.playerContext_.listId=b.params.listId||a.playerContext_.listId;FK(a.playerContext_,c,d);a.publish("remoteQueueChange")},UPa=function(a,b){b.params=b.params||{}; TPa(a,b);a.onStateChange_(b);a.publish("autoplayDismissed")}; MK.prototype.onStateChange_=function(a){var b=parseInt(a.params.currentTime||a.params.current_time,10);DK(this.playerContext_,isNaN(b)?0:b);b=parseInt(a.params.state,10);b=isNaN(b)?-1:b;-1==b&&-1E3==this.playerContext_.playerState&&(b=-1E3);this.playerContext_.playerState=b;b=Number(a.params.loadedTime);this.playerContext_.loadedTime=isNaN(b)?0:b;this.playerContext_.setDuration(Number(a.params.duration));b=this.playerContext_;var c=Number(a.params.liveIngestionTime);b.liveIngestionTime_=c;b.isLive_= isNaN(c)?!1:!0;b=this.playerContext_;c=Number(a.params.seekableStartTime);a=Number(a.params.seekableEndTime);b.seekableStart_=isNaN(c)?0:c;b.seekableEnd_=isNaN(a)?0:a;1==this.playerContext_.playerState?PPa(this):NPa(this);this.publish("remotePlayerChange")}; MK.prototype.onAdStateChange_=function(a){if(-1E3!=this.playerContext_.playerState){var b=1085;switch(parseInt(a.params.adState,10)){case 1:b=1081;break;case 2:b=1084;break;case 0:b=1083;}this.playerContext_.playerState=b;a=parseInt(a.params.currentTime,10);DK(this.playerContext_,isNaN(a)?0:a);this.publish("remotePlayerChange")}}; var VPa=function(a,b){var c="true"==b.params.muted;a.playerContext_.volume=parseInt(b.params.volume,10);a.playerContext_.muted=c;a.publish("remotePlayerChange")},WPa=function(a,b){a.autoplayVideoId_=b.params.videoId; a.publish("nowAutoplaying",parseInt(b.params.timeout,10))},XPa=function(a,b){var c="true"==b.params.hasNext; a.playerContext_.hasPrevious="true"==b.params.hasPrevious;a.playerContext_.hasNext=c;a.publish("previousNextChange")}; e=MK.prototype;e.onChannelMessage_=function(a){a.params?NK("Received: action="+a.action+", params="+xj(a.params)):NK("Received: action="+a.action+" {}");switch(a.action){case"loungeStatus":a=qr(a.params.devices);this.connectedDevices_=gb(a,function(c){return new MJ(c)}); a=!!lb(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type}); RPa(this,a);break;case"loungeScreenDisconnected":Aaa(this.connectedDevices_,function(c){return"LOUNGE_SCREEN"==c.type}); RPa(this,!1);break;case"remoteConnected":var b=new MJ(qr(a.params.device));lb(this.connectedDevices_,function(c){return c.equals(b)})||zaa(this.connectedDevices_,b); break;case"remoteDisconnected":b=new MJ(qr(a.params.device));Aaa(this.connectedDevices_,function(c){return c.equals(b)}); break;case"gracefulDisconnect":break;case"playlistModified":TPa(this,a);break;case"nowPlaying":UPa(this,a);break;case"onStateChange":this.onStateChange_(a);break;case"onAdStateChange":this.onAdStateChange_(a);break;case"onVolumeChanged":VPa(this,a);break;case"onSubtitlesTrackChanged":SPa(this,a);break;case"nowAutoplaying":WPa(this,a);break;case"autoplayDismissed":this.publish("autoplayDismissed");break;case"autoplayUpNext":this.autoplayVideoId_=a.params.videoId||null;this.publish("autoplayUpNext", this.autoplayVideoId_);break;case"onAutoplayModeChanged":this.autoplayMode_=a.params.autoplayMode;this.publish("autoplayModeChange",this.autoplayMode_);"DISABLED"==this.autoplayMode_&&this.publish("autoplayDismissed");break;case"onHasPreviousNextChanged":XPa(this,a);break;case"requestAssistedSignIn":this.publish("assistedSignInRequested",a.params.authCode);break;default:NK("Unrecognized action: "+a.action);}}; e.resetClientVideoId_=function(){if(this.clientVideoId_){var a=this.clientVideoId_;this.clientVideoId_=null;this.playerContext_.videoId!=a&&this.sendMessage_("getNowPlaying")}}; e.getProxyState_=function(){var a=3;this.isDisposed()||(a=0,isNaN(this.getReconnectTimeout_())?this.isConnected_()&&(a=1):a=2);return a}; e.disconnect_=function(a){NK("Disconnecting with "+a);MPa(this);this.publish("beforeDisconnect",a);1==a&&hK();this.handler_.disconnect(a);this.dispose()}; e.getPlayerContextData_=function(){var a=this.playerContext_;this.clientVideoId_&&(a=this.playerContext_.clone(),FK(a,this.clientVideoId_,a.index));return FPa(a)}; e.setPlayerContextData_=function(a){var b=new BK(a);b.videoId&&b.videoId!=this.playerContext_.videoId&&(this.clientVideoId_=b.videoId,yk(this.clientSetVideoTimerId_),this.clientSetVideoTimerId_=wk(Ua(this.resetClientVideoId_,this),5E3));var c=[];this.playerContext_.listId==b.listId&&this.playerContext_.videoId==b.videoId&&this.playerContext_.index==b.index||c.push("remoteQueueChange");this.playerContext_.playerState==b.playerState&&this.playerContext_.volume==b.volume&&this.playerContext_.muted== b.muted&&EK(this.playerContext_)==EK(b)&&xj(this.playerContext_.trackData)==xj(b.trackData)||c.push("remotePlayerChange");this.playerContext_.reset(a);eb(c,function(d){this.publish(d)},this)}; e.getOtherConnectedRemoteId_=function(){var a=this.handler_.getDeviceId(),b=lb(this.connectedDevices_,function(c){return"REMOTE_CONTROL"==c.type&&c.id!=a}); return b?b.id:""}; e.getReconnectTimeout_=function(){return this.handler_.getReconnectTimeout()}; e.getAutoplayMode_=function(){return this.autoplayMode_||"UNSUPPORTED"}; e.getAutoplayVideoId_=function(){return this.autoplayVideoId_||""}; e.reconnect_=function(){!isNaN(this.getReconnectTimeout_())&&this.handler_.reconnect()}; var QPa=function(a){yk(a.idleDisconnectTimerId_);a.idleDisconnectTimerId_=wk(Ua(a.disconnect_,a,1),864E5)}; MK.prototype.sendMessage_=function(a,b){b?NK("Sending: action="+a+", params="+xj(b)):NK("Sending: action="+a);this.handler_.sendMessage(a,b)}; MK.prototype.sendMessageWithUserAction_=function(a,b){this.sendMessage_(a,b);QPa(this)}; MK.prototype.getXsrfToken_=function(){var a=Al("SID","")||"",b=Al("SAPISID","")||"",c=Al("__Secure-3PAPISID","")||"";if(!a&&!b&&!c)return"";a=Le(Nd(a),2);b=Le(Nd(b),2);c=Le(Nd(c),2);return Le(Nd(a+","+b+","+c),2)}; MK.prototype.subscribe=MK.prototype.subscribe;MK.prototype.unsubscribeByKey=MK.prototype.unsubscribeByKey;MK.prototype.getProxyState=MK.prototype.getProxyState_;MK.prototype.disconnect=MK.prototype.disconnect_;MK.prototype.getPlayerContextData=MK.prototype.getPlayerContextData_;MK.prototype.setPlayerContextData=MK.prototype.setPlayerContextData_;MK.prototype.getOtherConnectedRemoteId=MK.prototype.getOtherConnectedRemoteId_;MK.prototype.getReconnectTimeout=MK.prototype.getReconnectTimeout_; MK.prototype.getAutoplayMode=MK.prototype.getAutoplayMode_;MK.prototype.getAutoplayVideoId=MK.prototype.getAutoplayVideoId_;MK.prototype.reconnect=MK.prototype.reconnect_;MK.prototype.sendMessage=MK.prototype.sendMessageWithUserAction_;MK.prototype.getXsrfToken=MK.prototype.getXsrfToken_;var YPa=function(a){$J.call(this,"ScreenServiceProxy");this.instance_=a;this.subscriptionKeys_=[];this.subscriptionKeys_.push(this.instance_.$_s("screenChange",Ua(this.onScreenChange_,this)));this.subscriptionKeys_.push(this.instance_.$_s("onlineScreenChange",Ua(this.onOnlineScreenChange_,this)))}; p(YPa,$J);e=YPa.prototype;e.getScreens=function(a){return this.instance_.$_gs(a)}; e.getOnlineScreens=function(){return this.instance_.$_gos()}; e.contains=function(a){return!!this.instance_.$_c(a)}; e.get=function(a){return this.instance_.$_g(a)}; e.start=function(){this.instance_.$_st()}; e.add=function(a,b,c){this.instance_.$_a(a,b,c)}; e.remove=function(a,b,c){this.instance_.$_r(a,b,c)}; e.updateName=function(a,b,c,d){this.instance_.$_un(a,b,c,d)}; e.getScreenByPairingCode=function(a,b,c,d){this.instance_.$_gspc(a,b,c,d)}; e.getScreenByPollingPairingCode=function(a,b,c,d,f){return this.instance_.$_gsppc(a,b,c,d,f)}; e.disposeInternal=function(){for(var a=0,b=this.subscriptionKeys_.length;aa?this.delay_.start():this.isAnimating_=!1};var WQa=new Cl("yt.autonav");var wL=function(){this.autonavState_=eJ.getInstance().getFlag(140)?1:2;this.disabledAutonavPauseReason_=this.autonavPauseReason_=void 0}; wL.prototype.getState=function(){return this.autonavState_}; wL.prototype.pause=function(a){2==this.autonavState_?(this.setState(3),this.autonavPauseReason_=a):1==this.autonavState_&&(this.disabledAutonavPauseReason_=a)}; wL.prototype.unpause=function(){3==this.autonavState_?(this.setState(2),this.autonavPauseReason_=void 0):1==this.autonavState_&&(this.disabledAutonavPauseReason_=void 0)}; wL.prototype.setState=function(a){if(this.autonavState_!=a){this.autonavState_=a;if(3!=a){a=2==a;var b=!eJ.getInstance().getFlag(140);a!==b&&(b=eJ.getInstance(),a||fJ(0,141,!0),fJ(0,140,!a),b.save(),WQa.set("autonav_disabled",!a))}oL.getInstance().triggerOptionalAction("yt-autonav-state-changed-action",this.autonavState_)}}; Ma(wL);var xL=function(){this.hasRun=!1};function XQa(a,b){a=a&&a.watchEndpointSupportedAuthorizationTokenConfig&&a.watchEndpointSupportedAuthorizationTokenConfig.videoAuthorizationToken&&a.watchEndpointSupportedAuthorizationTokenConfig.videoAuthorizationToken.credentialTransferTokens||[];for(var c=0;ca?"0"+a:""+a;return{thumbnailOverlayTimeStatusRenderer:{text:RL(b?b+":"+(10>c?"0"+c:""+c)+":"+a:c+":"+a),style:"DEFAULT"}}} ;function uRa(a){return{titleText:RL(YK("DOWNLOADS",void 0,"Downloads")),contents:a.map(function(b){var c=b.videoEntity;b={videoId:c.videoId,title:SL(c.title),shortBylineText:SL(b.channelEntity.title),thumbnail:c.thumbnail};c.videoId&&(b.navigationEndpoint=QL(c.videoId));c.lengthSeconds&&(b.thumbnailOverlays=[tRa(c.lengthSeconds)]);return{playlistPanelVideoRenderer:b}}), totalVideos:a.length}} ;function vRa(){return{style:"STYLE_LIGHT_TEXT",size:"SIZE_DEFAULT",text:RL(YK("VIEW_DOWNLOADS",void 0,"View")),loggingDirectives:{clientVeSpec:{uiType:49503}},navigationEndpoint:OL("FEdownloads","/feed/downloads",6827,"WEB_PAGE_TYPE_BROWSE")}} ;function wRa(){return{title:RL(YK("CONNECT_TO_THE_INTERNET",void 0,"Connect to the internet")),bodyText:RL(YK("OFFLINE_CHECK_CONNECTION",void 0,"You're offline. Check your connection.")),icon:{iconType:"OFFLINE_NO_CONTENT"},ctaButton:{reloadPageButtonRenderer:{style:"STYLE_SUGGESTIVE",size:"SIZE_SMALL",text:RL(YK("RETRY",void 0,"Retry")),loggingDirectives:{clientVeSpec:{uiType:49504}},serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{signalAction:{signal:"SOFT_RELOAD_PAGE"}}]}}}}, style:{value:"BACKGROUND_PROMO_STYLE_TYPE_FULL_HEIGHT"},loggingDirectives:{clientVeSpec:{uiType:22233}}}} function xRa(){return{title:RL(YK("DO_NOT_HAVE_DOWNLOADS",void 0,"You do not have any downloads")),icon:{iconType:"OFFLINE_NO_CONTENT"},style:{value:"BACKGROUND_PROMO_STYLE_TYPE_FULL_HEIGHT"},loggingDirectives:{clientVeSpec:{uiType:21411}}}} ;function yRa(a){return a.length?{contents:[{shelfRenderer:{title:RL(YK("DOWNLOADS",void 0,"Downloads")),icon:{iconType:"OFFLINE_DOWNLOAD"},content:{gridRenderer:{items:a.map(function(b){var c=b.videoEntity,d=b.status,f=mRa([b]),h,l=3===d||2===d;d=2===d?Math.floor(100*f).toString():"0";b={videoId:c.videoId,title:SL(c.title),shortBylineText:SL(b.channelEntity.title),shortViewCountText:l?SL(YK("DOWNLOADING_PERCENT",{percent:d},"Downloading... "+d+"%")):SL(null===(h=c.localizedStrings)||void 0===h?void 0: h.viewCount),thumbnail:c.thumbnail,menu:{menuRenderer:{items:[{menuServiceItemDownloadRenderer:{serviceEndpoint:{offlineVideoEndpoint:{videoId:c.videoId}}}}]}},isDisabled:l};c.videoId&&!l&&(b.navigationEndpoint=QL(c.videoId));c.lengthSeconds&&!l?b.thumbnailOverlays=[tRa(c.lengthSeconds)]:l&&(b.thumbnailOverlays=[{thumbnailOverlayDownloadingRenderer:{}}]);return{gridVideoRenderer:b}})}}, menu:{menuRenderer:{topLevelButtons:[{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:RL(YK("DOWNLOADS_SETTINGS",void 0,"Downloads Settings")),loggingDirectives:{clientVeSpec:{uiType:21412}},navigationEndpoint:OL("SPaccount_downloads","/account_downloads",6827,"WEB_PAGE_TYPE_SETTINGS")}}]}}}},{messageRenderer:{subtext:{messageSubtextRenderer:{text:RL(YK("DOWNLOADS_AVAILABILITY",void 0,"Downloads remain available as long as your device has an active internet connection for 30 days. This process happens automatically and does not re-download the video."))}}}}]}: {contents:[{backgroundPromoRenderer:xRa()}]}} ;function zRa(a,b){return(a=ARa(a,b))?a.status:0} function BRa(a){return a.localMediaInfo.filter(function(b){return 1===b.status||3===b.status||4===b.status||2===b.status}).filter(function(b){return!!b.videoEntity&&!!b.channelEntity})} function ARa(a,b){if(b)return a.localMediaInfo.find(function(c){return c.videoId===b})} function CRa(a){return a.localMediaInfo.filter(function(b){return 3===b.status||2===b.status})} ;var DRa=function(a){var b=this;this.listId="PPSV";this.updateCallback=a;NL.subscribe(function(){b.updateCallback(b.listId,b.getPlaylistData(),{})})}; DRa.prototype.getPlaylistData=function(){var a=NL.getState().download;a=BRa(a);return uRa(a)};var TL=function(a,b,c,d){d=void 0===d?[]:d;this.playlistNetworkManager=a;this.listId=b;this.updateCallback=c;this.videoIds=d;this.pendingUpdates=[];this.currentIndex=0}; TL.prototype.setCurrentIndex=function(a){this.currentIndex=a}; TL.prototype.setListId=function(a){this.listId=a}; var ERa=function(a,b){a.currentCreateRequest&&a.currentCreateRequest.cancel(b);a.currentUpdateRequest&&a.currentUpdateRequest.cancel(b);a.currentRefreshRequest&&a.currentRefreshRequest.cancel(b)}; TL.prototype.delete=function(){ERa(this,"PROXY DELETED")}; TL.prototype.addVideos=function(a,b,c){var d=this;void 0!==c?this.videoIds.splice.apply(this.videoIds,[c,0].concat(ha(a))):this.videoIds.push.apply(this.videoIds,ha(a));this.listId||this.currentCreateRequest?(a.forEach(function(f,h){f={addedVideoId:f,action:"ACTION_ADD_VIDEO"};c&&(f.addedVideoPosition=c+h);d.pendingUpdates.push(f)}),UL(this)):FRa(this,b.onCreateListCommand)}; var GRa=function(a,b,c,d,f){Faa(a.videoIds,b,c);b>a.currentIndex&&c<=a.currentIndex?a.setCurrentIndex(a.currentIndex+1):b===a.currentIndex?a.setCurrentIndex(c):b=a.currentIndex&&a.setCurrentIndex(a.currentIndex-1);a.pendingUpdates.push({action:"ACTION_MOVE_VIDEO_AFTER",setVideoId:d,movedSetVideoIdPredecessor:f});UL(a)},FRa=function(a,b){ERa(a,"OBSOLETE"); a.currentCreateRequest=HRa(a.playlistNetworkManager,b,a.videoIds);Wi(a.currentCreateRequest,function(){a.currentCreateRequest=void 0}).then(function(c){a.setListId(c.playlistId); 0Date.now()-a:!1:!1}; aM.prototype.getPlaylistId=function(){if(!this.storage)return null;var a=null;try{a=this.storage.get(this.playlistStoreKey)}catch(b){}return a}; aM.prototype.getIndex=function(){if(this.storage){try{var a=this.storage.get(this.indexStoreKey)}catch(b){}a=Number(a);if(!isNaN(a))return a}}; aM.prototype.getTimestamp=function(){if(this.storage){try{var a=this.storage.get(this.timeStoreKey)}catch(b){}a=Number(a);if(!isNaN(a))return a}};var aSa=["navigationEndpoint","watchEndpoint","videoId"],bSa=["nextButtonVideo","watchEndpoint","videoId"];function cSa(a){return{mode:"NORMAL",autoplayVideo:a.navigationEndpoint,nextButtonVideo:a.navigationEndpoint}} function dSa(a,b){if(!b||!b.sets)return{sets:[cSa(a)]};var c=b.sets.find(function(h){return"NORMAL"===h.mode}),d=y.unsafeClone(b); if(!c)return d.sets.push(cSa(a)),d;c=y.getValueByKeys.apply(y,[c].concat(ha(bSa)));var f=y.getValueByKeys.apply(y,[a].concat(ha(aSa)));if(c===f)return b;d.sets=d.sets.filter(function(h){return"NORMAL"!==h.mode}); d.sets.push(cSa(a));return d} function bM(a,b){return a.startsWith("TLPQ")?!0:a.startsWith("TLPP")&&"CRQueue"===b.title} function eSa(a){return!!a.playlistPanelVideoRenderer&&!a.playlistPanelVideoRenderer.unplayableText} function fSa(a){return!!a.playlistPanelVideoRenderer&&!!a.playlistPanelVideoRenderer.title} function gSa(a,b){if(b.contents)return(b=b.contents.find(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}))?b.playlistPanelVideoRenderer:void 0} function hSa(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId===a}):-1} function iSa(a,b){return b.contents?b.contents.findIndex(function(c){return!!c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.playlistSetVideoId===a}):-1} function jSa(a,b){a.contents&&-1!==b&&1===a.contents.splice(b,1).length&&void 0!==a.totalVideos&&(--a.totalVideos,delete a.videoCountText)} function cM(a){var b=[];if(!a||!a.contents)return b;a=k(a.contents);for(var c=a.next();!c.done;c=a.next())c=c.value,c.playlistPanelVideoRenderer&&c.playlistPanelVideoRenderer.videoId&&b.push(c.playlistPanelVideoRenderer.videoId);return b} function kSa(a,b,c){if(void 0!==a&&void 0!==b&&void 0!==c)return{runs:[{text:a},{text:" \u2022 "},{text:b+1+" / "+c}]}} function lSa(a){if(a&&a.contents)return(a=a.contents.find(function(b){return!!b.playlistPanelVideoRenderer&&!!b.playlistPanelVideoRenderer.selected})||a.contents[a.currentIndex])?a.playlistPanelVideoRenderer:void 0} function mSa(a,b,c,d,f,h,l){f=void 0===f?!1:f;h=void 0===h?!1:h;l=void 0===l?!1:l;if(a.contents&&0!==a.contents.length){d&&(a.contents=a.contents.filter(d));d=a.contents.length;for(var m=0;mc||(d.videoIds.splice(c,1),c=f.contents.length?void 0:f.contents[b].playlistPanelVideoRenderer,b&&b.videoId=== d.playingVideoId||(b=hSa(d.playingVideoId,c.panel),a.index=-1===b?0:b));a:{b=a.index+1;f=c.panel;if(f.contents&&!(b>=f.contents.length)&&(b=f.contents.slice(b).find(eSa))){b=b.playlistPanelVideoRenderer;break a}b=void 0}b?c.autoplayRenderer=dSa(b,c.autoplayRenderer):d&&d.relatedVideoArgs&&(c.playerData.rvs=d.relatedVideoArgs);d=d?d.playlistIndexOffset:0;a.queueProxy?mSa(c.panel,a.index,d,fSa,!0,!0,!0):mSa(c.panel,a.index,d);c.playerData.playlistPanelRenderer=c.panel;return c}; kM.prototype.activateMiniplayer=function(a,b){var c=this.actionRouter.triggerOptionalAction("yt-miniplayer-active");if(c&&c.length&&c[0])this.actionRouter.triggerOptionalAction("yt-miniplayer-toast-action",a,YK("ADDED_TO_QUEUE",void 0,"Added to queue"));else if(a&&a.navigationEndpoint){JL.getInstance().lockupActivation=!0;c=a.navigationEndpoint;var d=this.pageManager.getPlayerFromWatch();this.actionRouter.triggerOptionalAction("yt-activate-miniplayer-action",d);d=this.actionRouter;var f=d.triggerOptionalAction, h=a.title;b=b?kSa(YK("QUEUE",void 0,"Queue"),0,1):a.longBylineText;f.call(d,"yt-miniplayer-update-header-action",h,b,a.navigationEndpoint);this.actionRouter.triggerOptionalAction("yt-miniplayer-load-endpoint",c,!0);N("kevlar_miniplayer_queue_user_activation")&&(JL.getInstance().userActivation=!0)}}; var mM=function(a,b){a.playlistManager.setAutoplayRenderer(b.autoplayRenderer||null);a.playlistManager.setPlaylistData(b.panel||null);b.playerData&&a.playlistManager.setPlayerPlaybackControlData(b.playerData)};var oM=function(a,b,c,d,f){c=void 0===c?!1:c;d=void 0===d?lM():d;this.hasRun=!1;this.playerPromiseResolver=a;this.playerProvider=b;this.miniplayerActive=c;this.playlistController=d;this.tempData=f}; p(oM,xL);oM.prototype.validate=function(a){var b=!N("kevlar_op_warm_pages")||!this.hasRun;return!(!a.data.player||"watch"!==a.data.page||!b)}; oM.prototype.handle=function(a){a.data.filler||this.miniplayerActive||(bp("cfg"),oL.getInstance().triggerAction("player-update-pre",a.data.page,a.data.player,a.data.playerResponse));var b=a.endpoint;N("kevlar_playback_associated_queue")&&b&&b.watchEndpoint&&b.watchEndpoint.playlistId&&b.watchEndpoint.videoId&&(b=this.playlistController.getQueueInfo(b.watchEndpoint.playlistId,b.watchEndpoint.videoId))&&a.data.player&&a.data.player.args&&(a.data.player.args.queue_info=b);N("enable_masthead_quartile_ping_fix")&& this.tempData&&this.tempData.adpings&&a.data.player&&a.data.player.args&&(a.data.player.args.adpings=this.tempData.adpings);if(b=this.playerProvider()){try{b.update(a.data.player,b).then(this.playerPromiseResolver.resolve)}catch(c){b?Zm(c):Zm(Error("Player missing when attempting update from SwfConfigChunkProcessor. el="+(a.data&&a.data.player&&a.data.player.args&&a.data.player.args.el))),this.playerPromiseResolver.resolve()}this.hasRun=!0}else Am(Error("No player to update with swfconfig."))};var pM=function(a,b,c){this.hasRun=!1;this.playerPromiseResolver=a;this.pageRequest=b;this.playlistController=c}; p(pM,xL);pM.prototype.validate=function(a){return!!y.getValueByKeys.apply(y,[a.data].concat(ha(URa)))}; pM.prototype.handle=function(a){var b=this;this.playerPromiseResolver.promise.then(function(){var c=a.data;var d=y.getValueByKeys.apply(y,[c].concat(ha(ORa))),f=y.getValueByKeys.apply(y,[c].concat(ha(SRa))),h=y.getValueByKeys.apply(y,[c].concat(ha(QRa)));var l=(l=y.getValueByKeys.apply(y,[c].concat(ha(PRa))))?{videoId:l.videoId,thumbnail:l.thumbnail,title:l.title?kL(l.title):void 0,shortBylineText:l.author?kL(l.author):void 0}:void 0;var m=y.getValueByKeys.apply(y,[c].concat(ha(TRa))),n=y.getValueByKeys.apply(y, [c].concat(ha(RRa))),r=!!m||!!n&&!!n.results&&0=c||wM.get(""+a+"-dismissed")?!1:(c=LSa[a])&&!b.eduDisplayedThisLoad_[c.setKey||a]&&(c.titleText&&YK(c.titleText)||c.bodyText&&YK(c.bodyText))?!0:!1;if(!b)return null;b=LSa[a];if(!b)return null;c=b.bodyText?YK(b.bodyText):void 0;var d=b.titleText?YK(b.titleText):void 0;return[{openPopupAction:{popupType:"HINT",position:b.position,popup:{bubbleHintRenderer:{text:d?kL(d):void 0,detailsText:c? kL(c):void 0,style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:kL(YK("EDU_GOT_IT")),serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{eduDismissAction:{key:a}}]}}}}}}}},{eduImpressionAction:{key:a}}]}; Ma(xM);for(var MSa=["WEB_PAGE_TYPE_SETTINGS","red","playlist","labs","ypc-offers"],NSa=[],zM=6;1<=zM;zM--)NSa.push({columnCount:zM,query:1==zM?0:214*zM-4+32,className:"grid-"+zM+"-columns",width:214*zM+"px"});var AM=function(a){this.actionRouter_=a=void 0===a?oL.getInstance():a;this.documentWidth_=document.body.clientWidth;this.currentSnapState_=OSa(this);this.miniGuideVisible_=this.guidePersistentAndVisible_=!1}; AM.prototype.setWidth=function(a){this.documentWidth_=a;PSa(this)}; var OSa=function(a){var b=a.miniGuideVisible_?72:0,c=a.documentWidth_-(a.guidePersistentAndVisible_?240:b);return NSa.find(function(d){return c>d.query})},PSa=function(a){var b=OSa(a); b!=a.currentSnapState_&&(a.currentSnapState_=b,a.actionRouter_.triggerOptionalAction("ytd-update-grid-state-action"))}; Ma(AM);var BM=new Cl("yt-mentions"),CM=function(){this.eduDisplayedThisLoad_=!1}; CM.prototype.dismissEdu=function(){BM.set("edu-dismissed",!0)}; CM.prototype.getEduImpressionCount_=function(){var a=parseInt(BM.get("edu-impressions"),10);return isFinite(a)?a:0}; CM.prototype.recordEduImpression=function(){BM.set("edu-impressions",this.getEduImpressionCount_()+1)}; CM.prototype.maybeGetEduPopup=function(){if(!BM.get("edu-dismissed")&&!this.eduDisplayedThisLoad_){var a=ik("user_mention_suggestions_edu_impression_cap");if(!(a&&this.getEduImpressionCount_()>=a)&&"MENTIONS_EDU_TEXT"in XK){a={openPopupAction:{popupType:"HINT",position:"OPEN_POPUP_POSITION_TOPRIGHT",popup:{bubbleHintRenderer:{detailsText:kL(YK("MENTIONS_EDU_TEXT")),style:"BUBBLE_HINT_STYLE_BLUE_TOOLTIP",confirmButton:{buttonRenderer:{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:kL(YK("EDU_GOT_IT")), serviceEndpoint:{signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{signalAction:{signal:"CONFIRM_MENTIONS_EDU"}}]}}}}}}}};if("MENTIONS_EDU_TITLE"in XK){var b=kL(YK("MENTIONS_EDU_TITLE"));b.runs[0].navigationEndpoint={urlEndpoint:{url:"https://support.google.com/youtube/?p=creator_community",target:"TARGET_NEW_WINDOW"}};a.openPopupAction.popup.bubbleHintRenderer.text=b}return[a,{signalAction:{signal:"RECORD_MENTIONS_EDU_IMPRESSION"}}]}}}; Ma(CM);var QSa=new Cl("yt-menu"),RSa=function(){},TSa=function(a,b,c){a="right-click"==b?c.rightClickMenuPopupHint:c.menuPopupHint; if(!(10b?null:a.substr(b+1);a=a.slice(0);var c=["frags"];N("kevlar_hide_pp_url_param")&&c.push("pp");N("kevlar_hide_time_continue_url_param")&&c.push("time_continue");c=k(c);for(var d=c.next();!d.done;d=c.next())d=d.value,a=Ld(Ed(a),d);return Ed(a)+(b?"#"+b:"")} function uTa(a){if(!a)return a;a=a.toLowerCase();a.startsWith("web_page_type_")&&(a=a.slice(14));return a} ;function YM(){var a;if(!N("kevlar_op_page_consent_bump_killswitch")&&!A("ID_TOKEN",void 0)&&!YI()){var b=gM();if(b=null===(a=null===b||void 0===b?void 0:b.adSignalsInfo)||void 0===a?void 0:a.consentBumpParams){var c={consentHours:b.consentHours};4!==Number(b.consentDay)&&Al("HideTicker","")||(c.consentDay=b.consentDay,c.consentHostnameOverride=b.consentHostnameOverride,c.urlOverride=b.urlOverride);return c}}} var vTa=/^[a-zA-Z0-9_\-]{11}$/;function wTa(a,b,c){var d={};d.currentUrl=b;d.vis=void 0!==a.vis?a.vis:0;d.splay=!1;b=eJ.getInstance();d.autoCaptionsDefaultOn=b.getFlag(66);b.getFlag(141)?b.getFlag(140)?d.autonavState="STATE_OFF":d.autonavState="STATE_ON":d.autonavState="STATE_NONE";d.html5Preference="HTML5_PREF_WANTS";isNaN(A("STS",void 0))||(d.signatureTimestamp=A("STS",void 0));a.autonav&&(d.autoplay=!0,d.autonav=!0);d.referer=c;d.lactMilliseconds=void 0!==a.lact?a.lact.toString():"-1";return d} ;var xTa=["SPhistory_controls","FEpost_detail"];N("kevlar_warm_settings_killswitch")&&(xTa=[].concat(ha(xTa),["SPaccount_overview","SPaccount_playback"]));var yTa="jct ybp sld rapt cid channel_creation_token force_ad_format ex_ads extra_kw playnext".split(" ").map(function(a){return a+"="}).join("|"),zTa=["/post/"].map(function(a){return""+a}).join("|"),ATa=new RegExp([yTa, zTa].join("|")),ZM=function(a,b){this.watchEndpointMap=a;this.innerTubeTransportService=b},$M=function(a,b){var c,d,f,h,l; if(null===(d=null===(c=b.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d||!d.rootVe)return!1;var m=null===(h=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===h?void 0:h.url;if(!m)return!1;var n=kk("kevlar_page_service_url_prefix_carveouts");if(n&&n.length){n=k(n);for(var r=n.next();!r.done;r=n.next())if((r=r.value)&&m.startsWith(r))return!1}if(ATa.test(m))return!1;m=null===(l=b.browseEndpoint)||void 0===l?void 0:l.browseId;if(m&&xTa.includes(m))var v= !1;else if(b.watchEndpoint){if(N("kevlar_op_warm_pages")&&a.watchEndpointMap.watchNext&&a.watchEndpointMap.player){var z;v=b.watchEndpoint?(a=b.watchEndpoint.videoId)&&vTa.test(a)?(b=null===(z=null===(v=b.commandMetadata)||void 0===v?void 0:v.webCommandMetadata)||void 0===z?void 0:z.url)&&b.includes(a)?!0:!1:!1:!1}else v=!1;}else v=jM(a.innerTubeTransportService,b);return v},BTa=function(a,b){var c=ZM.instance,d={},f=document.referrer,h={url:t.location.href},l=XL(RMa); return $L(c.innerTubeTransportService,h,l).then(function(m){m=m.endpoint;var n="unknown",r=uTa(y.getValueByKeys(m,"commandMetadata","webCommandMetadata","webPageType"));r&&sTa[r]?n=sTa[r]:m.browseEndpoint||m.watchPlaylistEndpoint?n="browse":m.searchEndpoint?n="search":m.watchEndpoint&&(n="watch");"unknown"==n&&vd(Error("Could not resolve page type for endpoint: "+JSON.stringify(m)));return aN(c,m,d,f,n,a,b)})},aN=function(a,b,c,d,f,h,l){var m,n,r,v,z,C,J={rootVe:null===(n=null===(m=b.commandMetadata)|| void 0===m?void 0:m.webCommandMetadata)||void 0===n?void 0:n.rootVe, url:null===(v=null===(r=b.commandMetadata)||void 0===r?void 0:r.webCommandMetadata)||void 0===v?void 0:v.url,endpoint:b,page:f};if(b.watchEndpoint){f={contentPlaybackContext:wTa(c,null===(C=null===(z=b.commandMetadata)||void 0===z?void 0:z.webCommandMetadata)||void 0===C?void 0:C.url,d),consentBumpParams:YM()};c=Qi(void 0);(d=a.watchEndpointMap.player)&&(d=new d().getRequest(b,f))&&(c=$L(a.innerTubeTransportService,d.innerTubeRequest,d.input,void 0,d.config));d=Qi(void 0);var E=a.watchEndpointMap.watchNext; E&&(f=new E().getRequest(b,f))&&(d=$L(a.innerTubeTransportService,f.innerTubeRequest,f.input,void 0,f.config));f=Qi(J);E=Ui();CTa(a,b,f,c,d,h,l,E);return E.promise}if(jM(a.innerTubeTransportService,b)){c={consentBumpParams:YM(),tempData:c,disableCache:c.disableCache};var T=ZL(a.innerTubeTransportService,b,c);return T=T.then(function(la){J.response=la;l(T)||h(b,J);return J})}return Qi(J)},DTa=function(a,b,c){var d=window.location.href,f,h; if(!b.watchEndpoint)return Zm(new Ul("Non-WatchEndpoint not support for prefetching.",b)),Qi({});d=wTa(c,null===(h=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===h?void 0:h.url,d);var l=YM(),m={},n=c.pbis||0;n&&(m.playbackBeginsInSeconds=n);c.prefetch_reason&&"hc_pbis"===c.prefetch_reason&&(m.prefetchReason="PREFETCH_REASON_HINT_CONFIG_PLAYBACK_BEGINS_IN_SECONDS");c={contentPlaybackContext:d,consentBumpParams:l,prefetchPlaybackContext:m};if(d=a.watchEndpointMap.player)if(c= new d().getRequest(b,c))return $L(a.innerTubeTransportService,c.innerTubeRequest,c.input,void 0,c.config);Zm(new Ul("No request builder available to prefetch endpoint.",b));return Qi({})},CTa=function(a,b,c,d,f,h,l,m){Za(a,function r(){var v,z,C,J; return za(r,function(E){switch(E.nextAddress){case 1:return q(E,c,2);case 2:v=E.yieldResult;if(l(m.promise))return m.resolve(v),E.return();h(b,v);ta(E,3);return q(E,d,5);case 5:z=E.yieldResult;ua(E,4);break;case 3:return C=va(E),m.reject(C),E.return();case 4:if(void 0===z)return v.reload=!0,h(b,v),m.resolve(v),E.return();if(l(m.promise))return m.resolve(v),E.return();v.playerResponse=z;h(b,v);ta(E,6);return q(E,f,8);case 8:J=E.yieldResult;ua(E,7);break;case 6:va(E);case 7:if(void 0===J)return v.response= {responseContext:{}},m.resolve(v),E.return();if(l(m.promise))return m.resolve(v),E.return();v.response=J;h(b,v);m.resolve(v);ra(E);}})})};var bN=function(a){this.networkManager_=a;this.partCallbacks_=[]}; e=bN.prototype; e.getRequest=function(a,b){var c=this,d=this.getParams(b),f=hL(a,d),h=this.getTempData(a,b);h.endpoint=JSON.stringify(a);var l={headers:{"X-YouTube-STS":N("web_player_enable_ipp")?A("STS",void 0):18660,"x-youtube-csoc":1}};cJ(f,h);return new Oi(function(m,n){var r=c.getXhrParams(d),v;N("kevlar_cache_on_ttl_player")&&(v=ZM.instance);v&&$M(v,a)?DTa(v,a,h).then(function(z){z?m(z):n()},n):c.networkManager_.requestDataForEndpoint(a,r,c.onPartsCallback_.bind(c),l).then(function(z){z?m(z):n()},n)})}; e.getCacheKeyForEndpoint=function(a){return WM(a,!1)}; e.addPartCallback=function(a){this.partCallbacks_.push(a)}; e.onPartsCallback_=function(a){this.partCallbacks_.forEach(function(b){a&&b(a)})}; e.onRequestCompletes_=function(){};var cN=function(){}; e=cN.prototype;e.onPlaylistNext=function(){}; e.onPlaylistPrevious=function(){}; e.updatePlaylistEventListeners=function(){}; e.setPlayer=function(){}; e.setPlaylistComponent=function(){}; e.setAutoplayRenderer=function(){}; e.setPlaylistData=function(){}; e.setPlayerPlaybackControlData=function(){}; e.skipVideo=function(){}; e.cancelVideoSkip=function(){}; e.getAutoplayEndpoint=function(){}; e.getPlaylistData=function(){};var dN=function(a,b,c,d){bN.call(this,a);this.player_=b;this.autoplayData_=c;this.playlistManager_=d}; p(dN,bN);dN.prototype.getCacheKeyForEndpoint=function(a){return WM(a,!!this.autoplayData_)}; dN.prototype.getTempData=function(a,b){b=b.timeBeforeNextVideo;a={itct:a.clickTrackingParams,lact:Pk(),pbis:b,prefetch_reason:"hc_pbis",vis:this.player_.getVisibilityState()};this.autoplayData_&&(a.autonav=1,N("kevlar_watch_navigation_clear_autoplay_count_session_data")||(b=this.autoplayData_.webAutoplayRendererData&&this.autoplayData_.webAutoplayRendererData.autoplayCount,N("decorate_autoplay_renderer")?a.playnext=VM().count:b&&(a.playnext=b)));return a}; dN.prototype.getXhrParams=function(a){return Object.assign({pbj:"prefetch"},a)}; dN.prototype.getParams=function(a){a={frags:a.fragmentsRequested.join(",")};N("kevlar_droppable_prefetchable_requests")&&(a.prefetch=1);return a};var eN=function(a,b,c){this.player=a;this.taskManager=b;this.prefetchDelay=c;this.completionResolver_=null;this.playerEvents_=[]}; eN.prototype.start=function(){var a=this;this.completionResolver_=Ui();Wi(this.completionResolver_.promise,function(){ETa(a);a.completionResolver_=null}); this.prepareTrigger(this.completionResolver_);return this.completionResolver_.promise}; var FTa=function(a,b,c){a.player.addEventListener(b,c);a.playerEvents_.push({eventName:b,callback:c})},ETa=function(a){a.playerEvents_.forEach(function(b){a.player.removeEventListener(b.eventName,b.callback)}); a.playerEvents_.length=0};var fN={watch:{pageFragments:["pl","wn"],prefetchedFragments:["pl"]}},GTa=["playerResponse"];N("kevlar_prefetch_no_swfconfig_killswitch")&&(GTa=["player","playerResponse"]);var HTa={};HTa.pl={requiredKeys:GTa,graftedKeys:["playerResponse"]};HTa.wn={requiredKeys:["response"],graftedKeys:["response"]};var ITa={};ITa.pl={requiredKeys:GTa,graftedKeys:[]};ITa.wn={requiredKeys:["response"],graftedKeys:[]};var JTa={fragmentsRequested:null,timeBeforeNextVideo:null};var gN=function(a){bN.call(this,a)}; p(gN,bN);gN.prototype.getParams=function(){return{}}; gN.prototype.getXhrParams=function(a){return a}; gN.prototype.getTempData=function(a){return{itct:a.clickTrackingParams,lact:Pk()}};var hN=function(){this.endpointCacheKey_=null;this.expireJobId_=0;(this.ENABLE_PBJ_PREFETCH_=N("web_enable_pbj_prefetch"))&&window.addEventListener("unload",this.onUnload_.bind(this))}; hN.prototype.resolve=function(){this.ENABLE_PBJ_PREFETCH_&&this.endpointCacheKey_&&this.end_()}; hN.prototype.end_=function(){this.endpointCacheKey_&&(this.endpointCacheKey_=null);this.expireJobId_&&(Fk.cancelJob(this.expireJobId_),this.expireJobId_=0)}; hN.prototype.getTriggerFromMouseEvent_=function(a){if(!a)return"";var b="";void 0!=a.button&&(b+="-btn"+a.button.toString());a.altKey&&(b+="-alt");a.ctrlKey&&(b+="-ctrl");a.metaKey&&(b+="-meta");a.shiftKey&&(b+="-shift");return b}; hN.prototype.onUnload_=function(){this.end_()}; Ma(hN);var iN=function(a,b,c){eN.call(this,a,b,c);this.cueId_="playbackTrigger-"+Math.random()}; p(iN,eN);iN.prototype.prepareTrigger=function(a){var b=this,c=this.player.getDuration();var d=0<=this.prefetchDelay?this.prefetchDelay:c+this.prefetchDelay;this.player.addCueRange(this.cueId_,d,c);Wi(a.promise,function(){b.player.removeCueRange(b.cueId_)}); FTa(this,"onCueRangeEnter",function(f){f==b.cueId_&&a.resolve(c-d)})}; iN.prototype.getTriggerName=function(){return"playbackTrigger"};var jN=function(a,b,c,d,f,h){var l=this;this.pageFragments_=a;this.prefetchedFragments_=b;this.fragmentConfiguration_=c;this.prefetchedData_=d;this.networkPrefetchRequest_=f;this.completionPromise=h;this.validatedFragments_=[];this.missingFragments_=this.pageFragments_.slice();this.mergedPrefetchedData_=null;KTa(this);this.networkPrefetchRequest_&&this.addPartCallback(function(m){Object.assign(l.prefetchedData_,m);KTa(l)})}; jN.prototype.addPartCallback=function(a){this.networkPrefetchRequest_.addPartCallback(a)}; var LTa=function(a){if(0==a.validatedFragments_.length)return null;if(!a.mergedPrefetchedData_){for(var b=[],c=k(a.validatedFragments_),d=c.next();!d.done;d=c.next()){d=k(a.fragmentConfiguration_[d.value].graftedKeys);for(var f=d.next();!f.done;f=d.next())(f=a.prefetchedData_[f.value].trackingParams)&&b.push(f)}a.mergedPrefetchedData_={};Object.assign(a.mergedPrefetchedData_,a.prefetchedData_,{clientSideGrafts:b})}return a.mergedPrefetchedData_}; jN.prototype.getValidFragments=function(){return this.validatedFragments_}; var KTa=function(a){a.prefetchedFragments_.forEach(function(b){MTa(a,b)})},MTa=function(a,b){a.fragmentConfiguration_[b].requiredKeys.every(function(c){return!!a.prefetchedData_[c]})&&(a.validatedFragments_.push(b),b=a.missingFragments_.indexOf(b),-1!==b&&a.missingFragments_.splice(b,1))};var NTa=function(){},kN=function(a){this.playlistManager_=a}; p(kN,NTa);kN.prototype.getPrefetchEndpoint=function(){return this.playlistManager_.getAutoplayEndpoint()}; kN.prototype.getProviderType=function(){return"playlist"}; var lN=function(a){this.autonavEndpoints_=a}; p(lN,NTa);lN.prototype.getPrefetchEndpoint=function(){return this.autonavEndpoints_.length?this.autonavEndpoints_[0]:void 0}; lN.prototype.getProviderType=function(){return"first_next"};var OTa=function(a,b,c,d){this.autonavEndpoints=a;this.foregroundTrigger=b;this.backgroundTrigger=c;this.pageType="watch";this.isInPlaylist=d},PTa=function(a,b){if(a.webPrefetchData&&a.webPrefetchData.navigationEndpoints&&a.webPrefetchData.navigationEndpoints.length){a=a.webPrefetchData.navigationEndpoints; var c=a[0];if(c&&c.watchEndpoint&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig&&c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig){var d=c.watchEndpoint.watchEndpointSupportedPrefetchConfig.prefetchHintConfig;c=d.countdownUiRelativeSecondsPrefetchCondition;d=d.playbackRelativeSecondsPrefetchCondition;d="number"===typeof d&&Math.abs(d)c?c:void 0;c="number"!==typeof c||b.inPlaylist?void 0:c;if("number"===typeof c)return new OTa(a, b.makeUpNextTrigger(c),b.makePlaybackTrigger(c),b.inPlaylist);if("number"===typeof d)return new OTa(a,b.makePlaybackTrigger(d),null,b.inPlaylist)}}};var mN=function(a,b,c,d){this.prefetchEndpointProvider_=a;this.prefetchRequestPromise_=this.triggerPromise_=null;this.storePrefetchedDataCallback_=b;this.prefetchJobConfig_=c;this.networkPrefetchRequest_=d;this.prefetchResponseCacheKey_=null}; mN.prototype.enqueue=function(){this.triggerPromise_||(QTa(this,RTa(this)),vi(document,"visibilitychange",this.onVisibilityChange_,!1,this))}; var QTa=function(a,b){a.triggerPromise_=b.start();a.triggerPromise_.then(function(c){var d=a.prefetchEndpointProvider_.getPrefetchEndpoint();d&&(a.prefetchRequestPromise_=a.networkPrefetchRequest_.getRequest(d,{fragmentsRequested:fN[a.prefetchJobConfig_.pageType].prefetchedFragments,timeBeforeNextVideo:c}),a.prefetchResponseCacheKey_=a.networkPrefetchRequest_.getCacheKeyForEndpoint(d),STa(a),a.prefetchRequestPromise_.then(function(f){a.storePrefetchedDataCallback_(a.prefetchResponseCacheKey_,f)}))})}; mN.prototype.resolve=function(){this.cancel()}; mN.prototype.cancel=function(){this.triggerPromise_&&this.triggerPromise_.cancel("Prefetch job cancelled, trigger promise cancelled.");this.prefetchRequestPromise_&&this.prefetchRequestPromise_.cancel("Prefetch job cancelled, request promise cancelled.");STa(this)}; mN.prototype.onVisibilityChange_=function(){var a=this;0==Vo()?this.triggerPromise_&&(Xi(this.triggerPromise_,function(){a.triggerPromise_=null}),this.triggerPromise_.cancel("Visibility changed to background, trigger promise cancelled.")):this.triggerPromise_||QTa(this,RTa(this))}; var STa=function(a){zi(document,"visibilitychange",a.onVisibilityChange_,!1,a)},RTa=function(a){return a.prefetchJobConfig_.backgroundTrigger?0==Vo()?a.prefetchJobConfig_.backgroundTrigger:a.prefetchJobConfig_.foregroundTrigger:a.prefetchJobConfig_.foregroundTrigger}; mN.prototype.doesEndpointKeyMatchRequestKey_=function(a){return a?a==this.prefetchResponseCacheKey_:!1};var nN=function(a,b,c){eN.call(this,a,b,c)}; p(nN,eN);nN.prototype.prepareTrigger=function(a){var b=this;FTa(this,"onAutonavCoundownStarted",function(c){TTa(b,c,a)})}; var TTa=function(a,b,c){var d=1E3*a.prefetchDelay;if(Math.abs(d)>b)c.promise.cancel("Not enough time to prefetch, cancelling prefetch job");else{var f=d,h=b-d;0>d&&(f=b+d,h=Math.abs(d));var l=a.taskManager.addJob(function(){c.resolve(h/1E3)},10,f); Xi(c.promise,function(){a.taskManager.cancelJob(l)})}}; nN.prototype.getTriggerName=function(){return"upNextTrigger"};var oN=function(){this.prefetchCache_=new Map;this.pendingPrefetchJob_=null},VTa=function(a,b,c,d,f,h){var l=Fk,m=wL.getInstance(); if(!N("block_all_player_prefetch_requests")){UTa(a);var n=!!c.getPlaylistId();if((n||2==m.getState())&&!c.getVideoData().isLive){m={inPlaylist:n,videoDuration:c.getDuration(),makeUpNextTrigger:function(v){return new nN(c,l,v)}, makePlaybackTrigger:function(v){return new iN(c,l,v)}}; var r=PTa(b,m);r&&(a.pendingPrefetchJob_=new mN(r.isInPlaylist?new kN(f):new lN(r.autonavEndpoints),function(v,z){z=new jN(fN[r.pageType].pageFragments,fN[r.pageType].prefetchedFragments,HTa,z);return LTa(z)?(a.prefetchCache_.set(v,z),!0):!1},r,new dN(d,c,h,f)),a.pendingPrefetchJob_.enqueue())}}},WTa=function(a,b,c){if(b.watchEndpoint)return a.prefetchCache_.get(WM(b,c))},UTa=function(a){a.pendingPrefetchJob_&&(a.pendingPrefetchJob_.cancel(),a.pendingPrefetchJob_=null)}; Ma(oN);var pN=sE(function(a){var b=ng("DIV");a&&(b.className=a);b.style.cssText="overflow:auto;position:absolute;top:0;width:100px;height:100px";a=ng("DIV");Ah(a,"200px","200px");b.appendChild(a);document.body.appendChild(b);a=b.offsetWidth-b.clientWidth;sg(b);return a});function XTa(a,b,c){c=void 0===c?!1:c;var d=Math.max(a.width,474);if(N("kevlar_watch_feed_big_thumbs")&&a.width>=1550-pN()&&800<=a.height)d=!qN(b)||1550<=a.width?d-432:d-382,qN(b)&&(d-=pN());else if(1E3<=a.width){var f=474;1140>=a.width&&qN(b)?f=357:N("kevlar_watch_feed_big_thumbs")&&(f=382);d-=f;qN(b)&&(d-=pN())}else d-=48;d=Math.min(d,1280);var h=d*b;f=240;c&&(f=380);if(!(.5624>b)){var l=1327;N("kevlar_watch_split_pane")&&(l+=pN());630>a.height&&657<=a.width||630<=a.height&&1E3<=a.width&&a.width< l?f=360:630<=a.height&&a.width>=l&&(f=480)}h=Math.min(h,a.height-216);h=Math.max(h,f);1>b?d=h/b:1E3<=a.width&&(d=XTa(a,.5625,c).width);return new Xf(Math.round(d),Math.round(h))} function qN(a){return N("kevlar_watch_split_pane")&&!(.5624>a)} ;var YTa=[{query:window.matchMedia("(max-width: 656px)"),size:new Xf(426,240)},{query:window.matchMedia("(max-width: 856px)"),size:new Xf(640,360)},{query:window.matchMedia("(max-width: 999px)"),size:new Xf(854,480)},{query:window.matchMedia("(min-width: 1720px) and (min-height: 980px)"),size:new Xf(1280,720)},{query:window.matchMedia("(min-width: 1294px) and (min-height: 630px)"),size:new Xf(854,480)},{query:window.matchMedia("(min-width: 1000px)"),size:new Xf(640,360)}];function ZTa(a){var b=new mE(A("ONE_PICK_URL",""));b.urlParamMap_.set("hostId",a);(a=A("GAPI_LOCALE"))&&b.setLocale(a);(a=A("SESSION_INDEX"))&&b.setAuthUser(a);(a=A("DELEGATED_SESSION_ID"))&&b.urlParamMap_.set("groupId",a);return b} ;function $Ta(){var a=fL("yt-network-manager");return new YRa(a)} var aUa=function(a){var b=this;var c=void 0===c?$Ta():c;var d=void 0===d?fL("yt-navigation-manager"):d;this.onePickCommand=a;this.playlistNetworkManager=c;this.navigationManager=d;this.videoPickerBuilder=ZTa("yt-addtoplaylist");ZBa(this.videoPickerBuilder.setTitle(a.modalTitle).setSize(1E3).addView(new iD().setSite("youtube.com")).addView(new hD().setType("video").setSite("youtube.com")),"multiselectEnabled").addView("youtube").setSecretToken(a.onePickToken).setSelectButtonLabel(a.selectButtonLabel).setDisposeOnHide().setCallback(function(f){b.handleAction(f)})}; aUa.prototype.show=function(){this.videoPickerBuilder.build().setVisible(!0)}; aUa.prototype.handleAction=function(a){var b=this;if(a&&this.onePickCommand.listId&&"picked"===a.action&&a.docs){var c=[];a.docs.forEach(function(d){c.push({addedVideoId:d.id,action:"ACTION_ADD_VIDEO"})}); this.playlistNetworkManager.updatePlaylist(this.onePickCommand.listId,c).then(function(){b.navigationManager.reload()})}};var rN=function(){}; rN.prototype.enqueue=function(){if(this.isCounterfactual()){var a=this.getCounterfactualData();a&&oL.getInstance().triggerOptionalAction("yt-service-request",{},a[0])}else this.doEnqueue()};var sN=function(a,b){this.renderer_=a;this.page_=b;this.resolver_=Ui()}; p(sN,rN);sN.prototype.cancel=function(){this.resolver_.promise.cancel()}; sN.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints}; sN.prototype.isCounterfactual=function(){return!this.renderer_.isVisible}; sN.prototype.doEnqueue=function(){var a=this;this.resolver_.promise.then(function(){var c={popup:{mealbarPromoRenderer:a.renderer_},popupType:"MEALBAR"};oL.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:c},{})}); switch(this.renderer_.triggerCondition){case"TRIGGER_CONDITION_POST_AD":if(this.page_){var b=LM(this.page_);b&&bUa(this.resolver_,b)}break;default:this.resolver_.resolve();}}; var bUa=function(a,b){var c=Ui();b.getPlayerPromise().then(function(d){c.resolve(d)}); c.promise.then(function(d){d.addEventListener("onAdEnd",a.resolve);Wi(a.promise,function(){d.removeEventListener("onAdEnd",a.resolve)})}); Xi(a.promise,function(){c.promise.cancel()})};var tN=function(){}; tN.prototype.markDirty=function(){}; tN.prototype.isNodeVisible=function(){}; tN.prototype.reset=function(){};var cUa=["browse-video-menu-button","unified-verified-badge"],uN=function(a){this.actionRouter_=a=void 0===a?oL.getInstance():a;this.targetMap_=new Map;this.visibilityMonitor_=null;this.triggeredTargets_=new Set},dUa=function(a){var b=uN.getInstance(); b.visibilityMonitor_=a;vi(b.visibilityMonitor_,"yt-visibility-monitor-refreshed",b.handleVisibilityRefreshed_,!1,b)}; uN.prototype.dispose=function(){this.visibilityMonitor_&&zi(this.visibilityMonitor_,"yt-visibility-monitor-refreshed",this.handleVisibilityRefreshed_,!1,this)}; uN.prototype.handleVisibilityRefreshed_=function(){var a=this;this.targetMap_.forEach(function(b,c){eUa(a,c,b)})}; var gUa=function(a,b){var c=uN.getInstance(),d=fUa(c,a);d.element=b;eUa(c,a,d)},eUa=function(a,b,c){var d=c.action; (c=c.element)&&d&&(cUa.includes(b)||a.visibilityMonitor_&&a.visibilityMonitor_.isNodeVisible(c)||"WEB_REMIX"===A("INNERTUBE_CLIENT_NAME"))&&(pL(a.actionRouter_,[d],c),a.targetMap_.delete(b),a.triggeredTargets_.add(b))},fUa=function(a,b){a.targetMap_.get(b)||a.targetMap_.set(b,{}); return a.targetMap_.get(b)}; Ma(uN);var vN=function(a,b){this.renderer_=a;this.page_=b}; p(vN,rN);vN.prototype.getCounterfactualData=function(){return this.renderer_.impressionEndpoints}; vN.prototype.isCounterfactual=function(){return!this.renderer_.isVisible}; vN.prototype.doEnqueue=function(){var a={popup:{upsellDialogRenderer:this.renderer_},popupType:"MODAL"};oL.getInstance().triggerOptionalAction("yt-open-popup-action",{openPopupAction:a},{});this.page_&&(a=LM(this.page_))&&a.stop()};var wN={},hUa=(wN.TOOLTIP_POSITION_TYPE_BELOW="OPEN_POPUP_POSITION_BOTTOM",wN.TOOLTIP_POSITION_TYPE_START="OPEN_POPUP_POSITION_LEFT",wN.TOOLTIP_POSITION_TYPE_END="OPEN_POPUP_POSITION_RIGHT",wN.TOOLTIP_POSITION_TYPE_BELOW_START="OPEN_POPUP_POSITION_BOTTOMLEFT",wN.TOOLTIP_POSITION_TYPE_BELOW_END="OPEN_POPUP_POSITION_BOTTOMRIGHT",wN.TOOLTIP_POSITION_TYPE_ABOVE_START="OPEN_POPUP_POSITION_TOPLEFT",wN.TOOLTIP_POSITION_TYPE_ABOVE_END="OPEN_POPUP_POSITION_TOPRIGHT",wN),xN=function(a,b){this.renderer_=a;this.promotionsTargetManager_= b}; p(xN,rN);xN.prototype.getCounterfactualData=function(){if(this.isCounterfactual())return this.renderer_.promoConfig.impressionEndpoints}; xN.prototype.isCounterfactual=function(){return!(!this.renderer_.promoConfig||!this.renderer_.promoConfig.isCounterfactual)}; xN.prototype.doEnqueue=function(){if(this.renderer_.targetId){var a;this.renderer_.suggestedPosition&&this.renderer_.suggestedPosition.type&&(a=hUa[this.renderer_.suggestedPosition.type]);a||(a="OPEN_POPUP_POSITION_BOTTOM");a={openPopupAction:{popup:{tooltipRenderer:this.renderer_},popupType:"HINT",position:a}};var b=this.promotionsTargetManager_,c=this.renderer_.targetId;if(!b.triggeredTargets_.has(c)){var d=fUa(b,c);d.action=a;eUa(b,c,d)}}};function iUa(a){if(a.playerResponse){if(a=a.playerResponse,a.messages&&0=Math.min(b,c)&&a<=d?a:c}; pUa.prototype.axis=function(a){a=this.direction(a);return"up"===a||"down"===a?"Y":"X"};function qUa(a){if(!a||0===a.size)return Hammer.DIRECTION_ALL;if(1===a.size){if(a.has("up"))return Hammer.DIRECTION_UP;if(a.has("down"))return Hammer.DIRECTION_DOWN;if(a.has("right"))return Hammer.DIRECTION_RIGHT;if(a.has("left"))return Hammer.DIRECTION_LEFT}return Hammer.DIRECTION_ALL} var rUa=function(){this.hammerFn=DHa();this.screenManager=zL();this.lastPinchTime=NaN;this.nodeManagerMapping=new Map;N("kevlar_touch_gesture_ves")&&this.screenManager&&(this.ve=On(83615),EL(this.screenManager,this.ve))},sUa,AN=function(){sUa||(sUa=new rUa); return sUa}; rUa.prototype.registerTouchEvents=function(a,b,c){for(var d=[],f=2;fDate.now()-a.lastPinchTime)return;"mouse"!==f.pointerType&&(f="doubletap"===d?{coordinates:f.center}:d.includes("pan")?{deltaY:f.deltaY,distance:f.distance,direction:f.direction,velocityY:f.velocityY}:d.includes("swipe")?{target:f.target}:{},b.dispatchEvent(new CustomEvent(d,{bubbles:!0,composed:!0,detail:f})))})}; rUa.prototype.unregisterTouchEvents=function(a,b){for(var c=[],d=1;dJ)v||(r?(m=zN(h.input,l)+h.config.startPosition,l=m+70,h.element.animate([{transform:"translateY("+m+"px)",opacity:""===h.element.style.opacity?1:h.element.style.opacity}, {transform:"translateY("+l+"px)",opacity:0}],{duration:400,easing:"cubic-bezier(.05, 0, 0, 1)"}),h.element.style.transform="translateY("+l+"px)",h.element.style.opacity="0"):(l=zN(h.input,l)+h.config.startPosition,m=m.endPosition,h.element.animate([{transform:"translateY("+l+"px)"},{transform:"translateY("+m+"px)"}],{duration:400,easing:"cubic-bezier(.05, 0, 0, 1)"}),h.element.style.transform="translateY("+m+"px)")),n&&n();h.reset()}}; a=Object.keys(c.triggers);this.directions=new Set(a)}; p(DN,BN);DN.prototype.reset=function(){this.element.style.transform="";this.element.style.opacity="";this.config.resetAction&&this.config.resetAction()}; var uUa=function(a,b){b=a.input.direction(b);return a.config.triggers[b]}; DN.prototype.move=function(a,b){var c=this;this.animationRequestId||(this.animationRequestId=requestAnimationFrame(function(){var d=c.input.axis(a),f=c.input.position(a,c.config.startPosition,b.endPosition);c.element.style.transform="translate"+d+"("+f+"px)";c.animationRequestId=void 0}))}; var vUa=function(a,b,c){c=Math.abs(a.config.startPosition-c.endPosition);return Math.min(a.input.distance(b),c)/c}; DN.prototype.fade=function(a,b){var c=b.endOpacity;a=vUa(this,a,b);0=b+a?(wUa.set("last-user-engagement-exp-trigger-timestamp",Zk()),!0):!1} ;var yUa=function(a,b){this.playerProvider_=a;this.actionSenderElement_=b;this.pausePlaybackJob_=this.showBlockingWarningJob_=this.showWarningJob_=0;this.youThereData_=null;this.ignoreFullscreenExitUserActivity_=this.isUserPredictedAbsent_=!1;this.clientPlaybackNonce_=null;this.inYouThereFlow_=!1}; yUa.prototype.reset=function(){zUa(this);this.isUserPredictedAbsent_=!1}; var zUa=function(a,b){!a.youThereData_||a.showWarningJob_||void 0!==b&&b||(LJ("YOU_THERE_EVENT_TYPE_NAVIGATED_OUT",Tn(),a.youThereData_,a.clientPlaybackNonce_),gl());Fk.cancelJob(a.showWarningJob_);a.showWarningJob_=0;Fk.cancelJob(a.showBlockingWarningJob_);a.showBlockingWarningJob_=0;Fk.cancelJob(a.pausePlaybackJob_);a.pausePlaybackJob_=0;a.youThereData_=null;a.clientPlaybackNonce_=null;a.inYouThereFlow_=!1},BUa=function(a,b){var c,d,f; Aa(function(h){if(1==h.nextAddress)return a.reset(),q(h,a.playerProvider_().getPlayerPromise(),2);c=h.yieldResult;a.clientPlaybackNonce_=c.getVideoData().cpn;a.youThereData_=b.configData.youThereData;if(!a.youThereData_)return h.return();if(a.youThereData_.triggerReason&&"YOU_THERE_TRIGGER_REASON_3"==a.youThereData_.triggerReason&&!xUa())return LJ("YOU_THERE_EVENT_TYPE_RATE_LIMITED",Tn(),a.youThereData_,a.clientPlaybackNonce_),h.return();d=a.youThereData_.promptDelaySec;f=c.getCurrentTime();a.showWarningJob_= Ck(Fk,function(){return Aa(function(l){a.showWarningJob_=0;return q(l,AUa(a),0)})},1E3*Math.max(d-f,0)); ra(h)})},AUa=function(a){var b,c,d,f,h,l; return Aa(function(m){if(1==m.nextAddress)return q(m,a.playerProvider_().getPlayerPromise(),2);if(3!=m.nextAddress)return b=m.yieldResult,c=b.getCurrentTime(),q(m,CUa(a),3);d=m.yieldResult;if(!d||!a.youThereData_)return m.return();if(N("check_user_lact_at_prompt_shown_time_on_web")&&(f=parseInt(a.youThereData_.lactThresholdMs,10),Pk()=a.youThereData_.playbackPauseDelayMs)return DUa(a), m.return();!N("external_fullscreen")&&(h=qJ())&&(a.ignoreFullscreenExitUserActivity_=!0,Ck(Fk,function(){a.ignoreFullscreenExitUserActivity_=!1},2E3),KLa(h)); a.youThereData_.showToastWarningPrompt&&(FN(a,a.youThereData_.showWarningActions),a.inYouThereFlow_=!0,LJ("YOU_THERE_EVENT_TYPE_PROMPT_SHOWN",Tn(),a.youThereData_,a.clientPlaybackNonce_,c),LJ("YOU_THERE_EVENT_TYPE_WARNING_PROMPT_SHOWN",Tn(),a.youThereData_,a.clientPlaybackNonce_,c));l=0;a.youThereData_.blockingPromptDelayMs&&(l=a.youThereData_.blockingPromptDelayMs);a.showBlockingWarningJob_=Ck(Fk,function(){return Aa(function(n){a.showBlockingWarningJob_=0;return q(n,EUa(a),0)})},l); ra(m)})},EUa=function(a){var b,c; return Aa(function(d){if(1==d.nextAddress)return q(d,CUa(a),2);b=d.yieldResult;if(!a.youThereData_)return d.return();b&&(a.youThereData_.showBlockingWarningAction&&(N("web_handle_meta_commands")||!a.youThereData_.showBlockingWarningAction.commandExecutorCommand?FN(a,[a.youThereData_.showBlockingWarningAction]):FN(a,a.youThereData_.showBlockingWarningAction.commandExecutorCommand.commands),a.inYouThereFlow_=!0,LJ("YOU_THERE_EVENT_TYPE_WARNING_PROMPT_SHOWN_IN_DIALOG",Tn(),a.youThereData_,a.clientPlaybackNonce_)), c=a.youThereData_.playbackPauseDelayMs,a.pausePlaybackJob_=Ck(Fk,function(){return Aa(function(f){a.pausePlaybackJob_=0;return q(f,DUa(a),0)})},c)); ra(d)})},DUa=function(a){var b; return Aa(function(c){if(1==c.nextAddress)return q(c,CUa(a),2);b=c.yieldResult;if(!a.youThereData_)return c.return();b&&(LJ("YOU_THERE_EVENT_TYPE_PLAYBACK_PAUSED",Tn(),a.youThereData_,a.clientPlaybackNonce_),FN(a,a.youThereData_.showPausedActions),a.inYouThereFlow_=!0);ra(c)})},CUa=function(a){var b,c; return Aa(function(d){if(1==d.nextAddress)return q(d,a.playerProvider_().getPlayerPromise(),2);b=d.yieldResult;c=b.getPlayerState();return d.return(-1==c||1==c||3==c)})},FUa=function(a,b){var c; Aa(function(d){if(1==d.nextAddress){if(a.isUserPredictedAbsent_==b)return d.jumpTo(0);a.isUserPredictedAbsent_=b;return q(d,a.playerProvider_().getPlayerPromise(),3)}c=d.yieldResult;c.setUserEngagement(b);b&&LJ("YOU_THERE_EVENT_TYPE_ABR_TRIGGERED",Tn(),a.youThereData_,a.clientPlaybackNonce_);ra(d)})},FN=function(a,b){if(N("handle_service_request_actions")||N("kevlar_youthere_service_endpoint_actions_killswitch"))tL(a.actionSenderElement_,b,a.actionSenderElement_);else {b=k(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.commandMetadata&&c.commandMetadata.webCommandMetadata&&c.commandMetadata.webCommandMetadata.sendPost?uL(a.actionSenderElement_,[c]):tL(a.actionSenderElement_,[c],a.actionSenderElement_)}};var GN=function(a,b,c){c=void 0===c?Fk:c;this.priority_=a;this.signal_=b;this.parkedJobs_=null;this.nextJobDescriptor_=0;this.scheduledJobs_=Object.create(null);this.signals_=Zn.getInstance();this.scheduler_=c},HN=function(a,b){if(b)if(a.signal_&&!ao(a.signals_,a.signal_)){var c=a.parkedJobs_; c||(c=a.parkedJobs_=[],a.signals_.addListener(a.signal_,a.processSignal_.bind(a)));c.push(b)}else GUa(a,b)},HUa=function(a,b){if(b!=a.priority_){a.priority_=b; for(var c in a.scheduledJobs_){var d=a.scheduledJobs_[c];a.scheduler_.cancelJob(d.jobId);d.jobId=a.scheduler_.addJob(d.jobWrapper,b)}}}; GN.prototype.cancel=function(){for(var a in this.scheduledJobs_)this.scheduler_.cancelJob(this.scheduledJobs_[a].jobId),delete this.scheduledJobs_[a];this.parkedJobs_&&(this.parkedJobs_.length=0)}; GN.prototype.processSignal_=function(){if(this.parkedJobs_){for(var a=0,b;b=this.parkedJobs_[a++];)GUa(this,b);this.parkedJobs_.length=0}}; var GUa=function(a,b){if(10==a.priority_)Hk(b);else{var c=a.nextJobDescriptor_++,d=function(){b();delete a.scheduledJobs_[c]},f=a.scheduler_.addJob(d,a.priority_); a.scheduledJobs_[c]={jobWrapper:d,jobId:f}}};var IUa=[],JUa=["ytd-section-list-renderer","yt-horizontal-list-renderer","ytd-item-section-renderer","ytd-watch-next-secondary-results-renderer","ytd-video-primary-info-renderer"],LUa=function(a,b){this.usableComponents_=new Map;this.experimentMode_=jk("polymer_task_manager_status");"disabled"!=this.experimentMode_&&KUa(this,a||IUa,b||JUa)},KUa=function(a,b,c){var d=kk("polymer_task_manager_blacklisted_components")||[],f="experimental"==a.experimentMode_,h="production"==a.experimentMode_,l="counterfactual"== a.experimentMode_; f&&b.forEach(function(m){a.usableComponents_.set(m,!0)}); (h||f||l)&&c.forEach(function(m){a.usableComponents_.set(m,!0)}); d.forEach(function(m){a.usableComponents_.set(m,!1)})}; Ma(LUa);var IN=null;function JN(a,b){var c={};c.key=a;c.value=b;return MUa().then(function(d){return new Promise(function(f,h){try{var l=d.transaction("swpushnotificationsstore","readwrite").objectStore("swpushnotificationsstore").put(c);l.onsuccess=function(){f()}; l.onerror=function(){h()}}catch(m){h(m)}})})} function KN(a){var b=new Ul("Error accessing DB");return MUa().then(function(c){return new Promise(function(d,f){try{var h=c.transaction("swpushnotificationsstore").objectStore("swpushnotificationsstore").get(a);h.onsuccess=function(){var l=h.result;d(l?l.value:null)}; h.onerror=function(){b.params={key:a,source:"onerror"};f(b)}}catch(l){b.params={key:a, thrownError:String(l)},f(b)}})},function(){return null})} function MUa(){return IN?Promise.resolve(IN):new Promise(function(a,b){var c=self.indexedDB.open("swpushnotificationsdb");c.onerror=b;c.onsuccess=function(){var d=c.result;if(d.objectStoreNames.contains("swpushnotificationsstore"))IN=d,a(IN);else return self.indexedDB.deleteDatabase("swpushnotificationsdb"),MUa()}; c.onupgradeneeded=NUa})} function NUa(a){a=a.target.result;a.objectStoreNames.contains("swpushnotificationsstore")&&a.deleteObjectStore("swpushnotificationsstore");a.createObjectStore("swpushnotificationsstore",{keyPath:"key"})} ;var LN=window.performance&&window.performance.memory,OUa=!1,PUa={},MN={},NN={};function QUa(){Aa(function(a){if(1==a.nextAddress){if(OUa)return a.jumpTo(0);OUa=!0;if(!(Math.random()a||TUa()} function TUa(){var a;Aa(function(b){if(1==b.nextAddress)return q(b,UUa(),2);a=b.yieldResult;Bm("systemHealthCaptured",a);ra(b)})} function UUa(){var a,b,c,d;return Aa(function(f){switch(f.nextAddress){case 1:a={metric:{staticContext:MN,dynamicContext:{viewportHeightPixels:Math.max(document.documentElement?document.documentElement.clientHeight||0:0,window.innerHeight||0),viewportWidthPixels:Math.max(document.documentElement?document.documentElement.clientWidth||0:0,window.innerWidth||0)},webMetric:PUa,webApiSupport:NN}};if(b=Tn())a.csn=b;LN&&(a.metric.webMetric.currentHeapKbytes=Math.round(LN.usedJSHeapSize/1E3));window.matchMedia&&( a.metric.dynamicContext.hasHoverSupport=window.matchMedia("(any-hover: hover)").matches,a.metric.dynamicContext.hasFinePointer=window.matchMedia("(any-pointer: fine)").matches,a.metric.dynamicContext.hasCoarsePointer=window.matchMedia("(any-pointer: coarse)").matches);if(!("getBattery"in navigator&&"function"===typeof navigator.getBattery)){f.jumpTo(2);break}return q(f,navigator.getBattery(),3);case 3:c=f.yieldResult,a.metric.dynamicContext.chargingStatus=c.charging?"CHARGING_AC":"CHARGING_INACTIVE"; case 2:"onLine"in navigator&&(a.metric.dynamicContext.networkCoarseState=navigator.onLine?0:2);if(NN.storageEstimatePresent)return q(f,navigator.storage.estimate(),8);if(!NN.webkitTemporaryStoragePresent){f.jumpTo(5);break}return q(f,VUa(),7);case 7:d=f.yieldResult;f.jumpTo(5);break;case 8:d=f.yieldResult;case 5:return a.metric.dynamicContext.deviceStorageQuotaMbytes=d?String(10*Math.round(d.quota/1048576/10)):"-1",a.metric.dynamicContext.deviceStorageUsageMbytes=d?String(10*Math.round(d.usage/1048576/ 10)):"-1",f.return(a);}})} function VUa(){return new Promise(function(a){NN.webkitTemporaryStoragePresent?navigator.webkitTemporaryStorage.queryUsageAndQuota(function(b,c){a({usage:b,quota:c})}):a()})} ;var WUa=!1,ON=function(){},XUa=function(){var a=yo(void 0).vpl,b=yo(void 0).cpt; if(a&&b){var c=jg(document);Uo("vpst",c.y);Wo("ol",Math.max(a,b))}}; ON.prototype.reset=function(){WUa=!1}; var YUa=function(a){ON.getInstance();$o("cpt")&&vd(Error("Ticking CPT when CPT already ticked"));t.requestAnimationFrame(function(){t.setTimeout(function(){Wo("cpt");XUa()})}); try{a()}catch(b){ud(b)}t.requestAnimationFrame(function(){Wo("bcp")})}; Ma(ON);var ZUa=function(a,b){var c={};b&&(c.v=b);a={name:a,locale:void 0,feature:void 0};for(var d in c)a[d]=c[d];c=Id("/sharing_services",a);Xn(c)};var $Ua=!1,aVa=function(a){if(!$Ua&&(a=a||A("ZWIEBACK_PING_URLS"))&&a.length){$Ua=!0;for(var b=0;b>16,(a&65280)>>8,a&255])},QN=function(a){a=[(a&16711680)>>>16, (a&65280)>>>8,a&255,(a&4278190080)>>>24];var b=kb(a,function(c){return c==(c&255)}); a[3]=(a[3]/255).toFixed(3);if(!b)throw Error("\"("+a.join(",")+"\") is not a valid RGBA color");return"rgba("+a.join(",")+")"};var RN=function(){if(this.constructor===RN)throw new TypeError("VisibilityObserver cannot be instantiated directly.")}; e=RN.prototype;e.dispose=function(){}; e.disconnect=function(){}; e.reconnect=function(){}; e.observe=function(){}; e.unobserveAll=function(){}; e.unobserveByKey=function(){};var bVa=function(a,b){b=void 0===b?0:b;RN.call(this);this.viewroot_=a;this.defaultPrescanHeight_=b;this.observer_=new IntersectionObserver(this.handleObserveEvent_.bind(this),a?{root:a,rootMargin:"-0.1px"}:{rootMargin:"-0.1px"});this.prescanObservers_=new Map;this.handlers_=new Map;this.isConnected_=!0}; p(bVa,RN);e=bVa.prototype;e.dispose=function(){this.isConnected_=!1;this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect();this.handlers_.clear()}; e.disconnect=function(){this.isConnected_=!1;this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect()}; e.reconnect=function(){if(!this.isConnected_){this.isConnected_=!0;for(var a=k(this.handlers_),b=a.next();!b.done;b=a.next()){var c=k(b.value);b=c.next().value;var d=c.next().value;c=!1;d=k(d.keys());for(var f=d.next();!f.done;f=d.next())if("prescan"==f.value.state){c=!0;break}c&&cVa(this,b).observe(b);this.observer_.observe(b)}}}; e.unobserveAll=function(){this.observer_.disconnect();for(var a=k(this.prescanObservers_.values()),b=a.next();!b.done;b=a.next())b.value.disconnect();this.handlers_.clear()}; e.handleObserveEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d){var f=c.isIntersecting;d=k(d);for(var h=d.next();!h.done;h=d.next()){var l=k(h.value);h=l.next().value;l=l.next().value;if("visible"==h.state&&f||"hidden"==h.state&&!f)l(c.target,h.state),h.calledOnce&&b.unobserveByKey({element:c.target,option:h})}}})}; e.handlePrescanEvent_=function(a){var b=this;a.forEach(function(c){var d=b.handlers_.get(c.target);if(d&&c.isIntersecting){d=k(d);for(var f=d.next();!f.done;f=d.next()){var h=k(f.value);f=h.next().value;h=h.next().value;"prescan"==f.state&&(h(c.target,f.state),f.calledOnce&&b.unobserveByKey({element:c.target,option:f}))}}})}; e.observe=function(a,b,c){var d=(d=this.handlers_.get(a))&&d.has(c)?{element:a,option:c}:void 0;if(d)return d;d={element:a,option:c};this.handlers_.has(a)||this.handlers_.set(a,new Map);var f=this.handlers_.get(a);f.has(c)||f.set(c,b);"prescan"==c.state&&cVa(this,a).observe(a);this.observer_.observe(a);return d}; e.unobserveByKey=function(a){var b=this.handlers_.get(a.element);if(b&&b.has(a.option)){b.delete(a.option);if("prescan"==a.option)for(var c=k(this.prescanObservers_.values()),d=c.next();!d.done;d=c.next())d.value.unobserve(a.element);0==b.size&&(this.handlers_.delete(a.element),this.observer_.unobserve(a.element))}}; var cVa=function(a,b){var c=a.defaultPrescanHeight_;b.hasAttribute("prescan-height")&&(b=parseInt(b.getAttribute("prescan-height"),10),isNaN(b)||(c=b));if(a.prescanObservers_.has(c))return a.prescanObservers_.get(c);b="-0.1px -0.1px "+c+"px -0.1px";b=new IntersectionObserver(a.handlePrescanEvent_.bind(a),a.viewroot_?{root:a.viewroot_,rootMargin:b}:{rootMargin:b});a.prescanObservers_.set(c,b);return b};function dVa(a){if(window.IntersectionObserver)return new bVa(a,400);throw new TypeError("Non-IntersectionObserver version of VisibilityObserver is not yet implemented")} ;function SN(a,b,c,d){b=void 0===b?{}:b;c=void 0===c?"":c;d=void 0===d?window:d;zc(d.location,Id(a,b)+c)} function eVa(a,b,c){b=void 0===b?{}:b;c=void 0===c?!1:c;var d=A("EVENT_ID");d&&(b.ei||(b.ei=d));b&&cJ(a,b);if(c)return!1;(window.ytspf||{}).enabled?spf.navigate(a):SN(a);return!0} ;var fVa;var gVa=["server_prefetched_vast","vmap"],hVa=function(a){if("1"!=y.get(A("PLAYER_VARS",{}),"privembed",!1)){a&&Dha();try{iLa().then(function(){},function(){}),wk(hVa,18E5)}catch(b){ud(b)}}},iVa=function(a){if(null!=a){var b=[]; gVa.forEach(function(c){c in a&&(delete a[c],b.push(c))}); a.cached_load="1"}};var TN=function(){this.playerResolver_=Ui();this.playerPromise_=this.playerResolver_.promise;this.playerVars_=null;this.playbackEndedCallback_=La;this.playbackDurationSeconds_=0},jVa=function(a){var b=function(){return window.YT&&"function"===typeof window.YT.ready}; if(b())return Qi(window.YT);var c=Ui(),d=ng("SCRIPT");d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(d.onload=La,d.onreadystatechange=La,d.onerror=La,b()?c.resolve(window.YT):c.reject(new Ul("Failed to load the iframe player library","script.onload",d.readyState,typeof window.YT,window.YT?typeof window.YT.ready:"YT.ready() missing",window.yt?typeof window.yt.ready:"yt.ready() missing")))}; d.onerror=function(f){d.onload=La;d.onreadystatechange=La;d.onerror=La;c.reject(new Ul("Failed to load the iframe player library","script.onerror",f&&f.target&&f.target.src))}; yc(d,Mb(Eb("https://www.youtube.com/iframe_api")));a.insertBefore(d,a.firstChild);return c.promise},kVa=function(a,b,c){var d,f; Aa(function(h){switch(h.nextAddress){case 1:return a.playbackEndedCallback_=c,ta(h,2),q(h,jVa(xg(b)),4);case 4:d=h.yieldResult;ua(h,3);break;case 2:return f=va(h),f instanceof Ul&&f.args&&"script.onerror"==f.args[0]?Am(f):Zm(f),h.return();case 3:d.ready(function(){return new d.Player(b,{playerVars:{controls:0,enablejsapi:1,iv_load_policy:3,modestbranding:1,mute:1,rel:0,showinfo:0},events:{onReady:a.onPlayerReady_.bind(a),onStateChange:a.onPlayerStateChange_.bind(a),onCueRangeExit:a.onCueRangeExit_.bind(a)}})}), ra(h);}})}; e=TN.prototype;e.getPlayerPromise=function(){return this.playerPromise_}; e.onPlayerReady_=function(a){this.playerResolver_.resolve(a.target)}; e.onPlayerStateChange_=function(a){if(a.data==YT.PlayerState.PLAYING){a=a.target;var b=a.getCurrentTime();a.addCueRange("playback",b,b+this.playbackDurationSeconds_)}}; e.onCueRangeExit_=function(a){"playback"==a.data&&(a.target.stopVideo(),this.playbackEndedCallback_())}; e.stopVideo=function(){this.playerPromise_.then(function(a){a.stopVideo()})}; e.playVideo=function(){var a=this;this.playerVars_&&this.playerPromise_.then(function(b){"function"!=typeof b.loadVideoByPlayerVars?Zm(new Ul("vmh: player API not ready","loadVideoByPlayerVars",typeof b.loadVideoByPlayerVars)):b.loadVideoByPlayerVars(a.playerVars_)})}; var lVa=function(a,b,c,d,f){b&&(void 0===c&&(c=0),void 0===d&&(d=0),a.playbackDurationSeconds_=d/1E3,a.playerVars_={adformat:"1_8",autoplay:"1",videoId:b,suggestedQuality:"hd720",startSeconds:c/1E3,player_params:f},a.playerPromise_.then(function(h){"function"!=typeof h.cueVideoByPlayerVars?Am(new Ul("vmh: player API not ready","cueVideoByPlayerVars",typeof h.cueVideoByPlayerVars)):h.cueVideoByPlayerVars(a.playerVars_)}))}; TN.prototype.mute=function(){this.playerPromise_.then(function(a){a.mute()})}; TN.prototype.unMute=function(){this.playerPromise_.then(function(a){a.unMute()})}; function mVa(a){if(a.urlEndpoint){if(a=nl(a.urlEndpoint.url),a.adurl)return Cc(a.adurl)}else if(a.watchEndpoint)return"//www.youtube.com/watch?v="+a.watchEndpoint.videoId;return null} function nVa(a){if(!a||!a.reportingPings)return null;var b={};a.reportingPings.forEach(function(c){c.pingType in b?b[c.pingType].push(c.url):b[c.pingType]=[c.url]}); return{adpings:ll(b)}} ;var oVa={FONT_FAMILY_YTSANS_MEDIUM:"YT Sans:300,500,700"},pVa=function(){this.deferedLoadFont_=new GN(3,"eocs")}; pVa.prototype.addFont_=function(a){var b=ng("LINK");b.type="text/css";b.setAttribute("name","www-webfont");for(var c=[],d=0;dUb(c,"50.0.0");b="OPERA"==b.browserName&&0>Ub(c,"42.0.0");if(d||b)return Promise.resolve()}return vVa().then(function(f){if(!f)return Promise.resolve();f=tVa().then(function(){return xVa({type:"notifications_check_registration",data:A("ID_TOKEN")})}); return"default"!=Notification.permission?f.catch(function(){}):f.then(function(){return CVa(a)}).then(function(h){if(h)return DVa(),EVa().then(function(){})}).catch(function(){})})} function CVa(a){return sd("SERVICE_WORKER_PROMPT_NOTIFICATIONS")||sd("LOGGED_IN")&&(void 0===a?0:a)?AVa().then(function(b){if(b)return!0;b=[FVa(),GVa()];sd("LOGGED_IN")||b.push(HVa());return Promise.all(b).then(function(c){return c.every(function(d){return d})})}):Promise.resolve(!1)} function HVa(){var a=ik("service_worker_push_logged_out_prompt_watches");return-1==a?Promise.resolve(!1):KN("WatchCount").then(function(b){return b>=a})} function EVa(){var a=arguments;N("service_worker_push_prompt_modal_enable")&&IVa();return Notification.requestPermission().then(function(b){JVa();var c=document.getElementById("ticker");c&&(c.className=c.classList.remove("show"));if("granted"==b)return tVa().then(function(){sVa(!1);UN();return Promise.resolve(!0)}); "denied"==b&&UN();return Promise.resolve(!1)}).catch(function(){JVa(); return Promise.reject.apply(Promise,ha(a))})} function DVa(){KN("PromptCount").then(function(a){return JN("PromptCount",a+1)}).then(function(){return JN("PromptTime",Xa())}).then(function(){var a=jk("service_worker_push_force_notification_prompt_tag"); if(a)return KN("PromptTags").then(function(b){var c=[];if(b)try{c=JSON.parse(b)}catch(d){return!1}c||(c=[]);c.push(a);return JN("PromptTags",JSON.stringify(c))})})} function FVa(){return-1==ik("service_worker_push_prompt_cap")?Promise.resolve(!0):KN("PromptCount").then(function(a){a||(a=0);return Promise.resolve(a(b||0))}):Promise.resolve(!0)} function KVa(){zVa||JVa()} function LVa(a){a.style.zIndex=2147483648;a.style.pointerEvents="auto";a.style.backgroundColor="rgba(0, 0, 0, 0.6)";a.style.width="100%";a.style.height="100vh";a.style.position="absolute";a.style.top="0";a.style.left="0";a.style.border="none"} function IVa(){var a=ag(document,"yt-push-prompt-modal-bg");zVa=N("service_worker_push_prompt_modal_ignore_click");a?LVa(a):(a=lg("div",{id:"yt-push-prompt-modal-bg"}),LVa(a),document.body.appendChild(a),uk(document,"click",KVa))} function JVa(){var a=ag(document,"yt-push-prompt-modal-bg");a&&sg(a)} ;function MVa(a){return yVa(a)?BVa():Promise.resolve()} ;function NVa(){-1!=ik("service_worker_push_logged_out_prompt_watches")&&KN("WatchCount").then(function(a){100<=a||JN("WatchCount",a+1)})} ;var QVa=function(){sd("SERVICE_WORKER_KILLSWITCH")||navigator.serviceWorker&&navigator.serviceWorker.getRegistrations&&"https:"==window.location.protocol&&(N("service_worker_enabled")?OVa():PVa())},PVa=function(){navigator.serviceWorker.getRegistrations().then(function(a){a.forEach(RVa)})},OVa=function(){if(N("kevlar_enable_slis")){var a=new jka; a.recordStart(eo())}try{var b=SVa("/sw.js").catch(function(){N("kevlar_enable_slis")&&a.recordEnd("FAILURE");return new Promise(function(){})}); N("service_worker_push_enabled")&&(N("kevlar_enable_slis")?b.then(function(c){a.recordEnd("SUCCESS");return c}).then(TVa).then(MVa):b.then(TVa).then(MVa))}catch(c){if(N("kevlar_enable_slis")&&a.recordEnd("FAILURE"),"SecurityError"!=c.name)throw c; }},TVa=function(a){var b=a.installing||a.waiting; return a.active||!b?Promise.resolve(a):new Promise(function(c){var d=function(f){if("activated"==f.target.state||"redundant"==f.target.state)b.removeEventListener("statechange",d),c(a)}; b.addEventListener("statechange",d)})},RVa=function(a){a&&SVa("/sw.js?0",a.scope)},SVa=function(a,b){return navigator.serviceWorker.register(a,{scope:b||jk("service_worker_scope")||"/"})};function UVa(a){var b=["h","m","s"],c=rb(b);c.reverse();var d={};a=a.toLowerCase().match(/\d+\s*[hms]?/g)||[];a=fb(a,function(l){var m=(l.match(/[hms]/)||[""])[0];return m?(d[m]=parseInt(l.match(/\d+/)[0],10),!1):!0}); for(a.reverse();a.length&&c.length;){var f=c.shift();f in d||(d[f]=parseInt(a.shift(),10))}if(a.length||59=d?b:1<=d?c:LH(a.cubicBezier_,d)*(c-b)+b};var bWa=function(a,b){this.component_=a;this.numItemPerLine_=0;this.isMultipleLine_=b;this.currentAnimateState_="steady-state";this.deferredAnimation_=new GN(2,"eocs");this.isAnimating_=!1;this.animationStartTime_=0;this.posterAnimationPath_=new WeakMap;this.hoveringIndex_=-1}; bWa.prototype.resetSteadyState=function(a){this.deferredAnimation_&&this.deferredAnimation_.cancel();cWa(this,a,"steady-state")}; var gWa=function(a,b,c,d){for(var f=0;fb;HN(this.deferredAnimation_,this.animateFrame_.bind(this,a))}else for("after-hover"==this.currentAnimateState_&&cWa(this,a,"steady-state"),b=0;ba-this.lastHandledScroll_||(this.lastHandledScroll_=a,this.markDirty())}, markDirty:function(){N("kevlar_use_vimio_behavior")||UWa(this);N("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver()}, getScreenLayer:function(){if(this.screenLayer)return this.screenLayer;var a=this.getParentRenderer_();if(a)return a.getScreenLayer()}, invalidate:function(a){this.markDirty();this.wasPrescan=this.wasVisible=!1;a&&(this.dirtyTree=!0)}, getNodes:function(){return this.childCache_?[].concat(ha(this.childCache_)):[]}, impressionLog:function(){if(this.data&&this.data.impressionEndpoints)for(var a=0;a\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===VWa){var d=document.createElement("template");d.innerHTML=""; VWa=d}d=VWa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);XWa=a}a=XWa;return a}}}); var qO=YWa;w([P(X.YtRendererBehavior),x("design:type",Object)],qO.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],qO.prototype,"data",void 0);qO=w([fO({is:"yt-live-chat-message-buy-flow-heading-renderer"})],qO);var ZWa={};ZWa.YtPlaintextBehavior=[Polymer.IronA11yKeysBehavior,{properties:{plaintextOnly:{type:Boolean,value:!1}},detached:function(){this.plaintextOnly&&(this.removeEventListener("paste",this.onPaste_),this.removeOwnKeyBindings())}, ready:function(){this.plaintextOnly&&(this.addEventListener("paste",this.onPaste_),this.addOwnKeyBinding("ctrl+b meta+b ctrl+i meta+i","preventRichTextFormatting_"))}, onPaste_:function(a){a.preventDefault();a=a.clipboardData.getData("text/plain");document.execCommand("insertText",!1,a)}, preventRichTextFormatting_:function(a){Ie&&(a=a.detail.keyboardEvent,a.stopImmediatePropagation(),a.preventDefault())}}];var $Wa=document.createElement("template");$Wa.innerHTML=""; document.head.appendChild($Wa.content);var aXa=document.createElement("template");aXa.innerHTML=""; document.head.appendChild(aXa.content);var bXa=document.createElement("template");bXa.innerHTML=""; document.head.appendChild(bXa.content);var rO=0,sO=new WeakMap,tO=0,uO=new Set;function vO(a,b,c,d){if(a=wO(a,b,c,void 0===d?"width":d))return ac(a)} function wO(a,b,c,d){d=void 0===d?"width":d;if(!a||!a.length)return null;if(N("kevlar_tuner_should_always_use_device_pixel_ratio")){var f=window.devicePixelRatio;N("kevlar_tuner_should_clamp_device_pixel_ratio")?f=Math.min(f,ik("kevlar_tuner_clamp_device_pixel_ratio")):N("kevlar_tuner_should_use_thumbnail_factor")&&(f=ik("kevlar_tuner_thumbnail_factor"));rO=f}else rO||(rO=window.devicePixelRatio);f=rO;N("kevlar_tuner_should_always_use_device_pixel_ratio")?b*=f:1=b)return a[c].url||null;for(b=f-1;0a.loadTime&&0";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0=== fXa){var d=document.createElement("template");d.innerHTML=""; fXa=d}d=fXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return gXa=a}, properties:{text:{type:Object,observer:"textChanged_"},noEndpoints:Boolean,noStyles:Boolean,splitLines:{type:Boolean,reflectToAttribute:!0},forceDefaultStyle:{type:Boolean,reflectToAttribute:!0},ellipsisTruncate:{type:Boolean,reflectToAttribute:!0,observer:"ellipsisTruncateChanged_"},ariaLabel:{type:String,reflectToAttribute:!0,computed:"computeAriaLabel_(text.accessibility.accessibilityData.label)"},hasLinkOnly_:{type:String,reflectToAttribute:!0,computed:"computeHasLinkOnly_(text.runs)"},emojiSize:{type:Number, value:N("render_unicode_emojis_as_small_images")?16:24},target:{type:String},enableContentEditable:{type:Boolean,observer:"enableContentEditableChanged_"},overrideAriaLabel:{type:String,observer:"overrideAriaLabelChanged_"},respectHtmlDir:Boolean,stringRunExtensions:{type:Array,value:function(){return[]}}, useMixedDirectionFormattedStrings:{type:Boolean,computed:"computeUseMixedDirectionFormattedStrings_(plaintextOnly)",value:function(){return N("enable_mixed_direction_formatted_strings")}}}, behaviors:[ZWa.YtPlaintextBehavior,W.YtActionSenderBehavior,kO.YtComponentBehavior,X.YtRendererBehavior],created:function(){this.hasSetTitle_=this.hasChange_=!1}, ready:function(){Polymer.Settings.useShadow&&this.toggleClass("use-shadow",!0);"rtl"==A("HTML_DIR",void 0)&&(this.useMixedDirectionFormattedStrings?this.setAttribute("dir","rtl"):this.respectHtmlDir||this.setAttribute("dir","auto"));this.enableContentEditableChanged_()}, attached:function(){this.hasChange_&&this.textChanged_(this.text)}, clearContents_:function(){for(var a=this.getRoot(),b=a.lastChild;b&&"STYLE"!=b.tagName;){try{a.removeChild(b)}catch(c){break}"yt-endpoint"==b.is&&(no(b),b.textContent="");b=a.lastChild}}, textChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;for(var b=this.firstChild;b&&"FONT"==b.nodeName;){var c=b;b=b.nextSibling;this.removeChild(c)}c=this.getRoot();if(a&&(a.runs||a.simpleText)){if(this.ellipsisTruncateChanged_(this.ellipsisTruncate),b=a.simpleText,!b&&1==a.runs.length&&this.isSimpleString_(a.runs[0])&&(b=a.runs[0].text),void 0!=b&&N("disable_simple_mixed_direction_formatted_strings")&&this.useMixedDirectionFormattedStrings&&"rtl"==A("HTML_DIR", void 0)&&this.setAttribute("dir","auto"),void 0===b||!N("disable_simple_mixed_direction_formatted_strings")&&this.useMixedDirectionFormattedStrings)a=a.runs,void 0!==b&&(a=[{text:b}]),this.ellipsisTruncate?this.classList.add("complex-string"):this.classList.remove("complex-string"),a&&this.updateText_(a);else{if(b!=c.textContent){a=Polymer.Settings.useShadow;if(!a)try{c.textContent=b}catch(d){a=!0}a&&(this.clearContents_(),a=document.createElement("span"),a.appendChild(document.createTextNode(b)), c.appendChild(a))}}}else this.clearContents_()}}, ellipsisTruncateChanged_:function(a){!a||this.hasAttribute("title")&&!this.hasSetTitle_?this.hasSetTitle_&&(this.removeAttribute("title"),this.hasSetTitle_=!1):(this.setAttribute("title",this.getRawText()),this.hasSetTitle_=!0)}, computeAriaLabel_:function(a){return a}, setNodeStyle_:function(a,b){!this.useMixedDirectionFormattedStrings||N("disable_child_node_auto_formatted_strings")&&"auto"==this.getAttribute("dir")?b.removeAttribute("dir"):b.setAttribute("dir","auto");b.classList.remove("bold","deemphasize","italic","strikethrough");b.style.color="";this.noStyles||(a.bold&&b.classList.add("bold"),a.deemphasize&&b.classList.add("deemphasize"),a.italics&&b.classList.add("italic"),a.strikethrough&&b.classList.add("strikethrough"),a.textColor&&(b.style.color=PN(a.textColor)))}, setNodeTrackingParams_:function(a,b){b.data||(b.data={});if((a=a.loggingDirectives?a.loggingDirectives.trackingParams:null)||b.data.trackingParams)b.data.trackingParams=a}, computeHasLinkOnly_:function(a){return!(!a||1!=a.length||this.noEndpoints||!a[0].navigationEndpoint)}, computeUseMixedDirectionFormattedStrings_:function(){return this.plaintextOnly?!1:N("enable_mixed_direction_formatted_strings")}, getRoot:function(){var a=Polymer.dom(this.root);this.enableContentEditable&&(a=Polymer.dom(a.querySelector("[contenteditable]")));return a}, fixContenteditableScope:function(){var a=function(b){b&&(1==b.nodeType&&b.classList&&(b.classList.add("style-scope"),b.classList.add("yt-formatted-string")),b.childNodes&&b.childNodes.forEach(function(c){a(c)}))}; a(this.getRoot())}, updateText_:function(a){for(var b=a.length,c=this.getRoot(),d=c.firstChild;d&&"STYLE"==d.nodeName;)d=d.nextSibling;for(var f=0;fthis.messageTiers.length))return this.messageTiers[a]}; var kXa=function(a,b){if(b===Number(a.messageTiers[a.messageTiers.length-1].maxPriceMicros))return a.messageTiers.length;a=a.messageTiers.findIndex(function(c){return b>=Number(c.minPriceMicros)&&b<=Number(c.maxPriceMicros)}); return-1!==a?a:0},lXa=function(a,b,c,d){this.minPrice=a; this.maxPrice=b;this.numberFormatter=c;this.messageTiers=d},nXa=function(a,b,c){b=a.numberFormatter.currencyFormatter.parse(b); if(isNaN(b)||ba.maxPrice)return Object.assign(Object.assign({},c),{isInvalidPrice:!0});c=Math.round(1E6*b);c-=c%a.numberFormatter.currencyUnitMicros;b=kXa(a.messageTiers,c);return mXa(a,c,b)},mXa=function(a,b,c){var d=a.numberFormatter; d=d.currencyFormatter.format(TI(d,b)).replace(d.currencySymbol,"").trim();var f=a.numberFormatter;f=f.currencyFormatter.format(TI(f,b));var h=c;h>=a.messageTiers.messageTiers.length&&(h=a.messageTiers.messageTiers.length-1);var l=a.messageTiers.getTier(h)||a.messageTiers.getTier(0);var m=a.messageTiers;h=h>=m.messageTiers.length?void 0:m.messageTiers[h].durationLabel;l={shouldShowPickers:!(!l.messageTemplate.liveChatPaidMessageRenderer||!l.messageTemplate.liveChatPaidMessageRenderer.inputField)|| !(!l.messageTemplate.liveChatMembershipItemRenderer||!l.messageTemplate.liveChatMembershipItemRenderer.inputField),messageRenderer:l.messageTemplate,maxNumCharacters:Number(l.maxNumCharacters)||0,durationLabel:h,shouldHideDurationLabel:!h};h=a.numberFormatter;a={valueNow:h.currencyFormatter.format(TI(h,b)),valueMin:a.numberFormatter.currencyFormatter.format(a.minPrice),valueMax:a.numberFormatter.currencyFormatter.format(a.maxPrice)};return{sliderIndex:c,priceMicros:b,isInvalidPrice:!1,formattedPrice:d, formattedPriceWithCurrency:f,messagePreviewState:l,sliderAriaState:a}};function oXa(a,b){var c=Tn();c&&a&&yJ(c,Nn(a),b)} ;var xO={};xO.YtActionHandlerBehavior=[W.YtActionSenderBehavior,{actionMap:{},attached:function(){this.registerActionMap(this.actionMap)}, detached:function(){this.unregisterActionMap(this.actionMap)}, registerActionMap:function(a){for(var b=oL.getInstance(),c=k(Object.keys(a)),d=c.next();!d.done;d=c.next()){var f=d.value;d=a[f];if(this&&this[d]){var h=b.actionRoutingMap.get(f);h||(h=new Map,b.actionRoutingMap.set(f,h));h.set(this,td(this[d].bind(this)))}else f=Error("Unable to register undefined function"),f.params=d,ud(f)}}, unregisterActionMap:function(a){var b=oL.getInstance();a=k(Object.keys(a));for(var c=a.next();!c.done;c=a.next())(c=b.actionRoutingMap.get(c.value))&&c.delete(this)}}];var pXa=[W.YtActionSenderBehavior,{listeners:{"picker-cancelled":"onPickerCancel_"},togglePicker_:function(a){var b=this.$.pickers.selected;if(b){Polymer.dom(this).removeAttribute(b+"-open");var c=this.$["picker-buttons"].querySelector("#"+b);c&&(c.active=!1)}c=a;b==a&&(c=null);b!=a&&Polymer.dom(this).setAttribute(a+"-open","");this.$.pickers.selected=c;this.sendAction("yt-live-chat-picker-changed",[c])}, onPickerCancel_:function(){this.togglePicker_(this.$.pickers.selected)}}];var yO={YtTaskEmitterBehavior:{created:function(){this.cachedProviderNode_=null}, detached:function(){this.cachedProviderNode_=null}, getTaskManager:function(){var a=this.getContext_();return a?a.getTaskManager():Fk}, getContext_:function(){if(this.shouldUseTaskManager()){if(!this.cachedProviderNode_){var a=this.fire("yt-get-context-provider");a.detail&&a.detail.contextProvider?this.cachedProviderNode_=a.detail.contextProvider:this.parentElement&&(this.cachedProviderNode_=this)}if(this.cachedProviderNode_&&this.cachedProviderNode_.getProvidedContext&&this.cachedProviderNode_.getProvidedContext())return this.cachedProviderNode_.getProvidedContext()}}, shouldUseTaskManager:function(){var a=LUa.getInstance();if("disabled"==a.experimentMode_)a=!1;else{var b=!!a.usableComponents_.get(this.localName);a="counterfactual"==a.experimentMode_?!1:b}return a}, getNetworkManager:function(){var a=this.getContext_();if(a)return a.getNetworkManager()}}};var zO=new WeakMap;function qXa(a,b){for(var c in a)if(a.hasOwnProperty(c)&&b[c])return c;return null} function rXa(a){var b=a.match(/\[\[([\w\.]+)\]\]/);if(b&&1n;){h=a[n];var v=qXa(c,h);if(v){if(this.getComponentName_(c[v],h[v])!=r.is){var z=this.createComponent_(c[v],h[v],d),C=Polymer.dom(r).nextElementSibling;C?b.insertBefore(z,C):b.appendChild(z); uXa(this.is,b,r,d);r=z}else this.telemetry_.reuse++;this.deferRenderStamperBinding_(r,c[v],h[v]);m++;n++;r=Polymer.dom(r).nextElementSibling}else n++}vXa(this.is,b,m,d);m=r;if(a.length>n){h=document.createDocumentFragment();for(v=a.length;nf.length||!c.isCustomEmoji&&yXa.test(f))){var h=f.substr(0,3).toLocaleLowerCase();null==a.emojiShortcutCharMap[h]&&(a.emojiShortcutCharMap[h]=Object.create(null));a.emojiShortcutCharMap[h][f]=c}}}}return a.emojiShortcutCharMap}; AO.prototype.createEmoji=function(a,b){b=void 0===b?!0:b;var c=document.createElement("img");N("render_unicode_emojis_as_small_images")&&c.classList.add("small-emoji");c.classList.add("emoji");c.classList.add("yt-formatted-string");c.src=a.image?wO(a.image.thumbnails,this.emojiSize)||"":"";var d=void 0;a.image&&a.image.accessibility&&a.image.accessibility.accessibilityData&&(d=a.image.accessibility.accessibilityData.label);c.alt=d?d:(a.isCustomEmoji&&a.shortcuts?a.shortcuts[0]:a.emojiId)||"";a.isCustomEmoji&&( c.dataset.emojiId=a.emojiId);se&&(c.setAttribute("contenteditable","false"),c.setAttribute("unselectable","on"));b&&(a.shortcuts&&a.shortcuts.length&&c.setAttribute("shared-tooltip-text",a.shortcuts[0]),c.id="emoji-"+xXa++);return c}; AO.prototype.createDocumentFragment=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?!0:c;d=void 0===d?!1:d;for(var f=document.createDocumentFragment(),h=0,l,m=0;null!=(l=this.emojiRegex.exec(a));){var n=BO(this,l[0])||DO(this,l[0]);!n||n.isCustomEmoji&&!b||(n=this.createEmoji(n,c),h!==l.index&&f.appendChild(document.createTextNode(a.substring(h,l.index))),f.appendChild(n),h=l.index+l[0].length,m++)}if(!d||m)return f.appendChild(document.createTextNode(a.substr(h))),f}; var EO=new AO;Polymer({is:"yt-live-chat-message-buy-flow-renderer",_template:function(){if(void 0!==iXa)return iXa;var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n
[[getSimpleString(data.headerText)]]
\n
\n
\n
\n
\n
\n
\n \n [[getSimpleString(durationLabel)]]\n
\n
[[characterCountDisplay]]/[[maxCharacterCount]]
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n \n
[[currencySymbol]]
\n \n \n
[[data.currency]]
\n
\n \n
\n
\n \n [[getSimpleString(data.buyButton.buttonRenderer.text)]]\n \n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hXa){var d=document.createElement("template");d.innerHTML=""; hXa=d}d=hXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return iXa=a}, hostAttributes:{tabindex:0},properties:{data:{type:Object,observer:"dataChanged_"},emojiManager:Object,superChatEmojiManager:{type:Object,value:function(){return new AO}}, participantsManager:Object,selectedPage:{type:Number,value:0},currencySymbol:{type:String,computed:"computeCurrencySymbol_(data.currency)"},hideCurrencySymbol:{type:Boolean,computed:"computeHideCurrencySymbol_(currencySymbol, data.currency)"},priceMaxDigits:{type:Number,readOnly:!0},messageTooLong:{type:Boolean,computed:"computeMessageTooLong_(characterCountDisplay, maxCharacterCount)",reflectToAttribute:!0},isInvalidPrice:{type:Boolean,value:!1,readOnly:!0},buyButtonDisabled:{type:Boolean,computed:"computeBuyButtonDisabled_(messageTooLong, isInvalidPrice)"}, priceMicros:{type:Number,value:0},messageTiers:{type:Object},durationLabel:{type:Object,readOnly:!0},hideDurationLabel:{type:Boolean,readOnly:!0,reflectToAttribute:!0},messagePreviewRenderer:Object,messageCharacterCount:{type:Number,value:0},characterCountDisplay:{type:Number,computed:"computeCharacterCountDisplay_(messageCharacterCount, maxCharacterCount)"},maxCharacterCount:{type:Number,value:0},priceInputValue:{type:String,observer:"adjustInputWidth_"},priceMin:{type:Number,readOnly:!0},priceMax:{type:Number, readOnly:!0},sliderIndex:Number,sliderMax:{type:Number},sliderMaxMarkers:{type:Number,computed:"computeSliderMaxMarkers_(sliderMax)"},messageTemplate:{type:Object,readOnly:!0},shouldShowPickers:{type:Boolean,value:!0,readOnly:!0}},actionMap:{"yt-wallet-dialog-closed":"onWalletDialogClose_","yt-wallet-dialog-completed":"onWalletDialogComplete_","yt-open-payments-dialog":"onWalletDialogOpen_","yt-live-chat-buy-flow-callback":"buyFlowCallback_"},behaviors:[iO.YtLiveChatErrorMessageBehavior,pXa,xO.YtActionHandlerBehavior, W.YtActionSenderBehavior,X.YtRendererBehavior,Z],listeners:{"immediate-value-change":"onSliderImmediateChange_","yt-emoji-select":"onEmojiSelect_","yt-live-chat-text-input-field-renderer-character-count-changed":"onCharacterCountChanged_"},stampDom:{"data.heading":{id:"info-heading",mapping:{liveChatMessageBuyFlowHeadingRenderer:"yt-live-chat-message-buy-flow-heading-renderer"}},"data.helpButton":{id:"help",mapping:{buttonRenderer:"yt-button-renderer"}},"data.helpDialog":{id:"dialog",mapping:{liveChatDialogRenderer:"yt-live-chat-dialog-renderer"}}, "data.pickers":{id:"pickers",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[superChatEmojiManager]]"}},liveChatCreatorSupportRenderer:{component:"yt-live-chat-creator-support-renderer"}}},"data.pickerButtons":{id:"picker-buttons",mapping:{liveChatIconToggleButtonRenderer:"yt-live-chat-icon-toggle-button-renderer"}},messageTemplate:{id:"message-renderer",mapping:{liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[superChatEmojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[superChatEmojiManager]]",participantsManager:"[[participantsManager]]"}}}}},ready:function(){var a=this;this.data&&this.data.emojis&&this.superChatEmojiManager.load(this.data.emojis,this.emojiManager);this.async(function(){a.adjustInputWidth_()},1)}, dataChanged_:function(a){if(a){var b=new HKa(this.data.currency,this.data.currencyUnitMicros),c=new jXa(this.data.messageTiers);this._setPriceMin(TI(b,Number(c.messageTiers[0].minPriceMicros)||0));this._setPriceMax(TI(b,Number(c.messageTiers[c.messageTiers.length-1].maxPriceMicros)||0));this._setPriceMaxDigits(b.currencyFormatter.format(this.priceMax).length);var d=c.messageTiers[c.messageTiers.length-1];this.sliderMax=d.minPriceMicros==d.maxPriceMicros?c.messageTiers.length-1:c.messageTiers.length; b=this.buyFlowStateManager_=new lXa(this.priceMin,this.priceMax,b,c);c=Number(a.defaultPurchasePriceMicros)||0;d=kXa(b.messageTiers,c);this.buyFlowState_=mXa(b,c,d);this.updateMessagePreviewRendererFromState_(this.buyFlowState_);this.superChatEmojiManager&&this.superChatEmojiManager.load(a.emojis||[],this.emojiManager);a.buyButton.buttonRenderer.trackingParams&&(a=Nn(a.buyButton.buttonRenderer.trackingParams))&&(b=Tn())&&zJ(b,a)}}, onFocusOut_:function(a){this.buyFlowState_=nXa(this.buyFlowStateManager_,a.currentTarget.value);this.updateMessagePreviewRendererFromState_(this.buyFlowState_)}, onInputChange_:function(a){this.buyFlowState_=nXa(this.buyFlowStateManager_,a.currentTarget.value,this.buyFlowState_);this.updateMessagePreviewRendererFromStateWithoutPriceInput_(this.buyFlowState_);this.adjustInputWidth_()}, adjustInputWidth_:function(){var a=document.createElement("div");a.innerText=this.$["price-input"].value;var b=window.getComputedStyle(this.$["price-input"]);a.style.fontFamily=b.fontFamily;a.style.fontSize=b.fontSize;a.style.fontWeight=b.fontWeight;a.style.display="inline-block";a.style.visibility="hidden";document.querySelector("body").appendChild(a);this.updateStyles({"--price-input-width":a.clientWidth+16+"px"});document.querySelector("body").removeChild(a)}, onSliderImmediateChange_:function(){var a=this.$["price-slider"];a.dragging&&this.handleSliderChange_(a.immediateValue)}, onSliderChange_:function(){this.handleSliderChange_(this.$["price-slider"].value)}, onSliderFocus_:function(){this.updateSliderAria_(this.buyFlowState_)}, handleSliderChange_:function(a){var b=this.buyFlowStateManager_,c=b.messageTiers;a=mXa(b,a===c.messageTiers.length?Number(c.messageTiers[c.messageTiers.length-1].maxPriceMicros):Number(c.messageTiers[a].minPriceMicros),a);this.updateMessagePreviewRendererFromState_(a)}, updateSliderAria_:function(a){var b=this.$["price-slider"];b.setAttribute("aria-valuenow",a.sliderAriaState.valueNow);b.setAttribute("aria-valuemax",a.sliderAriaState.valueMax);b.setAttribute("aria-valuemin",a.sliderAriaState.valueMin)}, computeSliderMaxMarkers_:function(a){return a}, onCharacterCountChanged_:function(a){this.messageCharacterCount=a.detail.characterCount}, onBuyButtonClick_:function(){var a=this,b=this.getMessageRendererElement_();b=b?b.inputMessage():null;var c=this.data.buyButton.buttonRenderer.serviceEndpoint;c.ypcGetCartEndpoint?this.sendAction("yt-live-chat-start-buy-flow",[c,{purchase_price_micros:this.priceMicros,rich_chat_message:b},this.buyFlowCallback_.bind(this)]):c.ypcHandleTransactionEndpoint?this.sendServiceRequestAction([c,{purchase_price_micros:this.priceMicros,rich_chat_message:b}]).then(function(){a.selectedPage=0}):c.sendLiveChatMessageEndpoint&& this.sendServiceRequestAction([c, {client_message_id:c.sendLiveChatMessageEndpoint.clientIdPrefix||"",rich_message:b}]).then(function(){a.closeBuyFlow();a.selectedPage=0}); this.logExplicitClick(this.data.buyButton.buttonRenderer);this.$.loading.style.height=this.$.preview.clientHeight+"px";this.$.blank.style.height=this.$.preview.clientHeight+"px";this.selectedPage=1}, getMessageRendererElement_:function(){return this.$$("#message-renderer").firstChild}, onWalletDialogClose_:function(){this.selectedPage=0}, onWalletDialogComplete_:function(){this.selectedPage=1}, onWalletDialogOpen_:function(){this.selectedPage=2}, buyFlowCallback_:function(a){a.success?(a.response&&a.response.data&&a.response.data.actions&&this.sendAction("yt-live-chat-actions",[a.response.data.actions]),this.closeBuyFlow()):(this.selectedPage=0,a.errorMessageRenderer&&this.handleMessageRenderer_(a.errorMessageRenderer))}, handleMessageRenderer_:function(a){var b=lL(a,"renderer");if("confirmDialogRenderer"===b){var c=A("openPopupConfig");c&&this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}else this.setErrorRenderer(a)}, onCloseButtonClick_:function(){this.closeBuyFlow()}, closeBuyFlow:function(){this.sendAction("yt-live-chat-close-buy-flow");this.setErrorRenderer(null)}, updateMessagePreviewRendererFromStateWithoutPriceInput_:function(a){this._setMessageTemplate(a.messagePreviewState.messageRenderer);this._setShouldShowPickers(a.messagePreviewState.shouldShowPickers);this._setDurationLabel(a.messagePreviewState.durationLabel);this._setIsInvalidPrice(a.isInvalidPrice);this._setHideDurationLabel(a.shouldHideDurationLabel);this.maxCharacterCount=a.messagePreviewState.maxNumCharacters;this.priceMicros=a.priceMicros;this.sliderIndex=a.sliderIndex;this.getMessageRendererElement_().set("data.purchaseAmountText", kL(a.formattedPriceWithCurrency));this.updateSliderAria_(a)}, updateMessagePreviewRendererFromState_:function(a){this.updateMessagePreviewRendererFromStateWithoutPriceInput_(a);this.priceInputValue=a.formattedPrice}, computeMessageTooLong_:function(a,b){return a>b}, computeBuyButtonDisabled_:function(a,b){return a||b}, computeCurrencySymbol_:function(a){if(!a)return"";QGa();return sH[a][1]}, computeCharacterCountDisplay_:function(a,b){return 0==b?0:a}, onHelpClick_:function(){var a=this.$.dialog.querySelector("yt-live-chat-dialog-renderer");a&&(a.hidden=!1)}, handlePickerButtonToggle_:function(a){a=a.detail.targetId;this.togglePicker_(a);"emoji"==a&&this.getMessageRendererElement_().inputFocus()}, onEmojiSelect_:function(a){var b=this.getMessageRendererElement_();b.inputFocus();b.inputInsertEmoji(a.detail)}, computeHideCurrencySymbol_:function(a,b){return b?a==b:!0}});var DXa;var EXa;var FXa=function(){return O.apply(this,arguments)||this}; p(FXa,O); g.Object.defineProperties(FXa,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===EXa){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===DXa){var d=document.createElement("template");d.innerHTML=""; DXa=d}d=DXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);EXa=a}a=EXa;return a}}}); var FO=FXa;w([P(X.YtRendererBehavior),x("design:type",Object)],FO.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],FO.prototype,"data",void 0);FO=w([fO({is:"yt-live-chat-paid-message-footer-renderer"})],FO);var GXa,HXa=function(){if(void 0!==GXa)return GXa;var a=document.createElement("template");a.innerHTML=""; return GXa=a};var IXa;Polymer({is:"yt-icon",_template:function(){if(void 0!==IXa)return IXa;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(HXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);return IXa= a}, properties:{icon:String,targetContainer:{type:String,value:""}},observers:["iconChanged_(icon, targetContainer, isAttached)"],meta_:new Polymer.IronMeta({type:"iconset"}),created:function(){this.iconName_="";this.iconsetName_="yt-icons";this.iconset_=null;this.missingIconSet_=!1}, iconChanged_:function(a,b,c){(a||this.iconName_)&&c&&(a?(!N("default_to_innertube_icon")||0>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}, markAsDeleted:function(a,b){this.set("data.deletedStateMessage",a);this.set("data.showOriginalContentMessage",b)}, onMenuButtonFocus_:function(){this.menuFocused=!0}, onMenuButtonBlur_:function(){this.menuFocused=!1}, showContextMenu:function(a){if(this.data.contextMenuEndpoint){var b=this.getInterface(FM),c=this.data.contextMenuEndpoint;YL()?(b=b.endpointToXhrUrl(c),b=$L(YL(),{},b)):b=b.requestDataForEndpoint(c);b.then(this.handleGetContextMenuResponse_,this.handleGetContextMenuError_,this);a&&a.stopPropagation()}}, handleGetContextMenuResponse_:function(a){YL()||(a=a.response);a.liveChatItemContextMenuSupportedRenderers&&a.liveChatItemContextMenuSupportedRenderers.menuRenderer&&this.showContextMenu_(a.liveChatItemContextMenuSupportedRenderers.menuRenderer);a.actions&&this.sendAction("yt-live-chat-actions",[a.actions])}, handleGetContextMenuError_:function(a){if(a instanceof Error||a instanceof Object||a instanceof String)var b=a;Zm(new Ul("Error encountered calling GetLiveChatItemContextMenu",b))}, showContextMenu_:function(a){this.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:a}}})}, onYtPopupOpened_:function(){this.menuOpen=!0;this.fire("yt-live-chat-context-menu-opened")}, onYtPopupClosedOrCanceled_:function(){this.menuOpen=!1;this.fire("yt-live-chat-context-menu-closed")}}; MO.YtLiveChatItemBehavior=[PXa,kO.YtComponentBehavior,LO.YtOpenPopupBehavior,W.YtActionSenderBehavior];function NO(a){if(!a)return null;for(var b=[],c=0;c
\n
\n \n \n
\n
\n
[[getSimpleString(data.authorName)]]
\n
\n \n \n
[[getSimpleString(data.purchaseAmountText)]]
\n
\n
\n [[timestampString]]\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===JXa){var d=document.createElement("template");d.innerHTML=""; JXa=d}d=JXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return LXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},isUserEditable:{type:Boolean,reflectToAttribute:!0,computed:"computeIsUserEditable_(data)"},showOnlyHeader:{type:Boolean,computed:"computeShowOnlyHeader_(data, isDeleted)",reflectToAttribute:!0},showFooterDivider:{type:Boolean,computed:"computeShowFooterDivider_(data, isDeleted, isUserEditable)",reflectToAttribute:!0},allowAnimations:{type:Boolean,reflectToAttribute:!0,value:!1}},supportsInlineActionButtons:!0,behaviors:[pO.YtPdgLiveChatItemBehavior, X.YtRendererBehavior,MO.YtLiveChatItemBehavior,Z],observers:["isDeletedChanged_(isDeleted)","messageChanged_(data.message)"],stampDom:{"data.footer":{id:"footer",mapping:{liveChatPaidMessageFooterRenderer:{component:"yt-live-chat-paid-message-footer-renderer"}}},"data.buyButton":{id:"buy-flow-button",mapping:{buttonRenderer:"yt-button-renderer"}}},ready:function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed", "")}, attached:function(){this.allowAnimations=!1}, dataChanged_:function(a){if(a){var b={};b["--yt-live-chat-paid-message-primary-color"]=this.colorFromDecimal(a.bodyBackgroundColor);b["--yt-live-chat-paid-message-secondary-color"]=this.colorFromDecimal(a.headerBackgroundColor);b["--yt-live-chat-paid-message-header-color"]=this.colorFromDecimal(a.headerTextColor);b["--yt-live-chat-paid-message-author-name-color"]=this.colorFromDecimal(a.authorNameTextColor);b["--yt-live-chat-paid-message-timestamp-color"]=this.colorFromDecimal(a.timestampColor);b["--yt-live-chat-paid-message-color"]= this.colorFromDecimal(a.bodyTextColor);this.updateStyles(b);this.allowAnimations=!0}}, messageChanged_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, computeShowOnlyHeader_:function(a,b){return a?this.isEmpty_(a,b)&&!a.footer:!1}, computeShowFooterDivider_:function(a,b,c){return a?!!a.footer&&!this.isEmpty_(a,b)&&!c:!1}, computeIsUserEditable_:function(a){return!!a.inputField}, inputFocus:function(){var a=this.$$("yt-live-chat-text-input-field-renderer");a&&a.focus()}, inputInsertEmoji:function(a){var b=this.$$("yt-live-chat-text-input-field-renderer");b&&b.insertEmoji(a)}, inputMessage:function(){var a=this.$$("yt-live-chat-text-input-field-renderer");return a&&this.data.inputField?(a.completeEmojis(),NO(a.liveChatRichMessageInput)):null}, isDeletedChanged_:function(a){a&&this.set("data.message",null)}, isEmpty_:function(a,b){return a?a.empty||!(a.message||a.inputField||b):!0}, onBuyButtonClick_:function(){var a=this.data.buyButton.buttonRenderer;if(a.trackingParams){var b=Nn(a.trackingParams);if(b){var c=Tn();c&&BJ(c,b)}}a.command&&this.fire("yt-navigate",{endpoint:a.command})}});var QXa=document.createElement("template");QXa.innerHTML="";document.head.appendChild(QXa.content);var RXa;var SXa;var TXa;var UXa;Polymer({is:"yt-live-chat-text-input-field-suggestion",_template:function(){if(void 0!==UXa)return UXa;var a=document.createElement("template");a.innerHTML="\n \"[[data.alt]]\"\n [[data.text]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===TXa){var d=document.createElement("template");d.innerHTML=""; TXa=d}d=TXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return UXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},active:{type:Boolean,reflectToAttribute:!0}},identity:wb,dataChanged_:function(){this.active=!1}, onClick_:function(){this.fire("yt-live-chat-select-suggestion",this.data)}});Polymer({SPLIT_REGEX:/.*([:@#].*?)$/,NBSP_REGEX:/\u00a0/g,NBSP:String.fromCharCode(160),MAX_SUGGESTIONS:64,is:"yt-live-chat-text-input-field-renderer",_template:function(){if(void 0!==SXa)return SXa;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===RXa){var d=document.createElement("template");d.innerHTML=""; RXa=d}d=RXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return SXa=a}, properties:{data:{type:Object,observer:"dataChanged_"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},inputTabIndex:{type:Number,computed:"computeInputTabIndex_(disabled)"},maxCharacterLimit:{type:Number,notify:!0,readOnly:!0,computed:"computeMaxCharacterLimit_(data.maxCharacterLimit)"},characterCount:{type:Number,notify:!0,readOnly:!0,computed:"computeCharacterCount_(liveChatRichMessageInput)",observer:"characterCountChanged_"},liveChatRichMessageInput:{type:Object,value:null,notify:!0,readOnly:!0}, hasText:{type:Boolean,reflectToAttribute:!0,computed:"computeHasText_(characterCount)"},isValidWithNoInputText:{type:Boolean,value:!1},isInputValid:{type:Boolean,computed:"computedIsInputValid(characterCount, maxCharacterLimit, isValidWithNoInputText)"},focused:{readOnly:!0,type:Boolean,value:!1,reflectToAttribute:!0},suggestions:{type:Array,value:[]},emojiManager:Object,participantsManager:Object},behaviors:[X.YtRendererBehavior,Z],listeners:{"yt-live-chat-select-suggestion":"onSuggestion_"},stampDom:{suggestions:{id:"dropdown-content", mapping:{suggestion:"yt-live-chat-text-input-field-suggestion"},reuseComponents:!0}},created:function(){this.suggestionIndex_=-1;this.lastSuggestionRange_=null}, ready:function(){this.scopeSubtree(this.$.input,!0)}, attached:function(){ve&&(document.execCommand("enableObjectResizing",!1,!1),document.execCommand("enableInlineTableEditing",!1,!1))}, detached:function(){this.setLiveChatRichMessageInput(null)}, dataChanged_:function(a){var b={placeholderTextColor:"--yt-live-chat-text-input-field-placeholder-color",activeUnderlineColor:"--yt-live-chat-text-input-field-active-underline-color",inactiveUnderlineColor:"--yt-live-chat-text-input-field-inactive-underline-color"},c=!1,d={},f;for(f in b)a&&a[f]&&(d[b[f]]=this.colorFromDecimal(a[f]),c=!0);c&&this.updateStyles(d)}, colorFromDecimal:function(a){a=parseInt(a,10);return"rgba("+[a>>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}, preventDrag_:function(a){a.dataTransfer&&(a.dataTransfer.dropEffect="none");a.preventDefault()}, preventResize_:function(a){a.returnValue=!1}, onInputChange_:function(){var a=this.getCurrentRange_();if(a){var b=this.calculateTextBeforeRange_(a);this.completeEmojis_(a,b,!0)||this.updateSuggestions_(a,b)}this._setLiveChatRichMessageInput(this.calculateLiveChatRichMessageInput_())}, getCurrentRange_:function(){var a=window.getSelection();return a.rangeCount?a.getRangeAt(0).cloneRange():null}, getInputRange_:function(){var a=this.getCurrentRange_();if(a){for(var b=a.commonAncestorContainer,c=!1;b;){if(b==this.$.input){c=!0;break}b=b.parentNode}c||(a=null)}a||(a=this.getRangeAtEnd_());return a}, getRangeAtEnd_:function(){var a=document.createRange();this.$.input.lastChild?a.setStart(this.$.input.lastChild,this.$.input.lastChild.length):(a.selectNodeContents(this.$.input),a.collapse(!1));return a}, getSuggestions_:function(a){var b=[],c=a.substr(0,3),d=CXa(this.emojiManager,c);if(d)for(var f in d)if(0==f.toLocaleLowerCase().indexOf(a)){var h=d[f];if(h&&h.emojiId){h=CO(this.emojiManager,h.emojiId);var l=void 0;l=h.image&&h.image.accessibility&&h.image.accessibility.accessibilityData?h.image.accessibility.accessibilityData.label:h.isCustomEmoji?h.shortcuts[0]:h.emojiId;b.push({suggestion:{emoji:!0,image:h.image,alt:l,text:f}});if(b.length>=this.MAX_SUGGESTIONS)break}}if(0==c.indexOf("@")||0== c.indexOf("#"))if(d=c.substr(0,1),a=a.substr(1),c=c.substr(1),c=this.participantsManager.getAuthorsFromPrefix(c))for(var m in c)if(0==m.indexOf(a)&&(f=c[m],h=nL(f.authorName),b.push({suggestion:{author:!0,authorType:d,image:f.authorPhoto,alt:h,text:h}}),b.length>=this.MAX_SUGGESTIONS))break;return b?b.sort(function(n,r){return r.suggestion.text"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===YXa){var d=document.createElement("template");d.innerHTML=""; YXa=d}d=YXa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ZXa=a}, behaviors:[Polymer.PaperRippleBehavior],properties:{label:String,disabled:{type:Boolean,reflectToAttribute:!0},noink:Boolean,pressed:Boolean,toggleable:Boolean,untabbable:Boolean},listeners:{down:"rippleDown_",up:"rippleUp_"},ready:function(){var a=this,b=this.$.button;b.addEventListener("focus",function(){a.rippleDown_()}); b.addEventListener("blur",function(){a.rippleUp_()})}, computeTabIndex_:function(a){return a?-1:0}, computeButtonAriaPressed_:function(a){if(this.toggleable)return a?"true":"false"}, rippleDown_:function(){this.noink||this.getRipple().downAction()}, rippleUp_:function(){this.noink||this.getRipple().upAction()}, ensureRipple:function(a){var b=this._ripple;Polymer.PaperRippleBehavior.ensureRipple.apply(this,arguments);this._ripple&&this._ripple!==b&&(this._ripple.center=!0,this._ripple.classList.add("circle"))}});var $Xa;var aYa=function(){var a=document.body,b=a.appendChild;if(void 0===$Xa){var c=document.createElement("template");c.innerHTML=""; $Xa=c}c=$Xa;b.call(a,c.content)}; document.body?aYa():window.addEventListener("DOMContentLoaded",aYa);var bYa=[X.YtRendererBehavior,W.YtActionSenderBehavior,OO.YtEndpointBehavior,{properties:{alignByText:{type:Boolean,value:!1,reflectToAttribute:!0},useKeyboardFocused:{type:Boolean,value:function(){return!!this.getInterface(PO)&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0},keyboardFocused:{type:Boolean,value:!1,reflectToAttribute:!0},startJustified:{type:Boolean,value:!1,reflectToAttribute:!0},forceIconButton:{type:Boolean,value:!1},forceIconOnly:{type:Boolean,value:!1},styleActionButton:{type:Boolean,reflectToAttribute:!0},verticallyAligned:{type:Boolean,value:!1,reflectToAttribute:!0},noink:{type:Boolean,value:!1},showTooltips:{type:Boolean,value:!1},buttonRaised:{type:Boolean,value:!1},disabled:{type:Boolean,observer:"disabledChanged_",reflectToAttribute:!0}, sendServiceEndpointWhenDisabled:{type:Boolean,value:!1},ellipsisTruncate:Boolean,buttonTooltipPosition:{type:String,value:"bottom"},buttonSize:{type:String,reflectToAttribute:!0},endpoint:{type:Object,readOnly:!0},serviceEndpoint:{type:Object,readOnly:!0},command:{type:Object,readOnly:!0},buttonIcon:{type:String,readOnly:!0,observer:"buttonIconChanged_"},buttonText:{type:Object,readOnly:!0},buttonAccessibility:{type:Object,readOnly:!0},buttonTooltip:{type:String,readOnly:!0},buttonClass:{type:String, readOnly:!0,observer:"buttonClassChanged_"},iconPositionType:{type:String,readOnly:!0,observer:"iconPositionTypeChanged_"},stampType_:{type:String,computed:"computeStampType_(forceIconButton, buttonText, buttonIcon, endpoint)",observer:"stampTypeChanged_"},componentReady_:Boolean},listeners:{focusin:"onFocus_",focusout:"onBlur_",mouseenter:"addTooltips_",tap:"onYtButtonTap_"},observers:["isDisabledChanged_(data.isDisabled)","observeBasicPalette_(data.colorData.basicColorPaletteData)","dataChanged_(data, componentReady_)"], created:function(){this.elements_={};this.hasChange_=!1}, attached:function(){this.hasChange_&&this.stampTypeChanged_(this.stampType_);this.keyboardFocused=!1}, get container(){return this.root},onYtButtonTapHandler:function(){}, ytButtonServiceEndpointHandler:function(){}, updateRenderedElements:function(){if(this.elements_.endpoint){this.elements_.endpoint.data=this.endpoint;var a=this.computeHref_(this.endpoint,!0);a?this.elements_.endpoint.setAttribute("href",a):this.elements_.endpoint.removeAttribute("href")}if(this.buttonClass){a=this.buttonClass.split(" ");a=k(a);for(var b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!0),this.toggleClass(b,!0,this.elements_.button),this.toggleClass(b,!0,this.elements_.text)}this.elements_.icon&&(this.elements_.icon.icon= this.buttonIcon);this.elements_.text&&(this.elements_.text.text=this.buttonText);this.elements_.button&&(a=null,this.buttonAccessibility&&(a=this.buttonAccessibility.label),"yt-icon-button"==this.elements_.button.is?this.elements_.button.label=a:a?this.elements_.button.setAttribute("aria-label",a):this.elements_.button.removeAttribute("aria-label"))}, dataChanged_:function(){this.updateRenderedElements()}, onFocus_:function(){this.addTooltips_();if(this.useKeyboardFocused){var a=this.getInterface(PO);a&&(this.keyboardFocused=a.isKeyBoardInUse())}}, onBlur_:function(){this.keyboardFocused=!1}, addTooltips_:function(){this.elements_.endpoint&&this.showTooltips&&this.buttonTooltip&&(this.elements_.tooltip||(this.elements_.tooltip=this.reuseEnabled_()?mo("paper-tooltip"):document.createElement("paper-tooltip"),this.elements_.tooltip.position=this.buttonTooltipPosition,this.elements_.tooltip.offset=8,this.elements_.tooltip.fitToVisibleBounds=!0,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.tooltip)),Polymer.dom(this.elements_.tooltip).textContent=this.buttonTooltip)}, buttonClassChanged_:function(a,b){if(b)for(a=b.split(" "),a=k(a),b=a.next();!b.done;b=a.next())b=b.value,this.toggleClass(b,!1),this.toggleClass(b,!1,this.elements_.button),this.toggleClass(b,!1,this.elements_.text)}, buttonIconChanged_:function(a){this.elements_.icon?a?this.elements_.icon.icon=a:(this.elements_.button&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.elements_.icon=null,this.toggleAttribute("is-paper-button-with-icon",!1)):a&&this.stampType_&&"paper_button"==this.stampType_&&this.addIconElementToPaperButton_()}, addIconElementToPaperButton_:function(){this.elements_.icon=this.getIcon_();this.elements_.button&&(this.iconPositionType&&"BUTTON_ICON_POSITION_TYPE_LEFT_OF_TEXT"!=this.iconPositionType?"BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT"==this.iconPositionType&&Polymer.dom(this.elements_.button).appendChild(this.elements_.icon):Polymer.dom(this.elements_.button).insertBefore(this.elements_.icon,this.elements_.text),this.toggleAttribute("is-paper-button-with-icon",!0))}, stampTypeChanged_:function(a){if(void 0===this.isAttached)this.hasChange_=!0;else if(this.hasChange_=!1,this.emptyContainer_(),this.elements_={},this.componentReady_=!1,a){var b=!1;this.elements_.endpoint=document.createElement("a");this.elements_.endpoint.classList.add("yt-simple-endpoint");this.elements_.endpoint.tabIndex=-1;switch(a){case"yt_icon_button_with_label":b=!0;this.toggleClass("force-icon-button",!0);this.elements_.button=this.getYtIconButton_();a=Polymer.dom(this.elements_.button).firstElementChild; this.elements_.icon=a;this.elements_.text=this.getFormattedString_();this.elements_.text.id="text";this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.text);break;case"paper_button":this.elements_.button=this.reuseEnabled_()?mo("paper-button"):document.createElement("paper-button");this.elements_.text=this.getFormattedString_();this.elements_.text.id="text"; this.elements_.text.ellipsisTruncate=this.ellipsisTruncate;this.elements_.button.raised=this.buttonRaised;Polymer.dom(this.elements_.button).appendChild(this.elements_.text);Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);this.buttonIcon&&this.addIconElementToPaperButton_();break;case"yt-icon-button":b=!0,this.elements_.button=this.getYtIconButton_(),a=Polymer.dom(this.elements_.button).firstElementChild,this.elements_.icon=a,Polymer.dom(this.elements_.endpoint).appendChild(this.elements_.button);}this.toggleAttribute("is-icon-button", b);this.toggleAttribute("is-paper-button",!b);this.toggleAttribute("has-no-text",!this.elements_.text);this.elements_.button.id="button";this.elements_.button.noink=this.noink;this.elements_.button.disabled=this.disabled;Polymer.dom(this.container).appendChild(this.elements_.endpoint);this.componentReady_=!0}}, iconPositionTypeChanged_:function(){this.iconPositionType&&(this.elements_.button&&this.elements_.icon&&Polymer.dom(this.elements_.button).removeChild(this.elements_.icon),this.addIconElementToPaperButton_(),this.elements_.icon.icon=this.buttonIcon)}, isDisabledChanged_:function(a){if(void 0!=a||this.disabled)this.disabled=a,this.elements_.button&&(this.elements_.button.disabled=a)}, observeBasicPalette_:function(a){QO(this,a)}, disabledChanged_:function(a){this.data&&this.set("data.isDisabled",a)}, onYtButtonTap_:function(a){if(this.disabled)a.stopImmediatePropagation(),this.sendServiceEndpointWhenDisabled&&this.serviceEndpoint&&this.sendServiceRequestAction([this.serviceEndpoint]);else if(!(this.data&&this.data.command&&this.resolveCommand(this.data.command,{},!0))){if(this.serviceEndpoint)this.ytButtonServiceEndpointHandler(),N("handle_service_request_actions")||this.sendServiceRequestAction([this.serviceEndpoint]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:this.serviceEndpoint});else this.onYtButtonTapHandler();N("handle_service_request_actions")?(a=[],this.serviceEndpoint&&a.push(this.serviceEndpoint),this.data&&this.data.command&&this.data.command!=this.serviceEndpoint&&a.push(this.data.command),a.length&&this.sendInnerTubeActions(a,this)):this.data&&this.data.command&&(a=this.data.command,a.accountUnlinkCommand||a.accountLinkCommand||a.insertAdCommand||a.insertHighlightMarkerCommand||a.createLivestreamHighlightClipCommand||a.getVideoUploadFeedbackCommand||a.musicDeletePrivatelyOwnedEntityCommand? this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],this))}}, computeStampType_:function(){return this.forceIconButton&&this.buttonText&&this.buttonIcon?"yt_icon_button_with_label":this.buttonText?"paper_button":this.buttonIcon?"yt-icon-button":null}, emptyContainer_:function(){for(var a=Polymer.dom(this.container);a.lastChild&&"STYLE"!=a.lastChild.tagName;)try{a.removeChild(a.lastChild)}catch(b){break}}, getYtIconButton_:function(){var a=this.reuseEnabled_()?mo("yt-icon-button"):document.createElement("yt-icon-button"),b=Polymer.dom(a).firstElementChild;if(b&&"yt-icon"!=b.is){for(b=Polymer.dom(a);b.lastChild;)b.removeChild(b.lastChild);b=null}b||(b=this.getIcon_(),Polymer.dom(a).appendChild(b));return a}, reuseEnabled_:function(){return N("enable_button_behavior_reuse")}, getIcon_:function(){return this.reuseEnabled_()?mo("yt-icon"):document.createElement("yt-icon")}, getFormattedString_:function(){return this.reuseEnabled_()?mo("yt-formatted-string"):document.createElement("yt-formatted-string")}}];var RO={}; RO.YtButtonBehavior=[bYa,{properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isDisabled)","stateChanged_(data.style)","stateChanged_(forceIconOnly)"],stateChanged_:function(){var a=this.data;a&&(this._setEndpoint(this.computeEndpoint_(a)),this._setServiceEndpoint(this.computeServiceEndpoint_(a)),this._setCommand(this.computeCommand_(a)),this._setButtonIcon(this.computeButtonIcon_(a)),this._setButtonText(this.computeButtonText_(a,this.forceIconOnly)),this._setButtonAccessibility(this.computeAccessibility_(a)),this._setButtonTooltip(this.computeTooltip_(a)), this._setButtonClass(this.computeButtonClass_(a)),this._setIconPositionType(this.computeIconPositionType_(a)),this.updateRenderedElements())}, computeIconPositionType_:function(a){return a&&a.iconPosition||null}, computeEndpoint_:function(a){var b=a&&a.navigationEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.url"),d=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:a&&a.command&&a.command.modalEndpoint?a.command:c&&!d&&a.command?a.command:null}, computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null}, computeCommand_:function(a){return a&&a.command||null}, computeButtonIcon_:function(a){return a&&a.icon&&a.icon.iconType?jO(a.icon.iconType):null}, computeButtonText_:function(a,b){return!b&&a&&a.text||null}, computeAccessibility_:function(a){return this.get("accessibilityData.accessibilityData",a)||a&&a.accessibility||(a&&a.text?{label:this.getSimpleString(a.text)}:null)}, computeTooltip_:function(a){return a?a.isDisabled&&a.disabledTooltip||a.tooltip||null:null}, computeButtonClass_:function(a){var b=a&&a.style?a.style.toLowerCase().replace(/_/g,"-")+" ":"";b+=a&&a.size?a.size.toLowerCase().replace(/_/g,"-")+" ":"";a.colorData&&a.colorData.basicColorPaletteData&&a.colorData.basicColorPaletteData.borderColor&&(b+="palette-with-border");return b.trim()}}];var SO={};function TO(a,b,c){SO[a]||(SO[a]={});SO[a][b]=c} function UO(a){SO[a]||(SO[a]={});return SO[a]} ;var cYa,VO=function(){if(void 0!==cYa)return cYa;var a=document.createElement("template");a.innerHTML=""; return cYa=a};var dYa,WO=function(){if(void 0!==dYa)return dYa;var a=document.createElement("template");a.innerHTML=""; return dYa=a};var eYa;var fYa=document.createElement("template");fYa.innerHTML=""; document.head.appendChild(fYa.content);var gYa=document.createElement("template");gYa.innerHTML=""; document.head.appendChild(gYa.content);var hYa=document.createElement("template");hYa.innerHTML=""; document.head.appendChild(hYa.content);var iYa=document.createElement("template");iYa.innerHTML=""; document.head.appendChild(iYa.content);TO("sharingToggleButtonAndDefaultButton","buttonRenderer","yt-button-renderer"); Polymer({is:"yt-button-renderer",_template:function(){if(void 0!==eYa)return eYa;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(WO().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);return eYa=a}, behaviors:[LO.YtOpenPopupBehavior,RO.YtButtonBehavior],listeners:{"yt-navigate":"onYtNavigate_"},created:function(){this.openPopupConfig=A("openPopupConfig");this.showTooltips=!0}, onYtNavigate_:function(a){var b=this.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(this.openPopup(b),a.stopPropagation(),a.preventDefault())}});var XO={_noAccessors:!0,properties:{disablePrescanVisibility:Boolean,prescanHeight:{type:Number,reflectToAttribute:!0}},onShow:function(){if(this.onShow_)this.onShow_()}};var jYa=A("DORMANT_IMAGE_TIMEOUT",1E3),YO=function(){this.loadTimeResolver_=kYa(this);this.sessionResolved_=!1;this.collectionJobId_=0;this.visibleSet_=new Set;this.elementLoadPromises_=new Map;this.collectionPromise_=null;this.dormantJobId_=0}; YO.prototype.onDormantLoad_=function(){this.collectionPromise_&&this.loadTimeResolver_.reject(Error("onDormantLoad_"))}; var ZO=function(a){Fk.cancelJob(a.dormantJobId_);a:{var b=k(a.visibleSet_);for(var c=b.next();!c.done;c=b.next())if(c=c.value,!c.loadTime||Infinity==c.loadTime){b=!1;break a}b=!0}b||(a.dormantJobId_=Bk(Fk,a.onDormantLoad_.bind(a),jYa))},mYa=function(a,b){if(a.sessionResolved_)return!1; a.collectionJobId_&&lYa(a);return"loadTime"in b?!0:!1}; YO.prototype.hidden=function(a){mYa(this,a)&&(this.visibleSet_.delete(a),this.elementLoadPromises_.delete(a),ZO(this))}; var nYa=function(a,b){var c=eXa(b).then(function(){if(!a.visibleSet_.has(b))return null;ZO(a);return b},function(){}); a.elementLoadPromises_.set(b,c)}; YO.prototype.shown=function(a){if(!mYa(this,a))return!1;this.visibleSet_.add(a);ZO(this);nYa(this,a);return!0}; var oYa=function(a){Fk.cancelJob(a.collectionJobId_);a.collectionJobId_=0;a.collectionPromise_&&(a.collectionPromise_.cancel("canceled collectionPromise_"),a.collectionPromise_=null)},lYa=function(a){oYa(a); var b=ik("viewport_load_collection_wait_time",0);a.collectionJobId_=Bk(Fk,a.collectLoadTime_.bind(a),b)}; YO.prototype.collectLoadTime_=function(){var a=this;oYa(this);ZO(this);var b=Infinity;this.collectionPromise_=Ti([].concat(ha(this.elementLoadPromises_.values())));this.collectionPromise_.then(function(c){c=c.filter(function(l){return!!l&&!!l.parentNode&&a.visibleSet_.has(l)}); for(var d=null,f=0;f";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pYa){var d=document.createElement("template");d.innerHTML=""; pYa=d}d=pYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return qYa=a}, behaviors:[XO,X.YtRendererBehavior],properties:{delayedSrc:{type:String,observer:"delayedSrcChanged_"},thumbnail:{type:Object,observer:"thumbnailChanged_"},loaded:{type:Boolean,value:!1,reflectToAttribute:!0},notifyOnLoaded:Boolean,height:Number,width:Number,dimension:{type:{WIDTH:"width",HEIGHT:"height"},value:function(){return"width"}}, fit:{type:Boolean,reflectToAttribute:!0},fitHeight:{type:Boolean,reflectToAttribute:!0},objectFit:{type:String,reflectToAttribute:!0},objectPosition:{type:String,reflectToAttribute:!0},preferredThumbnail:String,alt_:{type:String,value:"",computed:"computeAlt_(thumbnail.accessibility.accessibilityData.label, loaded)"},sharedTooltipText:{type:String,reflectToAttribute:!0},ftlEligible:Boolean},observeHiddenOption:null,observePrescanOption:"observe_once",observers:["observePlaceholderColor_(thumbnail.placeholderColor)"], EMPTY_GIF:sd("NO_EMPTY_DATA_IMG")?"":"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",created:function(){this.empty_=!0;this.loadTime=Infinity;this.hasChange_=this.pendingPaint=!1;this.oldThumbnail_=null;this.oldDelayedSrc_="";this.objectURL_=null}, attached:function(){this.hasChange_&&this.thumbnailChanged_()}, ready:function(){var a=this.shouldShowPlaceholder_();this.toggleClass("no-transition",!0);a&&this.classList.add("with-placeholder")}, isPreloaded:function(){return this.isThumbPreloaded_(this.thumbnail)}, isThumbPreloaded_:function(a){return!!this.get("webThumbnailDetailsExtensionData.isPreloaded",a)}, computeSrc_:function(){return this.delayedSrc||this.computeThumbnailSrc_(this.thumbnail)||this.EMPTY_GIF}, computeThumbnailSrc_:function(a){return a&&a.thumbnails?wO(a.thumbnails,"width"==this.dimension?this.width:this.height,this.preferredThumbnail,this.dimension):null}, computeAlt_:function(){var a=this.thumbnail&&this.thumbnail.accessibility&&this.thumbnail.accessibility.accessibilityData&&this.thumbnail.accessibility.accessibilityData.label;return this.loaded&&a||""}, thumbnailChanged_:function(){var a=k([this.thumbnail,this.oldThumbnail_]),b=a.next().value;a=a.next().value;this.oldThumbnail_=b;if(void 0===this.isAttached)this.hasChange_=!0;else{this.hasChange_=!1;if(this.loaded&&(a=this.computeThumbnailSrc_(a),this.computeThumbnailSrc_(b)==a))return;N("kevlar_attach_vimio_behavior")&&this.markDirtyVisibilityObserver();this.isThumbPreloaded_(b)?(this.loadTime=Infinity,this.setSrc_(this.thumbnail.thumbnails[0].url),this.empty_=!1):b&&sd("DISABLE_YT_IMG_DELAY_LOADING", !1)?this.loaded&&!this.empty_?Polymer.RenderStatus.afterNextRender(this,this.onReload_):Polymer.RenderStatus.afterNextRender(this,this.onShow_):this.resetImage_()}}, delayedSrcChanged_:function(){var a=this.oldDelayedSrc_;this.oldDelayedSrc_=this.delayedSrc;this.loaded&&this.delayedSrc==a||this.resetImage_()}, setSrc_:function(a){a?(this.$.img.src||this.classList.remove("empty"),this.$.img.src=a):(this.$.img.removeAttribute("src"),this.classList.add("empty"))}, resetImage_:function(){this.loaded=!1;this.loadTime=Infinity;var a=sO.get(this);a&&(a.reject(Error("resetImageLoad")),sO.delete(this));this.pendingPaint&&(uO.delete(this),this.pendingPaint=!1);this.empty_=!0;this.setSrc_(this.EMPTY_GIF);this.invalidate(!1)}, observePlaceholderColor_:function(){var a=this.thumbnail&&this.thumbnail.placeholderColor;a?this.style.backgroundColor=PN(a):this.shouldShowPlaceholder_()||(this.style.backgroundColor="transparent")}, onLoad_:function(){this.$.img.src&&this.$.img.src!=this.EMPTY_GIF&&(uO.add(this),this.pendingPaint=!0,tO||(tO=Gk(cXa)),this.notifyOnLoaded&&this.fire("yt-img-shadow-loaded"),this.objectURL_&&(URL.revokeObjectURL(this.objectURL_),this.objectURL_=null))}, onError_:function(){var a=this;if(N("kevlar_woffle"))rYa(this.$.img.src).then(function(b){if(!vea(b.type))throw Error("unsafe blob MIME type: "+b.type);if(URL&&URL.createObjectURL)b=new kh(URL.createObjectURL(b),bh);else throw Error("cannot find createObjectURL");a.objectURL_=b.toString();a.setSrc_(a.objectURL_)});else this.onLoad_()}, onPrescanVisible:function(){this.onShow_()}, onVisible:function(){if(N("yt_img_shadow_trigger_show_on_visible"))this.onShow_();YO.getInstance().shown(this)}, onShow_:function(){if(!this.loaded||this.empty_){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))}}, onReload_:function(){this.empty_=!1;var a=this.computeSrc_();a!=this.$.img.src&&(this.loaded=!1,this.setSrc_(a))}, shouldShowPlaceholder_:function(){return N("kevlar_thumbnail_bg")}});var sYa={properties:{hidden:{type:Boolean,reflectToAttribute:!0,observer:"hiddenChanged_"}},observers:["isAttachedChanged_(isAttached)"],created:function(){this.restoreFocusNode_=null}, attached:function(){document.addEventListener("focus",this.onFocus_.bind(this),!0)}, detached:function(){this.restoreFocusNode_=null;document.removeEventListener("focus",this.onFocus_.bind(this),!0)}, focusChild_:function(){window.requestAnimationFrame(function(){this.restoreFocusNode_||(this.restoreFocusNode_=document.activeElement);var a=hI(Polymer.IronFocusablesHelper,this);a.length&&a[a.length-1].focus()}.bind(this))}, isAttachedChanged_:function(a,b){a?this.focusChild_():b&&this.restoreFocus_()}, hiddenChanged_:function(){this.hidden?this.restoreFocus_():this.focusChild_()}, restoreFocus_:function(){this.restoreFocusNode_&&(this.restoreFocusNode_.focus(),this.restoreFocusNode_=null)}, onFocus_:function(a){this.hidden||-1!=Polymer.dom(a).path.indexOf(this)||(a.stopPropagation(),this.focusChild_())}};var tYa;var uYa;Polymer({is:"yt-live-chat-dialog-renderer",_template:function(){if(void 0!==uYa)return uYa;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tYa){var d=document.createElement("template");d.innerHTML=""; tYa=d}d=tYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return uYa=a}, properties:{data:Object},hostAttributes:{hidden:!0},behaviors:[Z,sYa],stampDom:{"data.confirmButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},onClick_:function(a){a.target!=this.$.button&&(this.hidden=!0)}});var vYa;var wYa;Polymer({is:"yt-live-chat-error-message-renderer",_template:function(){if(void 0!==wYa)return wYa;var a=document.createElement("template");a.innerHTML="\n \n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vYa){var d=document.createElement("template");d.innerHTML=""; vYa=d}d=vYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wYa=a}, properties:{data:Object,icon:{type:String,computed:"computeIcon_(data.icon)"}},dismiss:function(){this.fire("yt-live-chat-error-message-dismiss")}, computeIcon_:function(a){return a&&a.iconType?"yt-icons:"+a.iconType.toLowerCase():"yt-icons:close"}});var xYa;var yYa;Polymer({is:"yt-live-chat-icon-toggle-button-renderer",_template:function(){if(void 0!==yYa)return yYa;var a=document.createElement("template");a.innerHTML="\n \n \n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xYa){var d=document.createElement("template");d.innerHTML=""; xYa=d}d=xYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return yYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},id:{type:String,computed:"computeId_(data.targetId)",reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},icon:{type:String,readOnly:!0,computed:"computeIcon_(data.icon.iconType, active)"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"disabledChanged_"},showTooltip:{type:Boolean,computed:"computeShowTooltip_(data, disabled)"}},listeners:{animationend:"onAnimationEnd_"},behaviors:[xO.YtActionHandlerBehavior, X.YtRendererBehavior,GWa.YtLiveChatTooltipTargetingBehavior],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_"},created:function(){this.tooltip_=null}, dataChanged_:function(a){a.tooltip?(this.tooltip_||(this.tooltip_=document.createElement("paper-tooltip"),this.tooltip_.position="top",this.tooltip_.offset=8,this.tooltip_.fitToVisibleBounds=!0,this.appendChild(this.tooltip_)),Polymer.dom(this.tooltip_).textContent=a.tooltip):this.tooltip_&&(this.removeChild(this.tooltip_),this.tooltip_=null);a.disabled&&(this.disabled=!0)}, computeId_:function(a){return a}, computeIcon_:function(a,b){return a?b&&this.data&&this.data.toggledIcon?"yt-icons:"+this.data.toggledIcon.iconType.toLowerCase():"yt-icons:"+a.toLowerCase():""}, onClick_:function(){this.data.disabled?this.showTooltip&&this.immediatelyShowTooltip_():((this.active=!this.active)&&this.logExplicitClick(this.data),"creator"!=this.id&&"product-picker"!=this.id||this.removeBubble_(),this.fire("yt-live-chat-icon-toggle-button-renderer-toggle",{targetId:this.id}))}, immediatelyShowTooltip_:function(){var a=this.$$("#tooltip");a.animationDelay=0;a.animationConfig={entry:[{name:"fade-in-animation",timing:{}}]};a.show()}, disabledChanged_:function(a){a?Polymer.dom(this).setAttribute("aria-disabled",""):Polymer.dom(this).removeAttribute("aria-disabled")}, computeShowTooltip_:function(a,b){return!!(a&&a.tooltip&&b)}, handleLiveChatActions_:function(a){a.length&&("creator"!=this.id&&"product-picker"!=this.id||a.forEach(function(b){(b=this.get("addLiveChatTickerItemAction.item.liveChatTickerPaidMessageItemRenderer",b))&&b.durationSec==b.fullDurationSec&&this.startBubble_(this.colorFromDecimal_(b.startBackgroundColor))},this))}, onAnimationEnd_:function(){Polymer.dom(this).removeAttribute("bubble")}, startBubble_:function(a){this.updateStyles({"--yt-live-chat-monetization-button-glow":a});Polymer.dom(this).setAttribute("bubble","")}, removeBubble_:function(){Polymer.dom(this).removeAttribute("bubble")}, colorFromDecimal_:function(a){a=parseInt(a,10);return"rgba("+[a>>16&255,a>>8&255,a&255,(a>>24&255)/255].join()+")"}});var zYa;var AYa;var $O={},aP={badgeType:function(a){return a?a.icon?a.icon.iconType.toLowerCase():a.customThumbnail?"member":"":""}, badgeTypeFromBadges:function(a){if(!a)return"";for(var b=0;b
";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zYa){var d=document.createElement("template");d.innerHTML=""; zYa=d}d=zYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return AYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},ariaLabel:{type:String,computed:"identity(data.accessibility.accessibilityData.label)",reflectToAttribute:!0},type:{type:String,computed:"badgeType(data)",reflectToAttribute:!0},sharedTooltipText:{type:String,computed:"identity(data.tooltip)",reflectToAttribute:!0}},behaviors:[aP],dataChanged_:function(a){for(var b=Polymer.dom(this.$.image);b.firstChild;)b.removeChild(b.firstChild);if(a)if(a.icon){var c=document.createElement("yt-icon");c.icon= "live-chat-badges:"+a.icon.iconType.toLowerCase();b.appendChild(c)}else if(a.customThumbnail){c=document.createElement("img");var d;(d=(d=wO(a.customThumbnail.thumbnails,16))?Xb(ac(d)):null)?(c.src=d,b.appendChild(c),c.setAttribute("alt",this.ariaLabel)):Am(new Ul("Could not compute URL for thumbnail",a.customThumbnail))}}, identity:function(a){return a}});var BYa;var CYa;Polymer({is:"yt-live-chat-author-chip",_template:function(){if(void 0!==CYa)return CYa;var a=document.createElement("template");a.innerHTML="[[getSimpleString(authorName)]]"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===BYa){var d=document.createElement("template");d.innerHTML=""; BYa=d}d=BYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return CYa=a}, properties:{authorName:{type:Object},authorBadges:{type:Array},authorType:{type:String,computed:"badgeTypeFromBadges(authorBadges)"},badgesInsideChip:{type:Array,computed:"computeBadgesInsideChip_(authorBadges)"},badgesOutsideChip:{type:Array,computed:"computeBadgesOutsideChip_(authorBadges)"},isHighlighted:{type:Boolean,computed:"computeIsHighlighted_(authorBadges)",reflectToAttribute:!0},showUnifiedVerifiedBadge:{type:Boolean,computed:"computeShowUnifiedVerifiedBadge_(authorBadges)",reflectToAttribute:!0}}, behaviors:[kO.YtComponentBehavior,Z,aP],stampDom:{badgesOutsideChip:{id:"chat-badges",mapping:{liveChatAuthorBadgeRenderer:{component:"yt-live-chat-author-badge-renderer"}}},badgesInsideChip:{id:"chip-badges",mapping:{liveChatAuthorBadgeRenderer:{component:"yt-live-chat-author-badge-renderer"}}}},computeBadgesInsideChip_:function(a){return!a||N("enable_unified_verified_badge_live_chat")?[]:a.filter(function(b){return"verified"==this.badgeType(b.liveChatAuthorBadgeRenderer)},this)}, computeBadgesOutsideChip_:function(a){return a?a.filter(function(b){b=this.badgeType(b.liveChatAuthorBadgeRenderer);return"verified"!=b&&"owner"!=b},this):[]}, computeIsHighlighted_:function(a){var b=!!this.getBadge(a,"owner"),c=!!this.getBadge(a,"verified");a=!!this.getBadge(a,"moderator");return b||c&&(!a||N("enable_unified_verified_badge_live_chat"))}, computeShowUnifiedVerifiedBadge_:function(a){return N("enable_unified_verified_badge_live_chat")&&!!this.getBadge(a,"verified")}});var DYa;var EYa;Polymer({is:"yt-live-chat-membership-item-renderer",_template:function(){if(void 0!==EYa)return EYa;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n \n
[[getSimpleString(data.headerPrimaryText)]]
\n
\n
[[getSimpleString(data.headerSubtext)]]
\n
\n
[[timestampString]]
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===DYa){var d=document.createElement("template");d.innerHTML=""; DYa=d}d=DYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return EYa=a}, properties:{data:{type:Object},hasPrimaryHeaderText:{type:Boolean,computed:"computeHasPrimaryHeaderText_(data)",reflectToAttribute:!0},showOnlyHeader:{type:Boolean,computed:"computeShowOnlyHeader_(data, isDeleted)",reflectToAttribute:!0},authorBadges:{type:Object,computed:"computeAuthorBadges_(data)"}},supportsInlineActionButtons:!0,behaviors:[X.YtRendererBehavior,MO.YtLiveChatItemBehavior,Z],observers:["isDeletedChanged_(isDeleted)","messageChanged_(data.message)"],ready:function(){var a=document.querySelector("yt-live-chat-app"); a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}, messageChanged_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, computeHasPrimaryHeaderText_:function(a){return!(!a||!a.headerPrimaryText)}, computeShowOnlyHeader_:function(a,b){return this.isMessageEmpty_(a,b)}, computeAuthorBadges_:function(a){return a.authorBadges||[]}, isMessageEmpty_:function(a,b){return!a||a.empty?!0:!a.message&&!a.inputField&&!b}, isDeletedChanged_:function(a){a&&(this.set("data.authorName",null),this.set("data.authorPhoto",null),this.set("data.message",null))}, getInputElement:function(){return this.$$("yt-live-chat-text-input-field-renderer")}, inputFocus:function(){var a=this.getInputElement();a&&a.focus()}, inputInsertEmoji:function(a){var b=this.getInputElement();b&&b.insertEmoji(a)}, inputMessage:function(){var a=this.getInputElement();return a&&this.data.inputField?(a.completeEmojis(),NO(a.liveChatRichMessageInput)):null}});var FYa;var GYa;Polymer({is:"yt-emoji-picker-category-button-renderer",_template:function(){if(void 0!==GYa)return GYa;var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===FYa){var d=document.createElement("template");d.innerHTML=""; FYa=d}d=FYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return GYa=a}, properties:{data:{type:Object,observer:"dataChanged_"},id:{type:String,computed:"computeId_(data.categoryId)",reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},icon:{type:String,readOnly:!0,computed:"computeIcon_(data.icon.iconType)"}},created:function(){this.tooltip_=null}, dataChanged_:function(a){a.tooltip&&(this.tooltip_||(this.tooltip_=document.createElement("paper-tooltip"),this.$.button.appendChild(this.tooltip_)),Polymer.dom(this.tooltip_).textContent=a.tooltip)}, computeId_:function(a){return a}, computeIcon_:function(a){return jO(a)}, onTap_:function(){this.active=!this.active;this.fire("yt-emoji-picker-select-category",{categoryId:this.id})}});var HYa;var IYa;Polymer({is:"yt-emoji-picker-category-renderer",_template:function(){if(void 0!==IYa)return IYa;var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===HYa){var d=document.createElement("template");d.innerHTML=""; HYa=d}d=HYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return IYa=a}, properties:{data:Object,id:{type:String,computed:"computeId_(data)"},emoji:{type:Array,computed:"computeEmoji_(data)",observer:"emojiChanged_"},skinTone:Number,emojiManager:{type:Object,observer:"emojiManagerChanged_"},focusedIndex:{type:Number,value:0},showFocus:{type:Boolean,value:!1},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaLabel_(data.title)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaActivedescendant_(emoji, focusedIndex)"}, domRepeatTargetFramerate:{type:Number,value:ik("live_chat_incremental_emoji_rendering_target_framerate")},domRepeatInitialCount:{type:Number,computed:"computeDomRepeatInitialCount_(domRepeatTargetFramerate)"}},behaviors:[xO.YtActionHandlerBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},listeners:{focus:"onFocus_",blur:"onBlur_",mouseover:"onMouseOver_",mousedown:"onMouseDown_",keydown:"onKeyDown_",click:"onClick_"},actionMap:{"yt-live-chat-emoji-skin-tone-changed":"emojiSkinToneChanged_"}, created:function(){this.ignoreNextFocus_=!1}, emojiChanged_:function(a){this.changeFocus_(0,!1);for(var b=zL(),c=0;c
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===LYa){var d=document.createElement("template");d.innerHTML=""; LYa=d}d=LYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return MYa=a}, properties:{data:Object,id:{type:String,computed:"computeId_(data)"},emoji:{type:Array,computed:"computeEmoji_(data)",observer:"emojiChanged_"},titleOffset:{type:Number,value:0,observer:"titleOffsetChanged_"},ariaLabel:{type:String,value:null,reflectToAttribute:!0,computed:"getFormattedStringRawText(data.upsell)"},ariaActivedescendant:{type:String,value:null,reflectToAttribute:!0,computed:"computeAriaActivedescendant_(focusedIndex)"},showFocus:{type:Boolean,value:!1},focusedIndex:{type:Number,value:0}, emojiManager:{type:Object}},listeners:{focus:"onFocus_",blur:"onBlur_",mousedown:"onMouseDown_",keydown:"onKeyDown_",click:"onEmojiTap_"},behaviors:[kO.YtComponentBehavior],hostAttributes:{"aria-live":"polite",role:"listbox",tabindex:0},created:function(){this.ignoreNextFocus_=!1}, emojiUrl:function(a){a=CO(this.emojiManager,a,!0).image.thumbnails;return wO(a,24)||""}, emojiAlt:function(a){var b=this.get("image.accessibility.accessibilityData.label",a);return b?b:a.isCustomEmoji?a.shortcuts[0]:a.emojiId}, emojiId:function(a){return"emoji"+a}, computeId_:function(a){return a.categoryId||""}, computeAriaActivedescendant_:function(a){return this.emoji&&a
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===JYa){var d=document.createElement("template");d.innerHTML=""; JYa=d}d=JYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return KYa=a}, properties:{data:Object,categories:{type:Array,value:function(){return[]}}, categoryButtons:{type:Array,value:function(){return[]}}, id:{type:String,computed:"computeId_(data)",reflectToAttribute:!0},selected:{type:Boolean,value:!1},placeholder:String,search:{type:String,value:"",observer:"searchChanged_"},searching:{type:Boolean,computed:"computeSearching_(search)",reflectToAttribute:!0},searchCategory:{type:Object,computed:"computeSearchCategory_(search)"},searchEmptyMessage:{type:String,computed:"computeSearchEmptyMessage_(searching, searchCategory)"},skinTone:{type:Number,computed:"identity(emojiManager.skinTone)",observer:"skinToneChanged_"}, skinToneOpened:{type:Boolean,value:!1},skinToneHidden:{type:Boolean,computed:"computeSkinToneHidden_(skinToneOpened, categories)"},emojiManager:Object},behaviors:[W.YtActionSenderBehavior,X.YtRendererBehavior,Z],listeners:{"yt-emoji-picker-select-category":"onSelectCategory_","yt-emoji-hover":"onEmojiHover_"},stampDom:{categories:{id:"categories",mapping:{emojiPickerCategoryRenderer:{component:"yt-emoji-picker-category-renderer",properties:{emojiManager:"[[emojiManager]]"}},emojiPickerUpsellCategoryRenderer:{component:"yt-emoji-picker-upsell-category-renderer", properties:{emojiManager:"[[emojiManager]]"}}}},categoryButtons:{id:"category-buttons",mapping:{emojiPickerCategoryButtonRenderer:"yt-emoji-picker-category-button-renderer"}}},observers:["updateCategoriesAndPlaceholder_(data, selected)"],identity:wb,created:function(){this.lastAnimationTime_=0;this.animationEnd_=this.animationStart_=null}, attached:function(){se&&(this.style.height=this.clientHeight+150+"px")}, updateCategoriesAndPlaceholder_:function(a,b){a&&b&&(this.categories=a.categories||[],this.categoryButtons=a.categoryButtons||[],this.resetPlaceholder(),this.search="",this.async(this.updateButtons_))}, computeId_:function(a){return a.id||""}, onScroll_:function(){null==this.animationEnd_&&window.requestAnimationFrame(this.updateButtons_.bind(this))}, onSelectCategory_:function(a){var b=""!=this.search;this.search="";for(var c=this.$.categories.children,d=0;d=this.numberOfStickerPacks&&(this.firstPackIndexInView=this.numberOfStickerPacks-this.numOfPacksToShift,this.isAtBack=!0)}; e.onScrollForwardWithAnimation_=function(){this.$["scroll-forward-button"].disabled||(this.recalculateScrollForwardPositions_(),this.animateScroll_())}; e.onScrollForwardWithoutAnimation_=function(){this.recalculateScrollForwardPositions_();this.$["sticker-tabs"].$.tabsContainer.scrollLeft=this.$.header.querySelectorAll("paper-tab")[this.firstPackIndexInView].offsetLeft}; e.animateScroll_=function(){var a=this.$["sticker-tabs"].$.tabsContainer.scrollLeft,b=this.$.header.querySelectorAll("paper-tab")[this.firstPackIndexInView].offsetLeft-a,c=this.$["scroll-forward-button"];this.$["scroll-back-button"].disabled=!0;c.disabled=!0;this.scroll_(0,12,0=c*d){var m=this.$["scroll-back-button"],n=this.$["scroll-forward-button"];l.$.tabsContainer.scrollLeft=f+d;m.disabled=!1;n.disabled=!1}else this.scrollHandler=window.requestAnimationFrame(function(){return h.scroll_(a,b,c,d,f)})}; e.onIronResize_=function(){this.hasScrollToPack&&this.debounce("resize",this.updateTabsProperties_.bind(this))}; e.onTrack_=function(a){a.preventDefault();a.stopPropagation()}; e.updateTabsProperties_=function(){var a=this.$["sticker-tabs"],b=a.clientWidth;if(0!=b)if(a=a.$.tabsContent.clientWidth,a\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===NYa){var d=document.createElement("template");d.innerHTML=""; NYa=d}d=NYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);OYa=a}a=OYa;return a}}}); var cP=bP;cP.prototype.closePreview_=cP.prototype.closePreview_;cP.prototype.onIronResize_=cP.prototype.onIronResize_;cP.prototype.onStickerClick_=cP.prototype.onStickerClick_;cP.prototype.dataChanged_=cP.prototype.dataChanged_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],cP.prototype,"ironResizableBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],cP.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],cP.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],cP.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],cP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],cP.prototype,"data",void 0);w([R(),x("design:type",Object)],cP.prototype,"selectedIndex",void 0);w([R(),x("design:type",Number)],cP.prototype,"numberOfStickerPacks",void 0); w([R(),x("design:type",Number)],cP.prototype,"numOfPacksToShift",void 0);w([R(),x("design:type",Boolean)],cP.prototype,"isAtFront",void 0);w([R(),x("design:type",Boolean)],cP.prototype,"isAtBack",void 0);w([R(),x("design:type",Object)],cP.prototype,"isPreviewHidden",void 0);w([R(),x("design:type",Object)],cP.prototype,"firstPackIndexInView",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cP.prototype,"dataChanged_",null); w([S("yt-super-sticker-open-preview"),x("design:type",Function),x("design:paramtypes",[Event,Object]),x("design:returntype",void 0)],cP.prototype,"onStickerClick_",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cP.prototype,"onIronResize_",null);w([S("yt-super-sticker-close-preview"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cP.prototype,"closePreview_",null); cP=w([fO({is:"yt-live-chat-paid-sticker-panel-renderer",noInjection:!0})],cP);var PYa;var QYa;var dP=function(){return O.apply(this,arguments)||this}; p(dP,O);dP.prototype.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; dP.prototype.onIconLoaded_=function(a){a=a.path?a.path[0]:a.target;a.parentNode&&a.parentNode.classList.add("icon-loaded")}; g.Object.defineProperties(dP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===QYa){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===PYa){var d=document.createElement("template");d.innerHTML=""; PYa=d}d=PYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);QYa=a}a=QYa;return a}}}); var eP=dP;eP.prototype.onIconLoaded_=eP.prototype.onIconLoaded_;w([P(X.YtRendererBehavior),x("design:type",Object)],eP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],eP.prototype,"data",void 0);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],eP.prototype,"onIconLoaded_",null);eP=w([fO({is:"yt-live-chat-super-sticker-pack-button-renderer",isInjectionRoot:!0})],eP);var RYa;var SYa;var fP=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-live-chat-set-dark-theme":"onDarkModeToggledAction_"};return a}; p(fP,O);e=fP.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme_=document.documentElement.hasAttribute("dark")}; e.preloadImage_=function(){if(this.data){var a=this.data.stickerImage,b=this.$$("#sticker");a&&a.thumbnails&&(b=wO(a.thumbnails,b.width,b.preferredThumbnail),new Image().src=b,a.webThumbnailDetailsExtensionData={isPreloaded:!0})}}; e.stringAsRawText=function(a){return nL(a)}; e.onDarkModeToggledAction_=function(a){this.isDarkTheme_=a}; e.updateBackground_=function(){var a=this.backgroundThumbnailUrl;a&&(this.$$("#container").style.backgroundImage="url("+a+")")}; g.Object.defineProperties(fP.prototype,{backgroundThumbnailUrl:{configurable:!0,enumerable:!0,get:function(){if(!this.data)return"";var a=this.data.backgroundImage;this.isDarkTheme_&&this.data.darkModeBackgroundImage&&(a=this.data.darkModeBackgroundImage);var b=this.$$("#container");a=wO(a.thumbnails,b.width,b.preferredThumbnail);0==a.indexOf("//")&&(a="https:"+a);return a}}}); g.Object.defineProperties(fP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===SYa){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
[[stringAsRawText(data.packTitle)]]
\n
[[stringAsRawText(data.packDescription)]]
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===RYa){var d=document.createElement("template");d.innerHTML=""; RYa=d}d=RYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);SYa=a}a=SYa;return a}}}); var gP=fP;gP.prototype.updateBackground_=gP.prototype.updateBackground_;gP.prototype.preloadImage_=gP.prototype.preloadImage_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],gP.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],gP.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],gP.prototype,"data",void 0);w([R(),x("design:type",Boolean)],gP.prototype,"isDarkTheme_",void 0); w([BE("data","isDarkTheme_"),x("design:type",String),x("design:paramtypes",[])],gP.prototype,"backgroundThumbnailUrl",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],gP.prototype,"preloadImage_",null);w([U("backgroundThumbnailUrl"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],gP.prototype,"updateBackground_",null);gP=w([fO({is:"yt-live-chat-super-sticker-pack-backstory-renderer",isInjectionRoot:!0})],gP);var TYa;var UYa;function VYa(a){if(a){var b=new Image;wc(b,a)}} function WYa(a){var b=new Image;return new Oi(function(c,d){b.addEventListener("load",function(){c()}); b.addEventListener("error",function(){d()}); wc(b,a)})} ;var hP=function(){var a=O.apply(this,arguments)||this;a.isStatic=!1;return a}; p(hP,O);e=hP.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={"enter:keydown":"onClick_"}}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.stringAsRawText=function(a){return nL(a)}; e.onClick_=function(){this.ytRendererBehavior.logExplicitClick(this.data);this.fire("yt-super-sticker-open-preview",this.data.command.previewSuperStickerCommand)}; e.onStickerLoaded_=function(){this.$.unselected.classList.add("sticker-loaded")}; e.preloadImage_=function(a){a=a.stickerSneakPeekImage;var b=this.$$("#selected");a&&a.thumbnails&&(a=wO(a.thumbnails,b.width,b.preferredThumbnail))&&VYa(a)}; e.onFocus_=function(){this.isStatic||(this.classList.add("focus"),this.ytRendererBehavior.markDirty())}; e.onBlur_=function(){this.isStatic||this.classList.remove("focus")}; e.computeIsStatic_=function(a){return a&&a.stickerImage&&a.stickerSneakPeekImage?a.stickerImage.thumbnails[0].url===a.stickerSneakPeekImage.thumbnails[0].url:!1}; e.updateChipStyles_=function(){var a=this.data;a&&(a={"--yt-live-chat-paid-sticker-chip-background-color":this.colorFromDecimal_(a.moneyChipBackgroundColor),"--yt-live-chat-paid-sticker-chip-text-color":this.colorFromDecimal_(a.moneyChipTextColor)},this.updateStyles(a))}; e.colorFromDecimal_=function(a){a=parseInt(a,10);return QN(a)}; g.Object.defineProperties(hP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===UYa){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n \n [[stringAsRawText(data.basePriceText)]]\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===TYa){var d=document.createElement("template");d.innerHTML=""; TYa=d}d=TYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);UYa=a}a=UYa;return a}}}); var iP=hP;iP.prototype.updateChipStyles_=iP.prototype.updateChipStyles_;iP.prototype.onBlur_=iP.prototype.onBlur_;iP.prototype.onFocus_=iP.prototype.onFocus_;iP.prototype.onStickerLoaded_=iP.prototype.onStickerLoaded_;iP.prototype.onClick_=iP.prototype.onClick_;w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],iP.prototype,"ironA11yKeysBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],iP.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],iP.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],iP.prototype,"ytRendererBehavior",void 0);w([R({observer:"preloadImage_"}),x("design:type",Object)],iP.prototype,"data",void 0);w([R({computed:"computeIsStatic_(data)"}),x("design:type",Object)],iP.prototype,"isStatic",void 0); w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],iP.prototype,"onClick_",null);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iP.prototype,"onStickerLoaded_",null);w([S("focus"),S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iP.prototype,"onFocus_",null); w([S("blur"),S("mouseout"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iP.prototype,"onBlur_",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iP.prototype,"updateChipStyles_",null);iP=w([fO({is:"yt-live-chat-super-sticker-pack-item-button-renderer",isInjectionRoot:!0})],iP);var XYa;var YYa;var jP=function(){var a=O.apply(this,arguments)||this;a.monitorScroll=!0;return a}; p(jP,O);jP.prototype.configureRendererStamper=function(){return{"data.superStickerPackItemButtons":{id:"pack-stickers",mapping:{superStickerPackItemButtonRenderer:"yt-live-chat-super-sticker-pack-item-button-renderer"}},"data.packBackstory":{id:"backstory",mapping:{superStickerPackBackstoryRenderer:"yt-live-chat-super-sticker-pack-backstory-renderer"}}}}; jP.prototype.attached=function(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1")}; g.Object.defineProperties(jP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===YYa){var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===XYa){var d=document.createElement("template");d.innerHTML=""; XYa=d}d=XYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);YYa=a}a=YYa;return a}}}); var kP=jP;w([P(Z),x("design:type",Object)],kP.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],kP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],kP.prototype,"data",void 0);kP=w([fO({is:"yt-live-chat-super-sticker-pack-renderer",isInjectionRoot:!0})],kP);var ZYa;var $Ya;var lP=function(){var a=O.apply(this,arguments)||this;a.authorPhotoSize=40;return a}; p(lP,O);e=lP.prototype;e.ready=function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}; e.dataChanged=function(){if(this.data&&this.data.sticker){var a=wO(this.data.sticker.thumbnails,this.stickerWidth);Xi(WYa(a),function(){Am(new Ul("Failed to load Super Sticker with url",a))})}}; e.onStickerLoaded=function(a){Polymer.dom(a).rootTarget.parentNode.classList.add("sticker-loaded")}; e.isDeletedChanged=function(){this.isDeleted&&(this.set("data.detailText",null),this.set("data.superStickerIcon",null),this.set("data.sticker",null))}; e.updateStickerStyles=function(){var a=this.data;a&&(a={"--yt-live-chat-paid-sticker-chip-background-color":this.ytPdgLiveChatItemBehavior.colorFromDecimal(a.moneyChipBackgroundColor),"--yt-live-chat-paid-sticker-chip-text-color":this.ytPdgLiveChatItemBehavior.colorFromDecimal(a.moneyChipTextColor),"--yt-live-chat-paid-sticker-background-color":this.ytPdgLiveChatItemBehavior.colorFromDecimal(a.backgroundColor),"--yt-live-chat-paid-sticker-author-name-text-color":this.ytPdgLiveChatItemBehavior.colorFromDecimal(a.authorNameTextColor)}, this.updateStyles(a))}; g.Object.defineProperties(lP.prototype,{stickerWidth:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.stickerDisplayWidth||96}}, stickerHeight:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.stickerDisplayWidth||96}}}); g.Object.defineProperties(lP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$Ya){var a=document.createElement("template");a.innerHTML="
[[timestampString]]
[[getSimpleString(data.authorName)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ZYa){var d=document.createElement("template");d.innerHTML=""; ZYa=d}d=ZYa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$Ya=a}a=$Ya;return a}}}); var mP=lP;mP.prototype.updateStickerStyles=mP.prototype.updateStickerStyles;mP.prototype.isDeletedChanged=mP.prototype.isDeletedChanged;mP.prototype.onStickerLoaded=mP.prototype.onStickerLoaded;mP.prototype.dataChanged=mP.prototype.dataChanged;w([P(pO.YtPdgLiveChatItemBehavior),x("design:type",Object)],mP.prototype,"ytPdgLiveChatItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],mP.prototype,"ytRendererBehavior",void 0); w([P(aP),x("design:type",Object)],mP.prototype,"ytLiveChatBadgeTypeBehavior",void 0);w([P(MO.YtLiveChatItemBehavior),x("design:type",Object)],mP.prototype,"ytLiveChatItemBehavior",void 0);w([R(),x("design:type",Object)],mP.prototype,"data",void 0);w([R(),x("design:type",Object)],mP.prototype,"authorPhotoSize",void 0);w([R(),x("design:type",Boolean)],mP.prototype,"isDeleted",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mP.prototype,"dataChanged",null);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],mP.prototype,"onStickerLoaded",null);w([BE("data"),x("design:type",Number),x("design:paramtypes",[])],mP.prototype,"stickerWidth",null);w([BE("data"),x("design:type",Number),x("design:paramtypes",[])],mP.prototype,"stickerHeight",null); w([U("isDeleted"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mP.prototype,"isDeletedChanged",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mP.prototype,"updateStickerStyles",null);mP=w([fO({is:"yt-live-chat-paid-sticker-renderer",isInjectionRoot:!0})],mP);var aZa;var bZa;var nP=function(){var a=O.apply(this,arguments)||this;a.selectedPage=0;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm_","yt-wallet-dialog-closed":"onWalletDialogClosed_","yt-wallet-dialog-completed":"onWalletDialogCompleted_","yt-open-payments-dialog":"onOpenPaymentsDialog_"};return a}; p(nP,O);e=nP.prototype;e.configureRendererStamper=function(){return{"data.buyButton":{id:"buy-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.stringAsRawText=function(a){return nL(a)}; e.handleSignalActionSubmitForm_=function(){var a=this.data.submitEndpoint;this.ytActionSenderBehavior.sendAction("yt-live-chat-start-buy-flow",[a,{sticker_params:a.ypcGetCartEndpoint.stickerParams},this.buyFlowCallback_.bind(this)])}; e.onBackClick_=function(){this.fire("yt-super-sticker-close-preview")}; e.onBuyButtonClick_=function(){var a=this.$.preview.clientHeight;this.$.loading.style.height=a+"px";this.$.blank.style.height=a+"px";this.selectedPage=1}; e.onCloseClick_=function(){this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")}; e.onWalletDialogClosed_=function(){this.selectedPage=0}; e.onWalletDialogCompleted_=function(){this.selectedPage=1}; e.onOpenPaymentsDialog_=function(){this.selectedPage=2}; e.closeBuyFlow=function(){this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")}; e.buyFlowCallback_=function(a){a.success?(a.response&&a.response.data&&a.response.data.actions&&this.ytActionSenderBehavior.sendAction("yt-live-chat-actions",[a.response.data.actions]),this.closeBuyFlow()):(this.selectedPage=0,a.errorMessageRenderer&&this.handleMessageRenderer_(a.errorMessageRenderer))}; e.handleMessageRenderer_=function(a){var b=lL(a,"renderer");if("confirmDialogRenderer"===b){var c=A("openPopupConfig");c&&this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}else this.ytLiveChatErrorMessageBehavior.setErrorRenderer(a)}; e.resetState=function(){this.ytLiveChatErrorMessageBehavior.setErrorRenderer(null)}; g.Object.defineProperties(nP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bZa){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n \n

[[stringAsRawText(data.headerText)]]

\n
\n
\n \n [[stringAsRawText(data.durationLabel)]]\n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===aZa){var d=document.createElement("template");d.innerHTML=""; aZa=d}d=aZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bZa=a}a=bZa;return a}}}); var oP=nP;w([P(iO.YtLiveChatErrorMessageBehavior),x("design:type",Object)],oP.prototype,"ytLiveChatErrorMessageBehavior",void 0);w([P(Z),x("design:type",Object)],oP.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],oP.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],oP.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],oP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],oP.prototype,"data",void 0);oP=w([V({is:"yt-live-chat-super-sticker-preview-renderer"})],oP);var cZa;var dZa,eZa=function(){if(void 0!==dZa)return dZa;var a=document.createElement("template");a.innerHTML=""; return dZa=a};var fZa;var gZa=[xO.YtActionHandlerBehavior,MO.YtLiveChatItemBehavior,{properties:{containerStyle:{type:dc,computed:"computeContainerStyle(data, ratio)"},dimmed:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Boolean,value:!1},ratio:{type:Number,value:0},ariaLabel:{type:String,value:null,reflectToAttribute:!0},shouldAnimateIn:Boolean,isAnimationPaused:{type:Boolean,value:!1,observer:"handleIsAnimationPausedChanged_"}},listeners:{click:"onClick_",keypress:"onKeyPress_"},observers:["updateWidthOnDataChanged_(data)", "deletedChanged_(isDeleted)"],hostAttributes:{role:"button",tabindex:0},behaviorActionMap_:{"yt-live-chat-pause-replay":"handlePauseReplay_","yt-live-chat-resume-replay":"handleResumeReplay_","yt-live-chat-replay-progress":"handleReplayProgress_"},attached:function(){this.registerActionMap(this.behaviorActionMap_)}, created:function(){this.countdownMs_=this.countdownDurationMs_=0;this.lastCountdownTimeMs_=null;this.detlaSincePausedSecs_=this.playerProgressSec_=this.rafId_=0}, updateWidthOnDataChanged_:function(){this.style.width="auto";this.style.overflow="visible"}, startCountdown:function(a,b){void 0!=a&&(this.countdownMs_=1E3*a,this.countdownDurationMs_=b?1E3*b:this.countdownMs_,this.ratio=1,this.lastCountdownTimeMs_||this.isAnimationPaused||(this.lastCountdownTimeMs_=performance.now(),this.rafId_=window.requestAnimationFrame(this.updateTimeout_.bind(this))))}, updateTimeout_:function(a){this.countdownMs_=Math.max(0,this.countdownMs_-(a-this.lastCountdownTimeMs_));this.ratio=this.countdownMs_/this.countdownDurationMs_;this.isAttached&&this.countdownMs_?(this.lastCountdownTimeMs_=a,this.rafId_=window.requestAnimationFrame(this.updateTimeout_.bind(this))):(this.lastCountdownTimeMs_=null,this.isAttached&&("auto"==this.style.width&&this.setContainerWidth(),this.slideDown_()))}, setContainerWidth:function(){var a=this.$.container.clientWidth;0==a?(this.style.overflow="visible",this.style.width="auto"):(this.style.overflow="hidden",this.shouldAnimateIn?(this.style.width=0,this.async(function(){this.style.width=a+"px"},1)):this.style.width=a+"px")}, slideDown_:function(){this.classList.add("sliding-down");this.async(this.collapse_,200)}, collapse_:function(){this.classList.add("collapsing");this.style.width="0";this.async(this.requestRemoval_,200)}, requestRemoval_:function(){this.fire("yt-live-chat-ticker-remove-ticker-item",this.data.id);this.classList.remove("sliding-down");this.classList.remove("collapsing");this.style.overflow="visible";this.style.width="auto"}, computeContainerStyle:function(a,b){if(!a)return ec({});var c=this.colorFromDecimal(a.startBackgroundColor);a=this.colorFromDecimal(a.endBackgroundColor);b=100*b+"%";return ec({background:"linear-gradient(90deg, "+c+","+c+" "+b+","+a+" "+b+","+a+")"})}, onClick_:function(){this.data.showItemEndpoint&&this.fire("yt-navigate",{endpoint:this.data.showItemEndpoint})}, onKeyPress_:function(a){if(13==a.keyCode)this.onClick_()}, deletedChanged_:function(a){a&&(this.style.overflow="visible",this.style.width="auto",this.async(this.setContainerWidth));if(a=this.get("data.showItemEndpoint.showLiveChatItemEndpoint.renderer"))a=Object.keys(a)[0],this.set("data.showItemEndpoint.showLiveChatItemEndpoint.renderer."+a+".deletedStateMessage",this.data.deletedStateMessage),this.selected&&this.fire("yt-live-chat-pinned-message-update")}, handlePauseReplay_:function(){this.isAnimationPaused=!0;this.detlaSincePausedSecs_=0}, handleResumeReplay_:function(){this.isAnimationPaused=!1}, handleIsAnimationPausedChanged_:function(a,b){a?window.cancelAnimationFrame(this.rafId_):!a&&b&&(a=this.lastCountdownTimeMs_,this.detlaSincePausedSecs_&&(a=this.lastCountdownTimeMs_+1E3*this.detlaSincePausedSecs_,this.detlaSincePausedSecs_=0),this.updateTimeout_(a),this.lastCountdownTimeMs_=window.performance.now())}, handleReplayProgress_:function(a){this.isAnimationPaused?this.detlaSincePausedSecs_=Math.floor(a-this.playerProgressSec_):this.playerProgressSec_=a}}];var pP=function(){return O.apply(this,arguments)||this}; p(pP,O);pP.prototype.dataChanged_=function(a){a&&(this.$.content.style.color=this.ytLiveChatTickerItemBehavior.colorFromDecimal(a.amountTextColor),this.ytLiveChatTickerItemBehavior.ariaLabel=this.ytLiveChatTickerItemBehavior.getSimpleString(a.amount),this.ytLiveChatTickerItemBehavior.startCountdown(a.durationSec,a.fullDurationSec),this.async(this.ytLiveChatTickerItemBehavior.setContainerWidth))}; g.Object.defineProperties(pP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fZa){var a=document.createElement("template");a.innerHTML="
\n
\n \n [[getSimpleString(data.amount)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(eZa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cZa){var d=document.createElement("template");d.innerHTML=""; cZa=d}d=cZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fZa=a}a=fZa;return a}}}); var qP=pP;w([P(pO.YtPdgLiveChatItemBehavior),x("design:type",Object)],qP.prototype,"ytPdgLiveChatItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],qP.prototype,"ytRendererBehavior",void 0);w([P(gZa),x("design:type",Object)],qP.prototype,"ytLiveChatTickerItemBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],qP.prototype,"data",void 0);qP=w([fO({is:"yt-live-chat-ticker-paid-message-item-renderer",isInjectionRoot:!0})],qP);var hZa;var iZa;var rP=function(){return O.apply(this,arguments)||this}; p(rP,O);rP.prototype.dataChanged_=function(a){a&&(1
\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(eZa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hZa){var d=document.createElement("template");d.innerHTML=""; hZa=d}d=hZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iZa=a}a=iZa;return a}}}); var sP=rP;w([P(pO.YtPdgLiveChatItemBehavior),x("design:type",Object)],sP.prototype,"ytPdgLiveChatItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],sP.prototype,"ytRendererBehavior",void 0);w([P(gZa),x("design:type",Object)],sP.prototype,"ytLiveChatTickerItemBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],sP.prototype,"data",void 0);sP=w([fO({is:"yt-live-chat-ticker-paid-sticker-item-renderer",isInjectionRoot:!0})],sP);var jZa=function(a){this.siteKey=a},kZa,lZa=function(){var a=A("RECAPTCHA_V3_SITEKEY"); if(!kZa){var b=Id("https://www.google.com/recaptcha/api.js?",{render:a});WI(b,function(){}); kZa=new jZa(a)}};var mZa=function(){this.replayQueue_=new RH;this.lastVideoOffsetTimeMsec=0}; mZa.prototype.addReplayChatItemAction=function(a){this.replayQueue_.enqueue(a);this.lastVideoOffsetTimeMsec=parseInt(a.videoOffsetTimeMsec||0,10)}; var nZa=function(a,b){for(var c=BHa(a.replayQueue_),d=[];c&&b>=parseInt(c.videoOffsetTimeMsec||0,10);)c=a.replayQueue_.dequeue(),d=d.concat(c.actions||[]),c=BHa(a.replayQueue_);return d}; mZa.prototype.clear=function(){this.replayQueue_.clear();this.lastVideoOffsetTimeMsec=0};var oZa=function(){this.lastUpdateTime_=this.estimatedUpdateInterval_=this.callback=null;this.messageQueue_=[];this.nextUpdateId_=null;this.pollResponseDelayQueue_=new RH}; oZa.prototype.enqueueActionGroup=function(a){if(this.lastUpdateTime_){var b=Xa()-this.lastUpdateTime_;this.pollResponseDelayQueue_.enqueue(b);5a&&(c=rZa(this))){a=(b-a)/c;break a}a=1}this.timestampScale_=a;this.currentTimestampUs_=sZa(this);this.animationFrameRequestId_||(this.lastUpdateTimeMs_=performance.now(),this.emitSmoothedMessages_(this.lastUpdateTimeMs_))}; var tZa=function(a){if(a.addChatItemAction){a=a.addChatItemAction.item;var b=Object.keys(a)[0];a=a[b];if(a.timestampUsec)return parseInt(a.timestampUsec,10)}return-1},sZa=function(a){a=k(a.actionQueue_); for(var b=a.next();!b.done;b=a.next())if(b=tZa(b.value),-1!=b)return b;return-1}; qZa.prototype.emitSmoothedMessages_=function(a){var b=this;if(this.callback&&this.actionQueue_.length){this.animationFrameRequestId_=window.requestAnimationFrame(function(f){return b.emitSmoothedMessages_(f)}); var c=a-this.lastUpdateTimeMs_;this.lastUpdateTimeMs_=a;this.emitDelayMs_-=c;this.currentTimestampUs_+=Math.floor(1E3*c*this.timestampScale_);if(!(0this.currentTimestampUs_)break;a=c+1}a&&(this.callback(this.actionQueue_.splice(0,a)),this.emitDelayMs_=84)}}else this.animationFrameRequestId_=0,this.actionQueue_.length=0};var uZa;var vZa;var wZa;var xZa;Polymer({is:"yt-live-chat-poll-choice",_template:function(){if(void 0!==xZa)return xZa;var a=document.createElement("template");a.innerHTML="\n \n
\n
\n
\n
\n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wZa){var d=document.createElement("template");d.innerHTML=""; wZa=d}d=wZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return xZa=a}, properties:{data:{type:Object,value:null},selected:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeSelected_(data.selected)"},voteRequestInFlight:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"voteRequestInFlightChanged"},hasVoted:{type:Boolean,value:!1,reflectToAttribute:!0},showSpinner:{type:Boolean,value:!1,reflectToAttribute:!0},command:{type:Object,computed:"identity(data.selectServiceEndpoint)"},signInEndpoint:{type:Object,computed:"identity(data.signinEndpoint)"},isWinning:{type:Boolean, value:!1,reflectToAttribute:!0},hasVotes:{type:Boolean,value:!1,computed:"computeHasVotes(data.voteRatio)",reflectToAttribute:!0}},behaviors:[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior],actionMap:{"yt-cancel-vote-action":"handleVoteRequestError_"},observers:["updateVoteBarStyles_(data, hasVoted)"],listeners:{"yt-service-request-error":"handleVoteRequestError_"},created:function(){this.boundOnClick_=this.onClick_.bind(this);this.spinnerTimerId_=null}, detached:function(){clearTimeout(this.spinnerTimerId_)}, identity:function(a){return a}, updateVoteBarStyles_:function(a,b){a&&a.voteRatio&&b&&this.updateStyles({"--yt-live-chat-poll-choice-vote-bar-transform":"translateX("+(100*a.voteRatio-100+"%)")})}, onClick_:function(){!this.hasVoted&&this.get("command.sendLiveChatVoteEndpoint")&&(this.set("data.selected",!0),this.sendServiceRequestAction([this.command]))}, handleVoteRequestError_:function(){this.set("data.selected",!1)}, computeSelected_:function(a){return void 0===a?!!this.selected:!!a}, computeHasVotes:function(){return this.data&&0\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===yZa){var d=document.createElement("template");d.innerHTML="";yZa=d}d=yZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return zZa=a}, properties:{id:{type:String,computed:"computeId(data.targetId)",reflectToAttribute:!0},data:{type:Object}},behaviors:[GWa.YtLiveChatTooltipTargetingBehavior],computeId:function(){return this.data&&this.data.targetId}});var AZa;var BZa;Polymer({is:"yt-live-chat-poll-header-renderer",_template:function(){if(void 0!==BZa)return BZa;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n
\n
\n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===AZa){var d=document.createElement("template");d.innerHTML=""; AZa=d}d=AZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return BZa=a}, properties:{data:{type:Object,observer:"dataChanged"},cachedData:{type:Object,computed:"computeCachedData(data)"},creatorPhoto:{type:Object,value:null,computed:"computeCreatorPhoto(cachedData.thumbnail, cachedData.liveChatPollType)"},gamePhoto:{type:Object,value:null,computed:"computeGamePhoto(cachedData.thumbnail, cachedData.liveChatPollType)"},inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[Z,MO.YtLiveChatItemBehavior],stampDom:{"cachedData.contextMenuButton":{id:"menu", events:!0,mapping:{buttonRenderer:"yt-live-chat-button"}}},listeners:{"yt-rendererstamper-finished":"onRenderStamperFinished_"},dataChanged:function(){this.data&&this.data.contextMenuButton&&(this.data.contextMenuEndpoint=this.get("contextMenuButton.buttonRenderer.command",this.data))}, computeCachedData:function(){return this.cachedData?this.cachedData:this.data}, computeCreatorPhoto:function(){if(this.cachedData)return"LIVE_CHAT_POLL_TYPE_STADIA"==this.cachedData.liveChatPollType&&this.cachedData.questionThumbnail||"LIVE_CHAT_POLL_TYPE_CREATOR"===this.cachedData.liveChatPollType?this.cachedData.thumbnail||null:null}, computeGamePhoto:function(){if(this.cachedData)return this.cachedData.questionThumbnail?this.cachedData.questionThumbnail:"LIVE_CHAT_POLL_TYPE_STADIA"===this.cachedData.liveChatPollType?this.cachedData.thumbnail||null:null}, onContextMenuButtonClick_:function(a){this.showContextMenu(a)}, onRenderStamperFinished_:function(){var a=this.get("cachedData.contextMenuButton.buttonRenderer.targetId");a&&(this.menuButton=this.$$("#"+a))}});var CZa;var DZa;Polymer({is:"yt-live-chat-poll-renderer",_template:function(){if(void 0!==DZa)return DZa;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===CZa){var d=document.createElement("template");d.innerHTML=""; CZa=d}d=CZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return DZa=a}, properties:{data:{type:Object},voteRequestInFlight:{type:Boolean,value:!1},endPollRequestInFlight:{type:Boolean,value:!1},hasClosed:{type:Boolean,value:!1},displayVoteResults:{type:Boolean,value:!1,computed:"computeDisplayVoteResults_(data.displayVoteResults)"},highlightWinningOption:{type:Boolean,value:!1,reflectToAttribute:!0},pollChoices:{type:Array,value:function(){return[]}}, inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0},isTransitioningCollapse:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[xO.YtActionHandlerBehavior,Z],stampDom:{"data.header":{id:"header",mapping:{pollHeaderRenderer:{component:"yt-live-chat-poll-header-renderer",properties:{inCollapsedBanner:"[[inCollapsedBanner]]"}}},stamperStableList:!0},pollChoices:{id:"poll-choice-container",mapping:{pollChoice:"yt-live-chat-poll-choice"},stamperStableList:!0},"data.button":{id:"button", mapping:{buttonRenderer:"yt-button-renderer"}}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-cancel-vote-action":"handleVoteRequestError_","yt-update-live-chat-poll-action":"handleUpdateLiveChatPollAction_"},listeners:{"yt-service-request-completed":"handleServiceRequestCompleted_","yt-service-request-error":"handleServiceRequestError_","yt-service-request-sent":"handleServiceRequestSent_"},observers:["updatePollChoices_(data.choices, voteRequestInFlight)","inCollapsedBannerChanged(inCollapsedBanner)"], created:function(){this.collapseTimerId_=null}, detached:function(){clearTimeout(this.collapseTimerId_)}, updatePollChoices_:function(a,b){var c=this;if(a){this.set("pollChoices",a.map(function(m){return{pollChoice:m}})); var d=this.displayVoteResults||b,f=0;if(this.highlightWinningOption)for(var h=1,l=a.length;ha[f].voteRatio&&(f=h);Array.prototype.forEach.call(this.$["poll-choice-container"].children,function(m,n){m.hasVoted=d;m.voteRequestInFlight=b;c.highlightWinningOption&&(m.isWinning=n===f,c.inCollapsedBanner&&c.slidePollChoice_(m))})}}, handleLiveChatActions_:function(a){var b=this;a.forEach(function(c){c.updateLiveChatPollAction&&b.handleUpdateLiveChatPollAction_(c)})}, handleUpdateLiveChatPollAction_:function(a){if(a=this.get("updateLiveChatPollAction.pollToUpdate.pollRenderer",a))this.set("data.displayVoteResults",a.displayVoteResults),this.displayVoteResults&&this.set("data.choices",a.choices),a.header&&this.set("data.header",a.header)}, computeDisplayVoteResults_:function(a){return this.displayVoteResults?!0:!!a}, inCollapsedBannerChanged:function(a){var b=Polymer.dom(this.$.header).firstElementChild;b&&(b.inCollapsedBanner=a,this.slidePollContents_(b))}, slidePollContents_:function(){var a=this;if(this.highlightWinningOption){clearTimeout(this.collapseTimerId_);this.isTransitioningCollapse=!0;var b=this.$$("yt-live-chat-poll-choice[is-winning]");this.inCollapsedBanner?(this.$["collapse-container"].style.height=this.$["collapse-container"].clientHeight+"px",this.slidePollChoice_(b),this.$["collapse-container"].style.height="0"):(this.$["collapse-container"].style.height="auto",b.style.transform="translateY(0)");this.collapseTimerId_=setTimeout(function(){a.isTransitioningCollapse= !1;a.collapseTimerId_=null},350)}}, slidePollChoice_:function(a){if(a.isWinning){var b=Polymer.dom(this.$.header).firstElementChild.$["content-top"].clientHeight;a.style.transform="translateY(-"+(b+a.offsetTop)+"px)"}else a.style.transform="translateY(0)"}, handleServiceRequestSent_:function(a){(a=this.get("detail.endpoint",a))&&a.sendLiveChatVoteEndpoint&&(this.voteRequestInFlight=!0)}, handleServiceRequestCompleted_:function(a,b){this.voteRequestInFlight=!1;this.endPollRequestInFlight&&b.data&&b.data.success&&(this.hasClosed=!0);this.endPollRequestInFlight=!1}, handleServiceRequestError_:function(){this.endPollRequestInFlight=!1;this.handleVoteRequestError_()}, handleVoteRequestError_:function(){this.voteRequestInFlight=!1}, onClickButton:function(a){a.stopPropagation()}, handleEndButtonAction:function(a){"yt-service-request"==a.detail.actionName&&(this.endPollRequestInFlight||this.hasClosed?a.stopPropagation():this.endPollRequestInFlight=!0)}});var EZa;var FZa;Polymer({is:"yt-live-interactivity-component-background",_template:function(){if(void 0!==FZa)return FZa;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===EZa){var d=document.createElement("template");d.innerHTML=""; EZa=d}d=EZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return FZa=a}, properties:{useLargeBackground:{type:Boolean,value:!1},ids:{type:Object}},created:function(){this.ids={background:wI(),maskOne:wI(),maskTwo:wI(),gradient:wI(),largeBackground:wI(),largeGradientOne:wI(),largeGradientTwo:wI(),largeGradientPath:wI()}}});Polymer({is:"yt-live-chat-action-panel-renderer",_template:function(){if(void 0!==vZa)return vZa;var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uZa){var d=document.createElement("template");d.innerHTML=""; uZa=d}d=uZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return vZa=a}, properties:{data:{type:Object},id:{type:String,computed:"computeId(data.id)"}},behaviors:[xO.YtActionHandlerBehavior,Z],stampDom:{"data.contents":{id:"contents",mapping:{pollRenderer:"yt-live-chat-poll-renderer"}}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-chat-item-action":"handleRemoveChatItemAction_","yt-mark-chat-item-as-deleted-action":"handleMarkChatItemAsDeletedAction_"},computeId:function(){return this.data&&this.data.id||""}, handleLiveChatActions_:function(a){a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=VQa(b);if(!c)break;"removeChatItemAction"===c?this.handleRemoveChatItemAction_(b):"markChatItemAsDeletedAction"===c&&this.handleMarkChatItemAsDeletedAction_(b)}}, handleRemoveChatItemAction_:function(a){this.handleRemoveAction_(a.removeChatItemAction)}, handleMarkChatItemAsDeletedAction_:function(a){this.handleRemoveAction_(a.markChatItemAsDeletedAction)}, handleRemoveAction_:function(a){this.id===a.targetItemId&&this.sendAction("yt-close-live-chat-action-panel-action",[{closeLiveChatActionPanelAction:{targetPanelId:this.id}}])}});var GZa;var HZa;var IZa;var JZa;Polymer({is:"yt-live-chat-text-message-renderer",_template:function(){if(void 0!==JZa)return JZa;var a=document.createElement("template");a.innerHTML="
[[timestampString]]\u200B[[getSimpleString(data.deletedStateMessage)]][[getSimpleString(data.showOriginalContentMessage)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===IZa){var d=document.createElement("template");d.innerHTML=""; IZa=d}d=IZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return JZa=a}, properties:{data:{type:Object,observer:"dataChanged_"},showOriginal:{type:Boolean,value:!1,reflectToAttribute:!0},isDimmed:{type:Boolean,value:!1,computed:"truthy(data.isDimmed)",reflectToAttribute:!0},showBar:{type:Boolean,computed:"computeShowBar_(isDeleted, hasOriginalContent, isDimmed)",reflectToAttribute:!0},authorBadges:{type:Object,computed:"computeAuthorBadges_(data)"},authorIsOwner:{type:Boolean,computed:"computeAuthorIsOwner_(data)",reflectToAttribute:!0},inCollapsedBanner:{type:Boolean, value:!1,reflectToAttribute:!0}},supportsInlineActionButtons:!0,behaviors:[X.YtRendererBehavior,aP,MO.YtLiveChatItemBehavior,Z],observers:["updateMessage_(data.message)"],dataChanged_:function(a){a=this.badgeTypeFromBadges(a.authorBadges||[]);this.setAttribute("author-type",a)}, updateMessage_:function(a){var b=Polymer.dom(this.$.message);b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, actionMessageChanged_:function(a){var b=this.$.action;b.textContent="";a&&b.appendChild(this.createDocumentFragment(a))}, onShowOriginalClick_:function(a){a.preventDefault();this.showOriginal=!0}, computeShowBar_:function(a,b,c){return a&&b||c}, computeAuthorBadges_:function(a){return a.authorBadges||[]}, computeAuthorIsOwner_:function(a){return!!this.getBadge(a.authorBadges,"owner")}});Polymer({is:"yt-live-chat-auto-mod-message-renderer",_template:function(){if(void 0!==HZa)return HZa;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===GZa){var d=document.createElement("template");d.innerHTML=""; GZa=d}d=GZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return HZa=a}, properties:{data:Object,emojiManager:Object,participantsManager:Object},supportsInlineActionButtons:!0,behaviors:[X.YtRendererBehavior,MO.YtLiveChatItemBehavior,Z],stampDom:{"data.infoDialogButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.autoModeratedItem":{id:"auto-moderated-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"},attributes:{"hide-inline-action-buttons":!0}}}}, "data.moderationButtons":{id:"moderation-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.additionalInlineActionButtons":{id:"additional-inline-action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var KZa;var LZa;Polymer({is:"yt-live-chat-banner-header-renderer",_template:function(){if(void 0!==LZa)return LZa;var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===KZa){var d=document.createElement("template");d.innerHTML=""; KZa=d}d=KZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return LZa=a}, properties:{data:{type:Object},inCollapsedBanner:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[MO.YtLiveChatItemBehavior,Z],stampDom:{"data.contextMenuButton":{id:"menu",events:!0,mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{id:"menu-button"}}}}},listeners:{"yt-rendererstamper-finished":"onRenderStamperFinished_"},observers:["dataChanged(data)"],onContextMenuButtonClick_:function(a){this.showContextMenu(a)}, dataChanged:function(){this.data&&this.data.contextMenuButton&&(this.data.contextMenuEndpoint=this.get("contextMenuButton.buttonRenderer.command",this.data))}, onRenderStamperFinished_:function(){this.menuButton=this.$$("#menu-button")}});var MZa;var NZa;var OZa;var PZa;var QZa;var RZa;var tP=function(){return O.apply(this,arguments)||this}; p(tP,O);e=tP.prototype;e.onProgressChanged=function(){var a,b=100*(null!==(a=this.progress)&&void 0!==a?a:0);this.updateStyles({"--progress-bar-completion":b+"%"})}; e.configureRendererStamper=function(){return{"data.donateButton":{id:"donate-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.getRaisedAmount=function(){var a,b=JSON.parse(JSON.stringify(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.raised));SZa(b,this.amountRaised);return b}; e.getTargetAmount=function(){var a,b=JSON.parse(JSON.stringify(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.goal));SZa(b,this.targetAmount);return b}; e.onTapDonate=function(){this.data&&this.data.liveChatDonationsEndpoint&&(this.fire("yt-live-chat-toggle-banner"),this.fire("yt-navigate",{endpoint:this.data.liveChatDonationsEndpoint}))}; g.Object.defineProperties(tP.prototype,{noGoal:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?0:a.goal)}}, targetAmount:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.targetAmount)&&void 0!==b?b:""}}, amountRaised:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.amountRaised)&&void 0!==b?b:""}}, progress:{configurable:!0,enumerable:!0,get:function(){var a,b;return null!==(b=null===(a=this.fundraiserStatsEntity)||void 0===a?void 0:a.progress)&&void 0!==b?b:0}}, hasGoalBeenReached:{configurable:!0,enumerable:!0,get:function(){return 1<=this.progress}}}); g.Object.defineProperties(tP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===RZa){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n \n
\n
\n\n \n\n \n\n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===QZa){var d=document.createElement("template");d.innerHTML=""; QZa=d}d=QZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);RZa=a}a=RZa;return a}}}); var uP=tP;uP.prototype.onProgressChanged=uP.prototype.onProgressChanged;w([P(Z),x("design:type",Object)],uP.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],uP.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],uP.prototype,"actionSenderBehavior",void 0);w([P(FWa),x("design:type",Object)],uP.prototype,"ytLiveChatReduxBehavior",void 0);w([R(),x("design:type",Object)],uP.prototype,"data",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],uP.prototype,"inCollapsedBanner",void 0);w([R({reflectToAttribute:!0}),BE("data.goal"),x("design:type",Boolean),x("design:paramtypes",[])],uP.prototype,"noGoal",null);w([U("progress"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uP.prototype,"onProgressChanged",null);w([R({selectorArgs:["data.fundraiserStatsEntityKey"],selector:function(a,b){return ML(a.entities,"updatableFundraiserStatsEntity",b)}}), x("design:type",Object)],uP.prototype,"fundraiserStatsEntity",void 0);w([BE("fundraiserStatsEntity"),x("design:type",String),x("design:paramtypes",[])],uP.prototype,"targetAmount",null);w([BE("fundraiserStatsEntity"),x("design:type",String),x("design:paramtypes",[])],uP.prototype,"amountRaised",null);w([BE("fundraiserStatsEntity"),x("design:type",Number),x("design:paramtypes",[])],uP.prototype,"progress",null); w([BE("progress"),x("design:type",Boolean),x("design:paramtypes",[])],uP.prototype,"hasGoalBeenReached",null);uP=w([V({is:"yt-live-chat-donations-progress-bar-renderer"})],uP);function SZa(a,b){a=k(a.runs);for(var c=a.next();!c.done;c=a.next())c=c.value,c.text=c.text.replace("$0",b)} ;var vP={};vP.YtdOpenPopupBehavior=[LO.YtOpenPopupBehavior,{_noAccessors:!0,created:function(){this.openPopupConfig=A("openPopupConfig")}}];var TZa;TO("itemSectionRenderer","buttonRenderer","ytd-button-renderer");TO("sharingRendererButtons","buttonRenderer","ytd-button-renderer");var wP=function(){return O.apply(this,arguments)||this}; p(wP,O);e=wP.prototype;e.created=function(){this.showTooltips=!0}; e.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; e.onHintIdChanged_=function(){var a=this,b,c,d=null===(c=null===(b=this.ytButtonBehavior.data)||void 0===b?void 0:b.hint)||void 0===c?void 0:c.hintRenderer;if(d&&d.hintId){var f=this.ytButtonBehavior.sendOptionalAction("yt-get-opened-popups-action");f=0<(f&&1===f.length?f[0]:[]).length;var h=[];"sponsor-pre-purchase"!==d.hintId||f?d.hintId.startsWith("sponsor-post-purchase")&&!f?h=yM("membership-manage"):d.hintId.startsWith("sponsorships-premium-freebie-pre-purchase")&&!f&&(h=yM("membership-freebie-join")): h=yM("membership-join");h&&Ck(Fk,function(){a.ytButtonBehavior.sendInnerTubeActions(h,a)})}}; e.onYtNavigate_=function(a){var b=this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.ytdOpenPopupBehavior.openPopup(b))}; e.onYtServiceRequestSent_=function(a,b){this.handleServiceRequestActions_(b)}; e.onServiceRequestCompleted_=function(a,b){this.handleServiceRequestActions_(b)}; e.handleServiceRequestActions_=function(a){if(a=a.actions)for(var b=0;b"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);TZa=a}a=TZa;return a}}}); var xP=wP;xP.prototype.onServiceRequestCompleted_=xP.prototype.onServiceRequestCompleted_;xP.prototype.onYtServiceRequestSent_=xP.prototype.onYtServiceRequestSent_;xP.prototype.onYtNavigate_=xP.prototype.onYtNavigate_;xP.prototype.onHintIdChanged_=xP.prototype.onHintIdChanged_;w([P(RO.YtButtonBehavior),x("design:type",Object)],xP.prototype,"ytButtonBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],xP.prototype,"ytdOpenPopupBehavior",void 0); w([U("data.hint.hintRenderer"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],xP.prototype,"onHintIdChanged_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],xP.prototype,"onYtNavigate_",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],xP.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],xP.prototype,"onServiceRequestCompleted_",null);xP=w([V({is:"ytd-button-renderer"})],xP);var UZa=document.createElement("template");UZa.innerHTML=""; document.head.appendChild(UZa.content);var VZa=document.createElement("template");VZa.innerHTML=""; document.head.appendChild(VZa.content);var WZa;var XZa;var g_a=function(){return O.apply(this,arguments)||this}; p(g_a,O); g.Object.defineProperties(g_a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===XZa){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===WZa){var d=document.createElement("template");d.innerHTML=""; WZa=d}d=WZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);XZa=a}a=XZa;return a}}}); var yP=g_a;w([P(X.YtRendererBehavior),x("design:type",Object)],yP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],yP.prototype,"data",void 0);yP=w([V({is:"ytd-ad-hover-text-button-renderer"})],yP);var h_a;var i_a;var zP=function(){return O.apply(this,arguments)||this}; p(zP,O);zP.prototype.dataChanged=function(){this.data&&this.data.isPreview&&(this.data.onClickCommand=void 0)}; zP.prototype.onHelpTap=function(a){this.data&&!this.data.isPreview&&this.data.informationDialog&&(this.fire("yt-navigate",{endpoint:{liveChatDialogEndpoint:{content:this.data.informationDialog}}}),a.preventDefault(),a.stopPropagation())}; g.Object.defineProperties(zP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i_a){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h_a){var d=document.createElement("template");d.innerHTML=""; h_a=d}d=h_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i_a=a}a=i_a;return a}}}); var AP=zP;AP.prototype.dataChanged=AP.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],AP.prototype,"ytRendererBehavior",void 0);w([P([W.YtActionSenderBehavior]),x("design:type",Object)],AP.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],AP.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],AP.prototype,"inCollapsedBanner",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],AP.prototype,"dataChanged",null);AP=w([V({is:"ytd-live-chat-product-item-renderer"})],AP);var j_a=document.createElement("template");j_a.innerHTML=""; document.head.appendChild(j_a.content);var k_a=document.createElement("template");k_a.innerHTML=""; document.head.appendChild(k_a.content);var l_a=document.createElement("template");l_a.innerHTML=""; document.head.appendChild(l_a.content);Polymer({is:"yt-live-chat-banner-renderer",_template:function(){if(void 0!==PZa)return PZa;var a=document.createElement("template");a.innerHTML="\n\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===OZa){var d=document.createElement("template");d.innerHTML=""; OZa=d}d=OZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return PZa=a}, properties:{data:{type:Object},id:{type:String,computed:"computeId(data.actionId)"},collapsed:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:String,value:"0",reflectToAttribute:!0},disableStateChange:{type:Boolean,value:!1},shouldUseLargeBackground:{type:Boolean,value:!1,computed:"computeShouldUseLargeBackground(isPollBanner)"},isPollBanner:{type:Boolean,value:!1,computed:"computeIsPollBanner(data.contents)",reflectToAttribute:!0},isIndeterminate:{type:Boolean,value:!1,computed:"computeIsIndeterminate(data.contents)"}, emojiManager:Object},behaviors:[Z,Polymer.IronA11yKeysBehavior],stampDom:{"data.contents":{id:"contents",events:!0,mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{inCollapsedBanner:"[[collapsed]]",emojiManager:"[[emojiManager]]"}},liveChatProductItemRenderer:{component:"ytd-live-chat-product-item-renderer",properties:{inCollapsedBanner:"[[collapsed]]",emojiManager:"[[emojiManager]]"}},donationsProgressBarRenderer:{component:"yt-live-chat-donations-progress-bar-renderer", properties:{inCollapsedBanner:"[[collapsed]]"}},pollRenderer:{component:"yt-live-chat-poll-renderer",properties:{inCollapsedBanner:"[[collapsed]]"},attributes:{"highlight-winning-option":!0,"in-banner":!0}}}},"data.header":{id:"header",mapping:{liveChatBannerHeaderRenderer:"yt-live-chat-banner-header-renderer"}}},observers:["collapsedChanged(collapsed)"],listeners:{click:"onClick_","yt-live-chat-toggle-banner":"toggleBanner"},keyBindings:{space:"onKeyPress_",enter:"onKeyPress_"},created:function(){this.boundOnWindowClick_= this.onWindowClick_.bind(this)}, attached:function(){this.startCollapseTimeout();window.addEventListener("click",this.boundOnWindowClick_)}, detached:function(){this.stopCollapseTimeout();window.removeEventListener("click",this.boundOnWindowClick_)}, computeId:function(a){return a}, computeShouldUseLargeBackground:function(){return this.isPollBanner}, computeIsPollBanner:function(){return!!this.data.contents&&!!this.data.contents.pollRenderer}, computeIsIndeterminate:function(){return!!this.data.contents&&!!this.data.contents.pollRenderer}, startCollapseTimeout:function(){var a=this;this.collapseTimeout=setTimeout(function(){a.disableStateChange||(a.collapsed=!0)},2E4)}, stopCollapseTimeout:function(){this.collapseTimeout&&(clearTimeout(this.collapseTimeout),delete this.collapseTimeout)}, collapsedChanged:function(a){var b=Polymer.dom(this.$.contents).firstElementChild,c=Polymer.dom(this.$.header).firstElementChild;[b,c].forEach(function(d){d&&(d.inCollapsedBanner=a)}); a&&this.stopCollapseTimeout();this.slideBannerContents_(b)}, slideBannerContents_:function(){this.isPollBanner||(this.collapsed?(this.$.contents.style.height=this.$.contents.clientHeight+"px",this.$.contents.style.transform="translateY(-"+this.$.header.clientHeight+"px)",this.$.contents.style.height="0"):(this.$.contents.style.height="auto",this.$.contents.style.transform="translateY(0)"))}, toggleBanner:function(){this.disableStateChange||(this.collapsed=!this.collapsed)}, onClick_:function(a){var b=this;(a=Kg(a.target,function(c){return"A"===c.tagName||c===b.$.contents},!0))&&a!==this.$.contents||this.toggleBanner()}, onKeyPress_:function(){document.activeElement===this&&this.toggleBanner()}, onWindowClick_:function(a){if(!this.collapsed&&!this.disableStateChange){a=a.target;var b=document.querySelector("yt-live-chat-app");b&&b.contains(a)&&!Lg(a,"yt-live-chat-dialog-renderer")&&!this.contains(a)&&(this.collapsed=!0)}}});var m_a=["liveChatTextMessageRenderer","liveChatProductItemRenderer"],n_a=["pollRenderer"]; Polymer({is:"yt-live-chat-banner-manager",_template:function(){if(void 0!==NZa)return NZa;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===MZa){var d=document.createElement("template");d.innerHTML=""; MZa=d}d=MZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return NZa=a}, properties:{id:{type:String,computed:"computeId(visibleBanners.*)",reflectToAttribute:!0},emojiManager:Object,visiblePinnedBanner:{type:Object,computed:"computeVisiblePinnedBanner(visibleBanners.*)"},visibleIndeterminateBanner:{type:Object,computed:"computeVisibleIndeterminateBanner(visibleBanners.*)"},visibleBanners:{type:Array,value:function(){return[]}}, hasVisibleBanner:{type:Boolean,computed:"computeHasVisibleBanner(visibleBanners.*)",reflectToAttribute:!0},bannerQueue:{type:Array,value:function(){return[]}}}, behaviors:[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,GWa.YtLiveChatTooltipTargetingBehavior,Z],stampDom:{visibleBanners:{id:"visible-banners",mapping:{liveChatBannerRenderer:{component:"yt-live-chat-banner-renderer",properties:{emojiManager:"[[emojiManager]]"}}},reuseComponents:!1,stamperStableList:!1}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-banner-for-live-chat-command":"handleRemoveBannerForLiveChatCommand_","yt-remove-chat-item-action":"handleRemoveChatItemAction_", "yt-mark-chat-item-as-deleted-action":"handleMarkChatItemAsDeletedAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleMarkChatItemsByAuthorAsDeletedAction_"},observers:["onVisibleBannersOrBannerQueueChanged(visibleBanners.*, bannerQueue.splices)","onVisiblePinnedBannerChange(visiblePinnedBanner)"],created:function(){this.boundIsPinnedBanner_=this.isPinnedBanner_.bind(this);this.boundIsIndeterminateBanner_=this.isIndeterminateBanner_.bind(this);this.isTransitioningBanner=!1;this.liveChatActionMap_= {addBannerToLiveChatCommand:"handleAddBannerToLiveChatCommand_",removeBannerForLiveChatCommand:"handleRemoveBannerForLiveChatCommand_",removeChatItemAction:"handleRemoveChatItemAction_",markChatItemAsDeletedAction:"handleMarkChatItemAsDeletedAction_",markChatItemsByAuthorAsDeletedAction:"handleMarkChatItemsByAuthorAsDeletedAction_"}}, reset:function(){this.visibleBanners=[];this.bannerQueue=[];this.isTransitioningBanner=!1}, onVisibleBannersOrBannerQueueChanged:function(){if(this.bannerQueue.length&&!this.isTransitioningBanner){this.isTransitioningBanner=!0;var a=this.bannerQueue.shift();if(this.visiblePinnedBanner&&this.isPinnedBanner_(a)){var b=this.visibleBanners.findIndex(this.boundIsPinnedBanner_);this.splice("visibleBanners",b,1)}else this.visibleIndeterminateBanner&&this.isIndeterminateBanner_(a)?(b=this.visibleBanners.findIndex(this.boundIsIndeterminateBanner_),this.splice("visibleBanners",b,1)):b=this.visibleBanners.length; this.splice("visibleBanners",b,0,a);this.isTransitioningBanner=!1}}, onVisiblePinnedBannerChange:function(){this.sendOptionalAction("yt-visible-banner-change",[this.visiblePinnedBanner])}, computeId:function(){return 0===this.visibleBanners.length?"live-chat-banner":this.visibleBanners[0].liveChatBannerRenderer.targetId}, computeHasVisibleBanner:function(){return 0
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A_a){var d=document.createElement("template");d.innerHTML=""; A_a=d}d=A_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return B_a=a}, properties:{dockedItem:{type:Object},undockingItem:{type:Object},emojiManager:Object,participantsManager:Object,isUndocking:{type:Boolean,reflectToAttribute:!0,value:!1},dockableMessages:{type:Array},isScrolledToBottomOfItemList:{type:Boolean,observer:"isScrolledToBottomOfItemListChanged_"}},behaviors:[Z],observers:["onDockableMessagesChanged_(dockableMessages.splices)"],stampDom:{dockedItem:{id:"docked-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}}}},undockingItem:{id:"undocking-item",mapping:{liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}}},STICKY_CHAT_DOCK_TIME_MS:1E4,STICKY_CHAT_UNDOCK_TRANSITION_TIME_MS:250,MESSAGE_TO_TOP_EPSILON:8,created:function(){this.boundCheckIntersections_=this.checkIntersections_.bind(this);this.intersectRAF_=null}, detached:function(){this.intersectRAF_&&window.cancelAnimationFrame(this.intersectRAF_)}, clear:function(){this.undock_()}, dock_:function(a){this.dockedItem&&this.undock_();this.dockedItem={liveChatTextMessageRenderer:a.data};this.dockTimer=window.setTimeout(this.undock_.bind(this),this.STICKY_CHAT_DOCK_TIME_MS)}, undock_:function(){!this.isUndocking&&this.dockedItem&&(window.clearTimeout(this.dockTimer),this.isUndocking=!0,this.undockingItem=this.dockedItem,this.dockedItem=void 0,window.setTimeout(function(){this.undockingItem=void 0;this.isUndocking=!1}.bind(this),this.STICKY_CHAT_UNDOCK_TRANSITION_TIME_MS))}, checkIntersections_:function(){if(this.dockableMessages.length){this.intersectRAF_=window.requestAnimationFrame(this.boundCheckIntersections_);var a=this.dockableMessages[0],b=this.getBoundingClientRect();a=a.getBoundingClientRect();var c=a.top-b.top,d=c<=this.MESSAGE_TO_TOP_EPSILON;c=c-this.clientHeight<=this.MESSAGE_TO_TOP_EPSILON;if(d){for(var f;d;){f=this.dockableMessages.shift();d=this.dockableMessages[0];if(!d)break;d=d.getBoundingClientRect();c=d.top-b.top;var h=c<=this.MESSAGE_TO_TOP_EPSILON; if(c-a.height<=this.MESSAGE_TO_TOP_EPSILON)if(h)a=d;else return;d=h}this.dock_(f)}else c&&this.dockedItem&&this.clear()}else this.intersectRAF_=null}, trimInvisibleDockableMessages_:function(){if(this.parentElement)for(var a=this.parentElement.scrollTop;this.dockableMessages&&this.dockableMessages.length&&(this.dockableMessages[0].offsetTop
[[getSimpleString(data.authorName)]]
[[getSimpleString(data.text)]]
[[timestampString]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C_a){var d=document.createElement("template");d.innerHTML=""; C_a=d}d=C_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return D_a=a}, properties:{data:Object},behaviors:[X.YtRendererBehavior,MO.YtLiveChatItemBehavior],ready:function(){var a=document.querySelector("yt-live-chat-app");a&&a.hasAttribute("dashboard-money-feed")&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}});var E_a;var F_a;var CP=function(){var a=O.apply(this,arguments)||this;a.showOverflowButton=!1;a.isViewSelectorDisabled=!1;a.actionMap={"yt-live-chat-seek-start":"disableViewSelector","yt-live-chat-reload-start":"disableViewSelector","yt-live-chat-reload-success":"enableViewSelector","yt-live-chat-reload-fail":"enableViewSelector","yt-live-chat-seek-success":"enableViewSelector","yt-live-chat-seek-fail":"enableViewSelector"};return a}; p(CP,O);e=CP.prototype;e.configureRendererStamper=function(){return{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.viewSelector":{id:"view-selector",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; e.ready=function(){this.popupPositionTarget=this.ytIconButton}; e.onMenuClick=function(){var a,b;(null===(b=null===(a=this.data)||void 0===a?void 0:a.overflowMenu)||void 0===b?0:b.menuRenderer)&&this.ytOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data.overflowMenu.menuRenderer}}})}; e.computeShowOverflowButton=function(a){return!!a&&!!a.overflowMenu}; e.disableViewSelector=function(){this.isViewSelectorDisabled=!0}; e.enableViewSelector=function(){this.isViewSelectorDisabled=!1}; e.viewSelectorDisabledChanged=function(){var a=this.$$("yt-sort-filter-sub-menu-renderer");a&&(a.disabled=this.isViewSelectorDisabled)}; g.Object.defineProperties(CP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F_a){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.titleText)]]\n \n
\n
\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E_a){var d=document.createElement("template");d.innerHTML=""; E_a=d}d=E_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F_a=a}a=F_a;return a}}}); var DP=CP;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],DP.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],DP.prototype,"ytActionSenderBehavior",void 0);w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],DP.prototype,"ytOpenPopupBehavior",void 0);w([P(Z),x("design:type",Object)],DP.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],DP.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],DP.prototype,"data",void 0);w([R({computed:"computeShowOverflowButton(data)"}),x("design:type",Boolean)],DP.prototype,"showOverflowButton",void 0);w([R({observer:"viewSelectorDisabledChanged"}),x("design:type",Boolean)],DP.prototype,"isViewSelectorDisabled",void 0);w([R(),x("design:type",HTMLElement)],DP.prototype,"popupPositionTarget",void 0);w([CE("#overflow"),x("design:type",HTMLElement)],DP.prototype,"ytIconButton",void 0); DP=w([V({is:"yt-live-chat-header-renderer"})],DP);var G_a;var H_a;Polymer({is:"yt-reload-continuation",behaviors:[X.YtRendererBehavior],properties:{data:Object},trigger:function(){this.fire("yt-load-reload-continuation",this.getContinuationUrl.bind(this))}, getContinuationUrl:function(a){var b={ctoken:this.data.continuation,continuation:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Id(a,b)}});var I_a;var J_a;Polymer({is:"yt-dropdown-menu",_template:function(){if(void 0!==J_a)return J_a;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I_a){var d=document.createElement("template");d.innerHTML=""; I_a=d}d=I_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return J_a=a}, behaviors:[kO.YtComponentBehavior,OO.YtEndpointBehavior],properties:{data:{type:Object,observer:"dataChanged_"},selected:Number,useLabel:{type:Boolean,value:!1},icon:String,iconLabel:String,ariaLabel:String,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},menuExpanded:{type:String,value:"false"},closeOnActivate:{type:Boolean,value:!1}},listeners:{"iron-activate":"onIronActivate_",tap:"onTap_","iron-overlay-closed":"onMenuClose_"},dataChanged_:function(a){this.selected=void 0;var b=this.computeSelectedIndex_(a); 0<=b&&(this.selected=b);a=a&&1=this.data.length?a.stopPropagation():this.menuExpanded="true"}, onIronActivate_:function(a){a=a.detail.item;var b=this.$.repeat.itemForElement(a);b&&b.serviceEndpoint?(this.sendServiceRequestAction([b.serviceEndpoint]),this.fire("yt-playlist-reloading")):o_a(a)}, onTap_:function(a){a.preventDefault()}, onItemTap_:function(a){this.onEndpointTap_(a)}, onLinkFocus_:function(a){try{var b=Polymer.dom(a).localTarget}catch(d){}if(b){var c=b.querySelector("paper-item");c&&this.debounce("focus",function(){c.focus()})}}, onMenuClose_:function(){this.menuExpanded="false"}, computeHasSubtitle_:function(a){return!!a}, computeHrefForItem_:function(a){return this.computeHref_(this.computeEndpoint_(a))}});Polymer({is:"yt-sort-filter-sub-menu-renderer",_template:function(){if(void 0!==H_a)return H_a;var a=document.createElement("template");a.innerHTML="[[data.tooltip]]\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G_a){var d=document.createElement("template");d.innerHTML=""; G_a=d}d=G_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return H_a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object,isRightAligned:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},closeOnActivate:{type:Boolean,value:!1}},computeHorizontalAlign_:function(a){return a?"right":"left"}, computeAccessibilityLabel_:function(a){return this.get("accessibility.accessibilityData.label",a)}});var K_a;var L_a;var M_a;var N_a;var EP=function(){var a=O.apply(this,arguments)||this;a.hidden=!1;a.supportsInlineActionButtons=!0;return a}; p(EP,O);EP.prototype.ready=function(){var a=document.querySelector("yt-live-chat-app");(null===a||void 0===a?0:a.hasAttribute("dashboard-money-feed"))&&Polymer.dom(this).setAttribute("dashboard-money-feed","")}; EP.prototype.dataChanged=function(a){var b=Polymer.dom(this.$["detail-text"]);b.textContent="";(null===a||void 0===a?0:a.detailText)&&b.appendChild(this.ytLiveChatItemBehavior.createDocumentFragment(a.detailText))}; g.Object.defineProperties(EP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===N_a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
[[getSimpleString(data.authorName)]]
\n
[[getSimpleString(data.eventText)]]
\n
\n
\n
[[timestampString]]
\n
\n
\n \n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M_a){var d=document.createElement("template");d.innerHTML=""; M_a=d}d=M_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);N_a=a}a=N_a;return a}}}); var FP=EP;w([P(X.YtRendererBehavior),x("design:type",Object)],FP.prototype,"ytRendererBehavior",void 0);w([P(MO.YtLiveChatItemBehavior),x("design:type",Object)],FP.prototype,"ytLiveChatItemBehavior",void 0);w([P(Z),x("design:type",Object)],FP.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],FP.prototype,"data",void 0);w([R({computed:"truthy(isDeleted)",reflectToAttribute:!0}),x("design:type",Boolean)],FP.prototype,"hidden",void 0); FP=w([V({is:"yt-live-chat-legacy-paid-message-renderer"})],FP);var O_a;var P_a;var Q_a;var R_a;Polymer({is:"yt-live-chat-message-subtext-renderer",_template:function(){if(void 0!==R_a)return R_a;var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q_a){var d=document.createElement("template");d.innerHTML="";Q_a=d}d=Q_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild); return R_a=a}, properties:{data:Object}});Polymer({is:"yt-live-chat-message-renderer",_template:function(){if(void 0!==P_a)return P_a;var a=document.createElement("template");a.innerHTML="\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O_a){var d=document.createElement("template");d.innerHTML=""; O_a=d}d=O_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return P_a=a}, properties:{data:Object,subtextOnBottom:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[X.YtRendererBehavior,Z],stampDom:{"data.button":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.subtext":{id:"subtext",mapping:{messageSubtextRenderer:"yt-live-chat-message-subtext-renderer"}}}});var S_a;var T_a;Polymer({is:"yt-live-chat-mode-change-message-renderer",_template:function(){if(void 0!==T_a)return T_a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S_a){var d=document.createElement("template");d.innerHTML=""; S_a=d}d=S_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return T_a=a}, properties:{data:Object},behaviors:[Z],stampDom:{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var U_a;var V_a;Polymer({is:"yt-live-chat-moderation-message-renderer",_template:function(){if(void 0!==V_a)return V_a;var a=document.createElement("template");a.innerHTML="
\n [[timestampString]]\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U_a){var d=document.createElement("template");d.innerHTML=""; U_a=d}d=U_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return V_a=a}, properties:{data:Object},behaviors:[X.YtRendererBehavior,MO.YtLiveChatItemBehavior]});var W_a;Polymer({is:"yt-live-chat-placeholder-item-renderer",_template:function(){if(void 0!==W_a)return W_a;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);return W_a=a}, properties:{data:Object}});var X_a;var Y_a;Polymer({is:"yt-live-chat-server-error-message",_template:function(){if(void 0!==Y_a)return Y_a;var a=document.createElement("template");a.innerHTML="[[timestampString]]\n[[data.message]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X_a){var d=document.createElement("template");d.innerHTML=""; X_a=d}d=X_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Y_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},timestampString:{type:String,computed:"computeTimestampString_(data.timestampUsec)"}},TIME_FORMATTER:new wH(7),dataChanged_:function(a,b){a&&a.class&&this.toggleClass(a.class,!0);b&&b.class&&this.toggleClass(b.class,!1)}, computeTimestampString_:function(a){return this.TIME_FORMATTER.format(new Date(a/1E3))}});var Z_a;var $_a;Polymer({is:"yt-live-chat-toast-renderer",_template:function(){if(void 0!==$_a)return $_a;var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z_a){var d=document.createElement("template");d.innerHTML=""; Z_a=d}d=Z_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $_a=a}, properties:{message:{type:Object},text:{type:Object,computed:"computeText_(message)",observer:"handleTextChanged_"},actionButton:{type:Object,computed:"computeActionButton_(message)"},isShowingMessage:{type:Boolean,value:!1,reflectToAttribute:!0},isMessageVisible:{type:Boolean,value:!1,reflectToAttribute:!0}},listeners:{transitionend:"onTransitionEnd_"},behaviors:[Z,xO.YtActionHandlerBehavior],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-live-chat-add-to-toast-action":"handleAction_"}, stampDom:{actionButton:{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.queuedMessages_=[];this.clearTimeout_=this.toastTimeout_=null}, queueMessage_:function(a){this.queuedMessages_.push(a);this.maybeShowMessage_()}, maybeShowMessage_:function(){this.clearTimeout_||this.toastTimeout_||!this.queuedMessages_.length||(Polymer.dom(this).setAttribute("role","alert"),this.message=this.queuedMessages_.shift(),this.isShowingMessage=this.isMessageVisible=!0,this.toastTimeout_=this.async(function(){this.toastTimeout_=null;this.dismissMessage()},this.actionButton?5E3:3E3))}, dismissMessage:function(){this.toastTimeout_&&(this.cancelAsync(this.toastTimeout_),this.toastTimeout_=null);this.isShowingMessage=!1;Polymer.dom(this).removeAttribute("role");this.clearTimeout_=this.async(function(){this.clearTimeout_=this.message=null;this.isMessageVisible=!1;this.maybeShowMessage_()},500)}, onTransitionEnd_:function(){if(this.isShowingMessage){var a=ok(this);a&&a.focus()}}, handleLiveChatActions_:function(a){a.forEach(this.handleAction_.bind(this))}, handleAction_:function(a){a.liveChatAddToToastAction&&this.queueMessage_(a.liveChatAddToToastAction)}, computeText_:function(a){return a&&a.item?a.item.notificationTextRenderer&&a.item.notificationTextRenderer.successResponseText?a.item.notificationTextRenderer.successResponseText:a.item.notificationActionRenderer&&a.item.notificationActionRenderer.responseText?a.item.notificationActionRenderer.responseText:null:null}, handleTextChanged_:function(a){a?(a=nL(a),Polymer.dom(this).setAttribute("aria-label",a)):Polymer.dom(this).removeAttribute("aria-label")}, computeActionButton_:function(a){return a&&a.item?a.item.notificationActionRenderer&&a.item.notificationActionRenderer.actionButton?a.item.notificationActionRenderer.actionButton:null:null}});var a0a;var b0a;Polymer({is:"yt-live-chat-viewer-engagement-message-renderer",_template:function(){if(void 0!==b0a)return b0a;var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(GO().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a0a){var d=document.createElement("template");d.innerHTML=""; a0a=d}d=a0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return b0a=a}, properties:{data:Object},behaviors:[X.YtRendererBehavior,MO.YtLiveChatItemBehavior,Z],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}}});var c0a;var d0a;var GP=function(){return O.apply(this,arguments)||this}; p(GP,O);GP.prototype.onHelpTap=function(a){this.data&&this.data.informationDialog&&(this.fire("yt-navigate",{endpoint:{liveChatDialogEndpoint:{content:this.data.informationDialog}}}),a.preventDefault(),a.stopPropagation())}; g.Object.defineProperties(GP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d0a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c0a){var d=document.createElement("template");d.innerHTML=""; c0a=d}d=c0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d0a=a}a=d0a;return a}}}); var HP=GP;w([P(X.YtRendererBehavior),x("design:type",Object)],HP.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],HP.prototype,"data",void 0);HP=w([V({is:"ytd-live-chat-purchased-product-message-renderer"})],HP);Polymer({is:"yt-live-chat-item-list-renderer",_template:function(){if(void 0!==L_a)return L_a;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K_a){var d=document.createElement("template");d.innerHTML=""; K_a=d}d=K_a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return L_a=a}, properties:{data:{type:Object,observer:"dataChanged_"},atBottom:{type:Boolean,value:!0,observer:"atBottomChanged_"},visibleItems:{type:Array,value:function(){return[]}}, itemIdToDockDurationMap:{type:Object,value:function(){return{}}}, dockableMessages:{type:Array,value:function(){return[]}}, allowScroll:{type:Boolean,reflectToAttribute:!0,computed:"computeAllowScroll_(contextMenuOpen, moderationModeEnabled)"},emojiManager:Object,participantsManager:Object,contextMenuOpen:{type:Boolean,value:!1},moderationModeEnabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"moderationModeEnabledChanged_"},isEmpty:{type:Boolean,computed:"computeIsEmpty_(visibleItems.splices)"}},behaviors:[Polymer.IronResizableBehavior,X.YtRendererBehavior,XO,Z,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior], listeners:{"iron-resize":"onIronResize_","yt-live-chat-context-menu-opened":"onContextMenuOpened_","yt-live-chat-context-menu-closed":"onContextMenuClosed_","yt-popup-closed":"maybeScrollToBottom_","yt-rendererstamper-finished":"onYtRendererstamperFinished_"},observers:["isAttachedOrDataChanged_(isAttached, data)"],actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-add-chat-item-action":"handleLiveChatAction_","yt-dim-chat-item-action":"handleLiveChatAction_","yt-remove-chat-item-action":"handleLiveChatAction_", "yt-replace-chat-item-action":"handleLiveChatAction_","yt-mark-chat-item-as-deleted-action":"handleLiveChatAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleLiveChatAction_","yt-add-live-chat-text-message-from-template-action":"handleAddTextMessageFromTemplateAction_","yt-live-chat-picker-changed":"handlePickerChanged_","yt-live-chat-maybe-scroll-to-bottom":"maybeScrollToBottom_","yt-live-chat-scroll-to-bottom":"scrollToBottom_","yt-live-chat-keyboard-event":"onKeyboardEventAction_", "yt-live-chat-seek-success":"handleChatSeekSuccess_"},stampDom:{"data.emptyStateMessage":{id:"empty-state-message",mapping:{messageRenderer:"yt-live-chat-message-renderer"}},visibleItems:{id:"items",mapping:{liveChatAutoModMessageRenderer:{component:"yt-live-chat-auto-mod-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatTextMessageRenderer:{component:"yt-live-chat-text-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatLegacyPaidMessageRenderer:{component:"yt-live-chat-legacy-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidStickerRenderer:"yt-live-chat-paid-sticker-renderer",liveChatDonationAnnouncementRenderer:"yt-live-chat-donation-announcement-renderer",liveChatModeChangeMessageRenderer:"yt-live-chat-mode-change-message-renderer",liveChatModerationMessageRenderer:"yt-live-chat-moderation-message-renderer",liveChatPlaceholderItemRenderer:"yt-live-chat-placeholder-item-renderer",liveChatPurchasedProductMessageRenderer:"ytd-live-chat-purchased-product-message-renderer", liveChatViewerEngagementMessageRenderer:"yt-live-chat-viewer-engagement-message-renderer",serverErrorMessage:"yt-live-chat-server-error-message"},events:!0,reuseComponents:!0}},CHAT_SMOOTH_ANIMATION_TIME_MS:ue?0:84,SCROLLED_TO_BOTTOM_EPSILON:15,created:function(){this.activeItems_=[];this.isSmoothed_=!0;this.lastSmoothChatMessageAddMs_=null;this.chatRateMs_=1E3;this.lastSmoothScrollClockTime_=this.lastSmoothScrollUpdate_=null;this.scrollTimeRemainingMs_=this.scrollPixelsRemaining_=0;this.smoothScrollRafHandle_= null;this.preinsertHeight_=0}, attached:function(){this.listen(window,"resize","maybeScrollToBottom_");this.listen(window,"keydown","onWindowKeyEvent_");this.listen(window,"keyup","onWindowKeyEvent_");HWa()||(this.listen(window.top,"blur","onTopWindowBlurEvent_"),window!=window.top&&this.listen(window,"blur","onFramedWindowBlurEvent_"));this.isSmoothScrollEnabled_()&&Polymer.dom(this.$["item-scroller"]).classList.add("animated");N("live_chat_aggregation")&&Polymer.dom(this.$.contents).appendChild(document.createElement("yt-live-chat-prototype-aggregation"))}, detached:function(){this.resetSmoothScroll_();this.unlisten(window,"resize","maybeScrollToBottom_");this.unlisten(window,"keydown","onWindowKeyEvent_");this.unlisten(window,"keyup","onWindowKeyEvent_");HWa()||(this.unlisten(window.top,"blur","onTopWindowBlurEvent_"),window!=window.top&&this.unlisten(window,"blur","onFramedWindowBlurEvent_"))}, onIronResize_:function(){this.maybeResizeAnimationContainer_()}, maybeResizeAnimationContainer_:function(){this.isSmoothScrollEnabled_()&&this.debounce("resize",function(){var a=this.$.items.clientHeight,b=this.$["item-offset"].clientHeight;0!=a&&(this.$["item-offset"].style.height=a+"px",(0==b||this.atBottom)&&this.scrollToBottom_())})}, isAttachedOrDataChanged_:function(a,b){var c=window!=window.top&&!HWa();a?b&&b.enablePauseChatKeyboardShortcuts&&(c&&this.listen(window.top,"mousemove","onModerationMouseMoveEvent_"),this.listen(window,"mousemove","onModerationMouseMoveEvent_")):(c&&this.unlisten(window.top,"mousemove","onModerationMouseMoveEvent_"),this.unlisten(window,"mousemove","onModerationMouseMoveEvent_"))}, clearList:function(){this.activeItems_=[];this.visibleItems=[];this.dockableMessages=[];this.isSmoothed_=!0;this.lastSmoothChatMessageAddMs_=null;this.chatRateMs_=1E3;this.lastSmoothScrollClockTime_=this.lastSmoothScrollUpdate_=null;this.scrollTimeRemainingMs_=this.scrollPixelsRemaining_=0;this.smoothScrollRafHandle_=null;this.preinsertHeight_=0;this.itemIdToDockDurationMap={};this.$["docked-messages"].clear();this.$["banner-manager"].reset();this.maybeResizeScrollContainer_([]);this.$.items.style.transform= "";this.atBottom||this.scrollToBottom_()}, dataChanged_:function(){this.clearList()}, handleLiveChatActions_:function(a){a.length&&(a.forEach(this.handleLiveChatAction_,this),this.maybeResizeScrollContainer_(a),this.flushActiveItems_(),this.async(this.maybeScrollToBottom_))}, handleLiveChatAction_:function(a){a.addChatItemAction?this.handleAddChatItemAction_(a.addChatItemAction):a.markChatItemAsDeletedAction?this.handleMarkChatItemAsDeletedAction_(a.markChatItemAsDeletedAction):a.markChatItemsByAuthorAsDeletedAction?this.handleMarkChatItemsByAuthorAsDeletedAction_(a.markChatItemsByAuthorAsDeletedAction):a.dimChatItemAction?this.handleDimChatItemAction_(a.dimChatItemAction):a.replaceChatItemAction?this.handleReplaceChatItemAction_(a.replaceChatItemAction):a.removeChatItemAction? this.handleRemoveChatItemAction_(a.removeChatItemAction):a.serverErrorMessage&&this.activeItems_.push({serverErrorMessage:{timestampUsec:this.currentTimestampUsec_(),message:a.serverErrorMessage.message,class:a.serverErrorMessage.class}})}, handleAddChatItemAction_:function(a){var b=a.item,c=Object.keys(b)[0],d=b[c],f=!1;this.forEachItem_(function(l,m,n){var r=Object.keys(b)[0];!(m=m[r])||m.id!=a.clientId&&m.id!=d.id||("visibleItems"==l?(this.visibleItems[n]=b,this.$.items.children[n].set("data",d)):this.activeItems_[n]=b,f=!0)}); if(c=this.get("stickinessParams.dockAtTopDurationMs",a)||0){var h=Array.prototype.find.call(Polymer.dom(this.$.items).children,function(l){return l.id==d.id}); h?this.maybeAddDockableMessage_(h):this.itemIdToDockDurationMap[d.id]=c}f||this.activeItems_.push(b)}, handleReplaceChatItemAction_:function(a){var b=a.replacementItem;this.forEachItem_(function(c,d,f){var h=Object.keys(d)[0];(d=d[h])&&d.id==a.targetItemId&&("visibleItems"==c?(this.splice(c,f,1,b),this.resetSmoothScroll_()):this.activeItems_[f]=b)})}, markAsDeleted_:function(a,b,c,d,f){b=[a,b,c].join(".");this.set(b+".deletedStateMessage",d);this.set(b+".showOriginalContentMessage",f);"visibleItems"==a&&this.resetSmoothScroll_()}, markAutoModRendererAsDeleted_:function(a,b,c,d,f){b=b.liveChatAutoModMessageRenderer.autoModeratedItem;b.liveChatTextMessageRenderer.deletedStateMessage=d;b.liveChatTextMessageRenderer.showOriginalContentMessage=f;this.splice(a,c,1,b);"visibleItems"==a&&this.resetSmoothScroll_()}, handleMarkChatItemAsDeletedAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0],h=c[f];h&&h.id==a.targetItemId&&("liveChatAutoModMessageRenderer"==f?this.markAutoModRendererAsDeleted_(b,c,d,a.deletedStateMessage,a.showOriginalContentMessage):this.markAsDeleted_(b,d,f,a.deletedStateMessage,a.showOriginalContentMessage))})}, handleDimChatItemAction_:function(a){var b=a.clientAssignedId;b&&this.forEachItem_(function(c,d,f){var h=Object.keys(d)[0];(d=d[h])&&d.id==b&&(c=[c,f,h].join("."),this.set(c+".isDimmed",!0))})}, handleMarkChatItemsByAuthorAsDeletedAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0],h=c[f];h&&h.authorExternalChannelId==a.externalChannelId&&("liveChatAutoModMessageRenderer"==f?this.markAutoModRendererAsDeleted_(b,c,d,a.deletedStateMessage,a.showOriginalContentMessage):this.markAsDeleted_(b,d,f,a.deletedStateMessage,a.showOriginalContentMessage))})}, handleRemoveChatItemAction_:function(a){this.forEachItem_(function(b,c,d){var f=Object.keys(c)[0];(c=c[f])&&c.id==a.targetItemId&&(this.splice(b,d,1),"visibleItems"==b&&this.resetSmoothScroll_())})}, onYtRendererstamperFinished_:function(){var a=Polymer.dom(this.$.items).children;Array.prototype.forEach.call(a,function(b){var c=b.id;this.itemIdToDockDurationMap[c]&&(this.maybeAddDockableMessage_(b),delete this.itemIdToDockDurationMap[c])}.bind(this))}, forEachItem_:function(a){this.visibleItems.forEach(a.bind(this,"visibleItems"));this.activeItems_.forEach(a.bind(this,"activeItems_"))}, handleAddTextMessageFromTemplateAction_:function(a,b,c){a=y.unsafeClone(a.addLiveChatTextMessageFromTemplateAction.template.liveChatTextMessageRenderer);b=c.client_message_id;a.id=b;a.timestampUsec=String(this.currentTimestampUsec_());c.message?a.message=kL(c.message):c.rich_message&&(a.message=this.formattedStringFromLiveChatRichMessageInput_(c.rich_message));this.handleLiveChatActions_([{addChatItemAction:{clientMessageId:b,item:{liveChatTextMessageRenderer:a}}}])}, formattedStringFromLiveChatRichMessageInput_:function(a){var b={runs:[]};a=a.text_segments;for(var c=0;cthis.data.maxItemsToDisplay&&this.activeItems_.splice(0,this.activeItems_.length-this.data.maxItemsToDisplay)}, showNewItems_:function(){var a=this.$.items.clientHeight>this.$["item-scroller"].clientHeight;this.$["item-offset"].style.height=this.$.items.clientHeight+"px";this.canScrollToBottom_()&&a&&(this.scrollPixelsRemaining_+=this.$.items.clientHeight-this.preinsertHeight_,this.scrollToBottom_(),this.$.items.style.transform="translateY("+Math.floor(this.scrollPixelsRemaining_)+"px)",this.lastSmoothChatMessageAddMs_||(this.lastSmoothChatMessageAddMs_=performance.now()),a=performance.now()-this.lastSmoothChatMessageAddMs_, this.chatRateMs_=.9*this.chatRateMs_+.1*a,this.isSmoothed_&&400>this.chatRateMs_&&(this.isSmoothed_=!1),!this.isSmoothed_&&450this.scrollPixelsRemaining_&&0a-this.lastSmoothScrollUpdate_&&1E3>performance.now()-this.lastSmoothScrollClockTime_&&0=a.scrollHeight-a.clientHeight-this.SCROLLED_TO_BOTTOM_EPSILON;this.flushActiveItems_()}, onContextMenuOpened_:function(){this.contextMenuOpen=!0}, onContextMenuClosed_:function(){this.contextMenuOpen=!1}, onShow_:function(){this.maybeScrollToBottom_()}, maybeResizeScrollContainer_:function(a){this.isSmoothScrollEnabled_&&kb(a,function(b){return!!b.replaceChatItemAction})&&(this.$["item-offset"].style.height=this.$.items.clientHeight+"px",this.maybeScrollToBottom_())}, computeAllowScroll_:function(a,b){return!(a||b)}, maybeScrollToBottom_:function(){this.canScrollToBottom_()&&this.scrollToBottom_()}, scrollToBottom_:function(){this.$["item-scroller"].scrollTop=Math.pow(2,24);this.atBottom=!0}, atBottomChanged_:function(a){a?this.hideShowMoreAsync_||(this.hideShowMoreAsync_=this.async(function(){this.$["show-more"].style.visibility="hidden"},200)):(this.hideShowMoreAsync_&&this.cancelAsync(this.hideShowMoreAsync_),this.hideShowMoreAsync_=null,this.$["show-more"].style.visibility="visible")}, onWindowKeyEvent_:function(a){this.handleKeyboardEvent_(a.type,a.keyCode)}, onKeyboardEventAction_:function(a){this.handleKeyboardEvent_(a.eventType,a.keyCode)}, handleKeyboardEvent_:function(a,b){b=ve?kBa(b):xe&&we?lBa(b):b;this.data.enablePauseChatKeyboardShortcuts&&18==b&&(this.moderationModeEnabled="keydown"==a)}, onTopWindowBlurEvent_:function(){!window||window!=window.top&&document.hasFocus()||(this.moderationModeEnabled=!1)}, onFramedWindowBlurEvent_:function(){window==window.top||window.top.document.hasFocus()||(this.moderationModeEnabled=!1)}, onModerationMouseMoveEvent_:function(a){this.moderationModeEnabled=a.altKey}, moderationModeEnabledChanged_:function(){Polymer.updateStyles()}, isSmoothScrollEnabled_:function(){return 0!=this.CHAT_SMOOTH_ANIMATION_TIME_MS}, handleChatSeekSuccess_:function(){this.clearList()}});var e0a;var f0a;var g0a;var h0a,i0a=function(){if(void 0!==h0a)return h0a;var a=document.createElement("template");a.innerHTML=""; return h0a=a};var j0a;var k0a;var l0a;Polymer({is:"yt-live-chat-poll-editor-input",_template:function(){if(void 0!==l0a)return l0a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n \n \n \n [[charactersRemaining]]\n
\n
\n
\n [[getSimpleString(data.charCountErrorText)]]\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k0a){var d=document.createElement("template");d.innerHTML=""; k0a=d}d=k0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return l0a=a}, properties:{data:{type:Object},id:{type:Number,computed:"computeId(data.id)"},emojiManager:Object,inputData:{type:Object,computed:"computeInputData(data.inputData)"},isRemovable:{type:Boolean,reflectToAttribute:!0,value:!1,computed:"computeIsRemovable(data.isRemovable)"},hasPrefilledText:{type:Boolean,reflectToAttribute:!0,computed:"computeHasPrefilledText(data.hasPrefilledText)"},charactersRemaining:{type:Number,computed:"computeCharactersRemaining(data.maxCharacterLimit, characterCount)"},characterCount:{type:Number}, isInputDirty:{type:Boolean,value:!1},overCharacterLimit:{type:Boolean,reflectToAttribute:!0,computed:"computeOverCharacterLimit(charactersRemaining)"},underCharacterLimit:{type:Boolean,computed:"computeUnderCharacterLimit(data, characterCount, hasPrefilledText)"},showErrorMessage:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeShowErrorMessage(data.charCountErrorText, overCharacterLimit, isInputDirty, characterCount)"}},behaviors:[X.YtRendererBehavior],listeners:{"yt-live-chat-text-input-field-renderer-character-count-changed":"handleTextInputCharCountChanged_"}, computeId:function(){return this.data.id}, computeInputData:function(){return this.data.inputData}, computeHasPrefilledText:function(){return this.data.hasPrefilledText}, computeIsRemovable:function(){return!!this.data&&!!this.data.isRemovable}, computeShowErrorMessage:function(){return this.data&&this.data.charCountErrorText?this.overCharacterLimit||this.underCharacterLimit&&this.isInputDirty:!1}, getLiveChatRichMessageInput:function(){return this.$.input.liveChatRichMessageInput}, clearInput:function(){this.$.input.setLiveChatRichMessageInput(null)}, computeCharactersRemaining:function(){if(this.data&&void 0!==this.data.maxCharacterLimit&&void 0!==this.characterCount)return this.data.maxCharacterLimit-this.characterCount}, computeOverCharacterLimit:function(){return void 0!==this.charactersRemaining&&0>this.charactersRemaining}, computeUnderCharacterLimit:function(){return this.hasPrefilledText?!1:!!this.data&&this.data.minCharacterLimit>this.characterCount}, handleTextInputCharCountChanged_:function(a){a=a.detail&&a.detail.characterCount;void 0!==a&&(this.characterCount=a,0!==a&&(this.isInputDirty=!0))}, onInputFocusOut:function(){this.isInputDirty=!0}, onClickCloseButton_:function(){this.fire("yt-live-chat-poll-editor-input-closed",{id:this.id})}});var m0a;var n0a;var o0a={minPollOptions:2,maxPollOptions:4,minPollOptionChars:1,maxPollOptionChars:35,maxPollQuestionChars:100,optionPlaceholderText:{simpleText:""},questionPlaceholderText:{simpleText:""},customOptionPlaceholderText:[],pollOptionData:{}}; Polymer({is:"yt-live-chat-poll-editor-panel-renderer",_template:function(){if(void 0!==n0a)return n0a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n
\n \n \n
\n \n \n \n \n
\n
\n
\n
\n [[getSimpleString(pollEditorInfoWithDefaults.pollQuestionCharCountErrorText)]]\n
\n
\n [[pollQuestionCharacterCount]]/[[pollEditorInfoWithDefaults.maxPollQuestionChars]]\n
\n
\n [[pollQuestionCharactersRemaining]]\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m0a){var d=document.createElement("template");d.innerHTML=""; m0a=d}d=m0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return n0a=a}, properties:{data:{type:Object,observer:"dataChanged"},id:{type:String,computed:"computeId(data.id)",reflectToAttribute:!0},emojiManager:Object,pollOptionsData:{type:Array,value:function(){return[]}}, pollQuestionData:{type:Object,computed:"computePollQuestionData(pollEditorInfoWithDefaults)"},pollQuestionCharacterCount:{type:Number,value:0},pollQuestionCharactersRemaining:{type:Number,computed:"computePollQuestionCharactersRemaining(pollEditorInfoWithDefaults.maxPollQuestionChars, pollQuestionCharacterCount)"},overQuestionCharacterLimit:{type:Boolean,reflectToAttribute:!0,computed:"computeOverQuestionCharacterLimit(pollQuestionCharacterCount, pollEditorInfoWithDefaults)"},pollEditorInfoWithDefaults:{type:Object, computed:"computePollEditorInfoWithDefaults(data.pollEditorInfo)"},currentNumPollOptions:{type:Number,computed:"computeCurrentNumPollOptions(pollOptionsData.splices)",value:0},hasMaxNumPollOptions:{type:Boolean,computed:"computeHasMaxNumPollOptions(pollEditorInfoWithDefaults, currentNumPollOptions)",reflectToAttribute:!0},shouldInitializePoll_:{type:Boolean,computed:"computeShouldInitializePoll_(pollEditorInfoWithDefaults, pollOptionsData)"},isValidPoll:{type:Boolean,observer:"isValidPollChanged"}, createPollRequestInFlight:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Boolean,observer:"selectedChanged"},showQuestionErrorMessage:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeShowQuestionErrorMessage(pollEditorInfoWithDefaults, overQuestionCharacterLimit)"}},behaviors:[X.YtRendererBehavior,Z],observers:["shouldInitializePollChanged(shouldInitializePoll_)"],listeners:{"picker-cancelled":"onPickerCancelled","yt-service-request-completed":"handleServiceRequestCompleted_", "yt-live-chat-poll-editor-input-closed":"handlePollEditorInputClosed_","yt-live-chat-text-input-field-renderer-character-count-changed":"handleTextInputChanged_","yt-service-request-sent":"handleServiceRequestSent_"},stampDom:{"data.pollEditorInfo.addOptionButton":{id:"add-option-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.closeButton":{id:"close-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.startButton":{id:"start-button",mapping:{buttonRenderer:"yt-button-renderer"}}, pollQuestionData:{id:"poll-question",mapping:{liveChatTextInputFieldRenderer:{component:"yt-live-chat-text-input-field-renderer",properties:{emojiManager:"[[emojiManager]]"},attributes:{id:"poll-question-input","is-valid-with-no-input-text":!0}}}},pollOptionsData:{id:"poll-options",mapping:{liveChatPollOptionInput:{component:"yt-live-chat-poll-editor-input",properties:{emojiManager:"[[emojiManager]]"}}}}},dataChanged:function(){this.isValidPoll=this.getIsValidPoll_();this.data&&this.data.startButton&& this.data.startButton.buttonRenderer&&this.set("data.startButton.buttonRenderer.isDisabled",!this.isValidPoll)}, computeId:function(){return this.data&&this.data.id||""}, computePollEditorInfoWithDefaults:function(){if(this.data&&this.data.pollEditorInfo)return Object.assign(o0a,this.data.pollEditorInfo)}, computeShouldInitializePoll_:function(){return!!this.pollEditorInfoWithDefaults&&!this.pollOptionsData.length}, computePollQuestionData:function(){if(this.pollEditorInfoWithDefaults)return{liveChatTextInputFieldRenderer:{placeholder:this.pollEditorInfoWithDefaults.questionPlaceholderText,maxCharacterLimit:this.pollEditorInfoWithDefaults.maxPollQuestionChars}}}, computeOverQuestionCharacterLimit:function(){return this.pollEditorInfoWithDefaults?this.pollQuestionCharacterCount>this.pollEditorInfoWithDefaults.maxPollQuestionChars:!1}, computePollQuestionCharactersRemaining:function(){if(this.pollEditorInfoWithDefaults)return this.pollEditorInfoWithDefaults.maxPollQuestionChars-this.pollQuestionCharacterCount}, computeCurrentNumPollOptions:function(){return this.pollOptionsData.length}, computeHasMaxNumPollOptions:function(){return!this.pollEditorInfoWithDefaults||this.currentNumPollOptions>=this.pollEditorInfoWithDefaults.maxPollOptions}, computeShowQuestionErrorMessage:function(){return this.pollEditorInfoWithDefaults&&this.overQuestionCharacterLimit&&!!this.pollEditorInfoWithDefaults.pollQuestionCharCountErrorText}, shouldInitializePollChanged:function(){if(this.shouldInitializePoll_)for(var a=0;ab.maxPollQuestionChars)return!1;b=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input");return Array.from(b).every(function(h,l){h=h.characterCount;!h&&f[l]&&(h=a.getSimpleString(f[l]).length);return h>=c&&h<=d})}, isValidPollChanged:function(){this.data&&this.data.startButton&&this.data.startButton.buttonRenderer&&this.set("data.startButton.buttonRenderer.isDisabled",!this.isValidPoll)}, addPollOptionData_:function(){var a=this.pollEditorInfoWithDefaults,b=a.maxPollOptionChars,c=a.optionPlaceholderText,d=a.customOptionPlaceholderText,f=a.pollOptionData;this.currentNumPollOptions>=a.maxPollOptions||(a={liveChatPollOptionInput:{inputData:{placeholder:d[this.currentNumPollOptions]||c,maxCharacterLimit:b},maxCharacterLimit:b,minCharacterLimit:a.minPollOptionChars,hasPrefilledText:!!d[this.currentNumPollOptions],isRemovable:this.currentNumPollOptions>=a.minPollOptions}},f.charCountErrorText&&( a.liveChatPollOptionInput.charCountErrorText=f.charCountErrorText),f.charsRemainingAltLabel&&(a.liveChatPollOptionInput.charsRemainingAltLabel=f.charsRemainingAltLabel),f.removeOptionAltText&&(a.liveChatPollOptionInput.removeOptionAltText=f.removeOptionAltText),this.push("pollOptionsData",a),f=Array.from(Polymer.dom(this.$["poll-options"]).children),f.forEach(function(h,l){return h.set("data.id",l)}),f[f.length-1].$.input.focus())}, getPollOptionInputValues_:function(){var a=this,b=[],c=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input"),d=this.get("data.pollEditorInfo.customOptionPlaceholderText")||[];Array.from(c).forEach(function(f,h){var l=null;(f=f.getLiveChatRichMessageInput())&&f.textSegments.length?l=NO(f):d[h]&&(l=a.formattedStringToLiveChatRichMessageInput_(d[h]));b.push(l)}); return b}, requestCreateAndStartPoll_:function(a){var b=this.getPollOptionInputValues_();if(!b.some(function(d){return!d})){b={optionText:b}; var c=Polymer.dom(this.$["poll-question"]).firstChild;c&&c.liveChatRichMessageInput&&(b.questionText=NO(c.liveChatRichMessageInput));this.sendServiceRequestAction([a,b])}}, selectedChanged:function(){if(this.selected){var a=Polymer.dom(this.$["start-button"]).firstElementChild;a&&a.$$("#button").focus()}}, handleTextInputChanged_:function(a){"poll-question-input"===a.target.id&&(this.pollQuestionCharacterCount=a.detail.characterCount);this.isValidPoll=this.getIsValidPoll_()}, handleStartButtonAction_:function(a){"yt-service-request"==a.detail.actionName&&(a.stopPropagation(),(a=a.detail.args[1])&&this.requestCreateAndStartPoll_(a))}, handleServiceRequestSent_:function(){this.createPollRequestInFlight=!0}, handleServiceRequestCompleted_:function(a){this.createPollRequestInFlight=!1;(a=a.detail&&a.detail.data)&&a.success&&this.fire("picker-cancelled")}, onCloseClick_:function(){this.fire("picker-cancelled")}, onAddOptionButtonClick_:function(){this.addPollOptionData_();this.isValidPoll=this.getIsValidPoll_()}, handlePollEditorInputClosed_:function(a){var b=this.pollOptionsData.findIndex(function(c){return c.liveChatPollOptionInput.id===a.detail.id}); this.splice("pollOptionsData",b,1);this.isValidPoll=this.getIsValidPoll_()}, onPickerCancelled:function(){this.reset_()}, reset_:function(){if(this.pollEditorInfoWithDefaults){for(;this.currentNumPollOptions>this.pollEditorInfoWithDefaults.minPollOptions;)this.pop("pollOptionsData");var a=Polymer.dom(this.$["poll-question"]).firstChild;a&&a.setLiveChatRichMessageInput(null);if(a=Polymer.dom(this.root).querySelectorAll("yt-live-chat-poll-editor-input")){a=k(Array.from(a));for(var b=a.next();!b.done;b=a.next())b.value.clearInput()}this.isValidPoll=this.getIsValidPoll_()}}, formattedStringToLiveChatRichMessageInput_:function(a){return a.simpleText?{text_segments:[a.simpleText]}:{text_segments:a.runs}}});var p0a;var q0a;Polymer({is:"yt-live-chat-product-button-renderer",_template:function(){if(void 0!==q0a)return q0a;var a=document.createElement("template");a.innerHTML="\n \n \n
\n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p0a){var d=document.createElement("template");d.innerHTML=""; p0a=d}d=p0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return q0a=a}, hostAttributes:{role:"menuitem",tabindex:-1},properties:{data:Object,iconId:{type:String,computed:"computeIconId_(data)",reflectToAttribute:!0},icon:{type:String,computed:"computeIcon_(data)",reflectToAttribute:!0},disabled:{type:Boolean,computed:"computeDisabled_(data.isDisabled)",reflectToAttribute:!0},command:{type:Object,computed:"computeCommand_(data.command, disabled)"}},behaviors:[OO.YtEndpointBehavior,X.YtRendererBehavior],computeIconId_:function(a){return a&&a.icon&&a.icon.iconType?a.icon.iconType.toLowerCase(): ""}, computeIcon_:function(a){return a&&a.icon&&a.icon.iconType?"yt-icons:"+a.icon.iconType.toLowerCase():""}, computeDisabled_:function(a){return!!a}, computeCommand_:function(a,b){return b?void 0:a}, onClick_:function(){this.data&&!this.disabled&&this.logExplicitClick(this.data)}});var r0a;var s0a;Polymer({is:"yt-live-chat-product-picker-renderer",_template:function(){if(void 0!==s0a)return s0a;var a=document.createElement("template");a.innerHTML=" \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r0a){var d=document.createElement("template");d.innerHTML=""; r0a=d}d=r0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return s0a=a}, hostAttributes:{role:"menu",tabindex:0},properties:{data:Object,id:{type:String,computed:"computeId_(data)",reflectToAttribute:!0},selected:{type:Boolean,reflectToAttribute:!0}},observers:["observeSelected_(selected)"],behaviors:[xO.YtActionHandlerBehavior,X.YtRendererBehavior,Z],stampDom:{"data.buttons":{id:"buttons",mapping:{liveChatProductButtonRenderer:"yt-live-chat-product-button-renderer"}},"data.closeButton":{id:"close-button",mapping:{liveChatProductButtonRenderer:"yt-live-chat-product-button-renderer"}}}, actionMap:{"yt-live-chat-close-buy-flow":"onCloseBuyFlow_"},computeId_:function(a){return a.id||""}, onCloseClick_:function(){this.fire("picker-cancelled")}, observeSelected_:function(a){a&&this.focus();a=this.querySelectorAll("yt-live-chat-product-button-renderer");a.length&&a[0].focus()}, onCloseBuyFlow_:function(){this.fire("picker-cancelled")}});var t0a;var u0a;Polymer({is:"yt-live-chat-text-actions-error-message-renderer",_template:function(){if(void 0!==u0a)return u0a;var a=document.createElement("template");a.innerHTML="\n \n\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t0a){var d=document.createElement("template");d.innerHTML=""; t0a=d}d=t0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return u0a=a}, properties:{data:Object},dismiss:function(){this.fire("yt-live-chat-error-message-dismiss")}, edit:function(){this.fire("yt-live-chat-error-message-edit",this.data.originalRichMessage)}});Polymer({COUNTDOWN_RADIUS_:10,is:"yt-live-chat-message-input-renderer",_template:function(){if(void 0!==j0a)return j0a;var a=document.createElement("template");a.innerHTML="
[[characterCount]]/[[maxCharacterLimit]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(i0a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g0a){var d=document.createElement("template");d.innerHTML=""; g0a=d}d=g0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return j0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},characterCount:{type:Number,value:0,observer:"characterCountChanged_"},maxCharacterLimit:{type:Number,value:0},emojiManager:Object,participantsManager:Object,sendDisabled:{type:Number,computed:"computeSendDisabled_(characterCount, maxCharacterLimit, countdownActive)"},countdownRatio:{type:Number,value:0},countdownStrokeDashOffset:{type:Number,computed:"computeCountdownStrokeDashOffset_(countdownRatio)"},countdownActive:{type:Boolean,computed:"computeCountdownActive_(countdownRatio)"}, errorMessage:{type:Object,observer:"errorMessageChanged_"},hasInteractionMessage:{type:Boolean,computed:"toBool(data.interactionMessage)",reflectToAttribute:!0},genericErrorMessage:{type:Object}},behaviors:[X.YtRendererBehavior,W.YtActionSenderBehavior,pXa,Z],stampDom:{"data.sendButton":{id:"send-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.pickers":{id:"pickers",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[emojiManager]]"}},liveChatProductPickerRenderer:{component:"yt-live-chat-product-picker-renderer"}, liveChatPollEditorPanelRenderer:{component:"yt-live-chat-poll-editor-panel-renderer",properties:{emojiManager:"[[emojiManager]]"}}}},"data.pickerButtons":{id:"picker-buttons",mapping:{liveChatIconToggleButtonRenderer:{component:"yt-live-chat-icon-toggle-button-renderer",properties:{disabled:"[[hasInteractionMessage]]"}},buttonRenderer:{component:"yt-button-renderer",params:{buttonTooltipPosition:"top",sendServiceEndpointWhenDisabled:!0}}}},"data.interactionMessage":{id:"interaction-message",mapping:{messageRenderer:{component:"yt-live-chat-message-renderer", params:{subtextOnBottom:!0}}}},errorMessage:{id:"error-message",mapping:{liveChatErrorMessageRenderer:"yt-live-chat-error-message-renderer",liveChatTextActionsErrorMessageRenderer:"yt-live-chat-text-actions-error-message-renderer"}}},listeners:{"yt-live-chat-send-message":"sendMessage","yt-live-chat-icon-toggle-button-renderer-toggle":"handlePickerButtonToggle_","yt-emoji-select":"onEmojiSelect_","yt-service-request-completed":"onSendCompleted_","yt-service-request-error":"onSendError_","yt-live-chat-error-message-dismiss":"onErrorMessageDismiss_", "yt-live-chat-error-message-edit":"onErrorMessageEdit_"},created:function(){this.lastTimeoutTimeMs_=this.timeoutMs_=this.timeoutDurationMs_=this.numSentMessages_=0;this.pendingMessageId_=""}, dataChanged_:function(){this.data.sendButton&&this.data.sendButton.buttonRenderer&&(this.data.sendButton.buttonRenderer.isDisabled=this.sendDisabled)}, sendMessage:function(){var a=this,b,c,d,f,h,l,m,n;return Aa(function(r){if(1==r.nextAddress){if(a.sendDisabled)return r.return();if(!a.data.sendButton||!a.data.sendButton.buttonRenderer)return r.jumpTo(0);a.$.input.completeEmojis();b=a.data.sendButton.buttonRenderer.serviceEndpoint;if(!b)return r.return();c=b.sendLiveChatMessageEndpoint.clientIdPrefix||"";d={client_message_id:c+String(a.numSentMessages_++),rich_message:NO(a.$.input.liveChatRichMessageInput)};f=kZa;h=A("LIVE_CHAT_SEND_MESSAGE_ACTION"); if(!f||!h)return r.jumpTo(3);var v;(v=window.grecaptcha)?v=v.execute(f.siteKey,{action:h,fast:N("live_chat_verify_recaptcha_token")}):(Zm(Error("Could not find grecaptcha library when fetching a ReCAPTCHA token\n from RecaptchaService.")),v=void 0);l=v;return(m=N("live_chat_verify_recaptcha_token"))?q(r,l,5):r.jumpTo(3)}3!=r.nextAddress&&(n=r.yieldResult,d.recaptcha_token=n);a.pendingMessageId_=d.client_message_id;a.sendServiceRequestAction([b,d]);a.$.input.setLiveChatRichMessageInput(null); ra(r)})}, handleSendButtonAction_:function(a){"yt-service-request"==a.detail.actionName&&(a.stopPropagation(),this.sendMessage())}, onSendCompleted_:function(a,b){(a=b.data.timeoutDurationUsec)&&this.handleTimeout_(Number(a)/1E3);this.errorMessage=b.data.errorMessage;this.pendingMessageId_=""}, onSendError_:function(){this.pendingMessageId_&&this.sendAction("yt-dim-chat-item-action",[{dimChatItemAction:{clientAssignedId:this.pendingMessageId_}}]);this.pendingMessageId_="";this.genericErrorMessage&&(this.errorMessage={liveChatErrorMessageRenderer:{errorText:this.genericErrorMessage}})}, handlePickerButtonToggle_:function(a){a=a.detail.targetId;this.togglePicker_(a);"emoji"==a&&this.$.input.focus()}, onEmojiSelect_:function(a){this.$.input.focus();this.$.input.insertEmoji(a.detail)}, characterCountChanged_:function(a){if(this.maxCharacterLimit){a=a/this.maxCharacterLimit*100;var b=Polymer.dom(this.$.count);b.classList.toggle("early-warning",75<=a);b.classList.toggle("warning",90<=a);b.classList.toggle("error",100b);(b=this.$["send-button"])&&b.children.length&&(b.children[0].disabled=a);return a}, handleTimeout_:function(a){this.timeoutDurationMs_=this.timeoutMs_=a;this.countdownRatio=1;0==this.lastTimeoutTimeMs_&&window.requestAnimationFrame(this.updateTimeout_.bind(this))}, updateTimeout_:function(a){this.lastTimeoutTimeMs_&&(this.timeoutMs_=Math.max(0,this.timeoutMs_-(a-this.lastTimeoutTimeMs_)),this.countdownRatio=this.timeoutMs_/this.timeoutDurationMs_);this.isAttached&&this.timeoutMs_?(this.lastTimeoutTimeMs_=a,window.requestAnimationFrame(this.updateTimeout_.bind(this))):this.lastTimeoutTimeMs_=0}, onErrorMessageDismiss_:function(){this.errorMessage=void 0}, onErrorMessageEdit_:function(a){this.$.input.setLiveChatRichMessageInput(a.detail);this.$.input.focusAtEnd();this.errorMessage=void 0}, errorMessageChanged_:function(){this.async(function(){this.sendAction("yt-live-chat-maybe-scroll-to-bottom")})}, toBool:function(a){return!!a}});var v0a;var w0a;Polymer({is:"yt-live-chat-ninja-message-renderer",_template:function(){if(void 0!==w0a)return w0a;var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v0a){var d=document.createElement("template");d.innerHTML=""; v0a=d}d=v0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return w0a=a}, properties:{data:Object},behaviors:[Z],stampDom:{"data.button":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}}});var x0a;var y0a;var z0a;var A0a;Polymer({is:"yt-live-chat-participant-renderer",_template:function(){if(void 0!==A0a)return A0a;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z0a){var d=document.createElement("template");d.innerHTML=""; z0a=d}d=z0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return A0a=a}, properties:{data:Object},behaviors:[X.YtRendererBehavior,Z]});Polymer({is:"yt-live-chat-participant-list-renderer",_template:function(){if(void 0!==y0a)return y0a;var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.title)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x0a){var d=document.createElement("template");d.innerHTML=""; x0a=d}d=x0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return y0a=a}, properties:{data:Object,participantsManager:Object},behaviors:[Z,X.YtRendererBehavior],stampDom:{"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}},"participantsManager.participants":{id:"participants",mapping:{liveChatParticipantRenderer:"yt-live-chat-participant-renderer",liveChatTextMessageRenderer:"yt-live-chat-participant-renderer",liveChatLegacyPaidMessageRenderer:"yt-live-chat-participant-renderer",liveChatPaidMessageRenderer:"yt-live-chat-participant-renderer"}, reuseComponents:!0}},observers:["updateParticipantManagerListeners_(isAttached, participantsManager)"],monitorScroll:!0,created:function(){this.activeParticipantsManager_=null}, updateParticipantManagerListeners_:function(a,b){a?(this.activeParticipantsManager_&&(this.unlisten(this.activeParticipantsManager_,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_=null),b&&(this.listen(b,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_=b,this.onParticipantsChanged_())):this.activeParticipantsManager_&&(this.unlisten(this.activeParticipantsManager_,"participants-changed","onParticipantsChanged_"),this.activeParticipantsManager_= null)}, onParticipantsChanged_:function(){this.notifyPath("participantsManager.participants")}, onBackButtonClick_:function(){this.fire("yt-participants-back-button")}, focus:function(){this.invalidate(!0);this.async(function(){var a=ok(this);a&&a.focus()})}});var B0a;var C0a;Polymer({is:"yt-live-chat-pinned-message-renderer",_template:function(){if(void 0!==C0a)return C0a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B0a){var d=document.createElement("template");d.innerHTML=""; B0a=d}d=B0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return C0a=a}, behaviors:[Z],stampDom:{"data.renderer":{id:"message",mapping:{liveChatLegacyPaidMessageRenderer:{component:"yt-live-chat-legacy-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatMembershipItemRenderer:{component:"yt-live-chat-membership-item-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}},liveChatPaidMessageRenderer:{component:"yt-live-chat-paid-message-renderer",properties:{emojiManager:"[[emojiManager]]", participantsManager:"[[participantsManager]]"}},liveChatPaidStickerRenderer:{component:"yt-live-chat-paid-sticker-renderer",params:{authorPhotoSize:40}}},reuseComponents:!0}},properties:{data:{type:Object,value:null,observer:"dataChanged_"},emojiManager:Object},listeners:{"yt-service-request-completed":"onServiceRequestCompleted_"},dataChanged_:function(a){this.hidden=!a;if(a&&(a=a.renderer)){var b=Object.keys(a)[0];(a=a[b])&&a.authorPhoto&&(a.authorPhoto.webThumbnailDetailsExtensionData={isPreloaded:!0})}}, onFadeClick_:function(){this.fire("yt-live-chat-clear-pinned-message")}, onServiceRequestCompleted_:function(a,b){var c=this;b.actions&&b.actions.forEach(function(d){d.markChatItemAsDeletedAction&&c.fire("yt-live-chat-clear-pinned-message")})}});var D0a;var E0a;$O.YtLiveChatReplayBehaviorImpl_={properties:{playerProgressSec:{type:Number,readOnly:!0},data:{type:Object,observer:"handleParentDataChange_"},isSeeking:{type:Boolean,value:!1,readOnly:!0},playerState:{type:Number,readOnly:!0},isAdPlaying:{type:Boolean,value:!1,readOnly:!0}},observers:["observeReplayState_(isAdPlaying, isSeeking, playerState)"],behaviorActionMap_:{"yt-live-player-video-progress":"handlePlayerVideoProgress_","yt-live-player-ad-start":"handlePlayerAdStart_","yt-live-player-ad-end":"handlePlayerAdEnd_", "yt-live-player-state-change":"handlePlayerStateChange_","yt-live-chat-seek-success":"handleChatSeekSuccess_","yt-live-chat-seek-fail":"handleChatSeekFail_","yt-live-chat-reload-success":"handleReloadSuccess_","ytg-player-video-progress":"handleGamingPlayerVideoProgress_"},attached:function(){this.replayBuffer_=new mZa;this.currentPlayerState_={};this.registerActionMap(this.behaviorActionMap_)}, detached:function(){this.unregisterActionMap(this.behaviorActionMap_);this.replayBuffer_=null}, addReplayChatItemAction:function(a){this.replayBuffer_&&this.replayBuffer_.addReplayChatItemAction(a)}, handlePlayerVideoProgress_:function(a){this.playerProgressChanged_(a)}, handleGamingPlayerVideoProgress_:function(a,b,c){this.playerProgressChanged_(a,b,c)}, handlePlayerAdStart_:function(){this._setIsAdPlaying(!0)}, handlePlayerAdEnd_:function(){this._setIsAdPlaying(!1)}, handlePlayerStateChange_:function(a){this._setPlayerState(a)}, observeReplayState_:function(a,b,c){this.data&&this.data.isReplay&&(a||b||2==c||3==c?this.sendOptionalAction("yt-live-chat-pause-replay"):1==c&&this.sendOptionalAction("yt-live-chat-resume-replay"))}, preprocessSeekResponseActions_:function(a){this.replayBuffer_.clear();a.forEach(function(b){b.replayChatItemAction&&(this.addReplayChatItemAction(b.replayChatItemAction),b.replayChatItemAction.actions&&this.preprocessActions_(b.replayChatItemAction.actions))},this)}, playerProgressChanged_:function(a,b,c){if((this.data.isReplay||c)&&!this.isAdPlaying){this.sendOptionalAction("yt-live-chat-replay-progress",[a]);this.currentPlayerState_={};b&&(this.currentPlayerState_.videoId=b);c&&(this.currentPlayerState_.watchPartyId=c);b=1E3*a;this.currentPlayerState_.playerOffsetMs=Math.floor(b).toString();c=this.$$("yt-live-chat-replay-continuation");var d=this.$$("yt-player-seek-continuation");this._setPlayerProgressSec(a);d&&d.maybeFireSeekContinuation(a,this.replayBuffer_.lastVideoOffsetTimeMsec)?( this._setIsSeeking(!0),this.replayBuffer_.clear(),Polymer.dom(this).setAttribute("loading","")):this.isSeeking_||(c&&this.replayBuffer_.lastVideoOffsetTimeMsec&&(c.timeRemainingMsecs=this.replayBuffer_.lastVideoOffsetTimeMsec-b),a=nZa(this.replayBuffer_,b),this.immediatelyApplyLiveChatActions(a))}}, handleChatSeekSuccess_:function(){this._setIsSeeking(!1);var a=nZa(this.replayBuffer_,1E3*this.playerProgressSec);this.immediatelyApplyLiveChatActions(a);Polymer.dom(this).removeAttribute("loading")}, handleChatSeekFail_:function(){this._setIsSeeking(!1);Polymer.dom(this).removeAttribute("loading")}, handleReloadSuccess_:function(){Polymer.dom(this).removeAttribute("loading")}, handleParentDataChange_:function(a,b){b&&b.isReplay&&this.replayBuffer_.clear()}}; $O.YtLiveChatReplayBehavior=[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,$O.YtLiveChatReplayBehaviorImpl_];Polymer({is:"yt-live-chat-replay-continuation",properties:{data:{type:Object,observer:"dataChanged_"},timeRemainingMsecs:{type:Number,observer:"timeRemainingChanged_"}},created:function(){this.hasFired_=!1}, dataChanged_:function(){this.hasFired_=!1}, timeRemainingChanged_:function(a){this.data&&!this.hasFired_&&a<=this.data.timeUntilLastMessageMsec&&(this.hasFired_=!0,this.fire("yt-load-replay-continuation",this.getContinuationUrl.bind(this)))}, getContinuationUrl:function(a){var b={ctoken:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Id(a,b)}});var F0a;var G0a;Polymer({is:"yt-live-chat-restricted-participation-renderer",_template:function(){if(void 0!==G0a)return G0a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
[[getSimpleString(data.message)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(i0a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F0a){var d=document.createElement("template");d.innerHTML=""; F0a=d}d=F0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return G0a=a}, properties:{data:Object},behaviors:[pXa,X.YtRendererBehavior,Z],stampDom:{"data.buttons":{id:"picker-buttons",mapping:{buttonRenderer:"yt-button-renderer",liveChatIconToggleButtonRenderer:"yt-live-chat-icon-toggle-button-renderer"}},"data.inlineAfterMessageButton":{id:"message-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.panels":{id:"pickers",mapping:{liveChatProductPickerRenderer:"yt-live-chat-product-picker-renderer"}}},listeners:{"yt-live-chat-icon-toggle-button-renderer-toggle":"handleToggle_"}, handleToggle_:function(a){a.target.disabled||this.togglePicker_(a.detail.targetId)}});var H0a;var I0a;var J0a;var K0a;Polymer({is:"yt-live-chat-ticker-sponsor-item-renderer",_template:function(){if(void 0!==K0a)return K0a;var a=document.createElement("template");a.innerHTML="
\n
\n \n [[getSimpleString(data.detailText)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(eZa().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J0a){var d=document.createElement("template");d.innerHTML=""; J0a=d}d=J0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return K0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hidden:{type:Boolean,value:!1,computed:"truthy(isDeleted)",reflectToAttribute:!0}},behaviors:[X.YtRendererBehavior,gZa],dataChanged_:function(a){a&&(this.$.content.style.color=this.colorFromDecimal(a.detailTextColor),this.ariaLabel=this.getSimpleString(a.detailText),this.startCountdown(a.durationSec,a.fullDurationSec),this.async(this.setContainerWidth))}});Polymer({is:"yt-live-chat-ticker-renderer",_template:function(){if(void 0!==I0a)return I0a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H0a){var d=document.createElement("template");d.innerHTML=""; H0a=d}d=H0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return I0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},highlightId:{type:String,value:null,observer:"highlightIdChanged_"},isScrolledLeft:{type:Boolean,value:!0},isScrolledRight:Boolean,items:{type:Array,value:function(){return[]}}, isReplayPaused:{type:Boolean,value:!1,readOnly:!0}},behaviors:[Z,X.YtRendererBehavior,xO.YtActionHandlerBehavior],stampDom:{items:{id:"items",mapping:{liveChatTickerPaidMessageItemRenderer:{component:"yt-live-chat-ticker-paid-message-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}},liveChatTickerPaidStickerItemRenderer:{component:"yt-live-chat-ticker-paid-sticker-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}}, liveChatTickerSponsorItemRenderer:{component:"yt-live-chat-ticker-sponsor-item-renderer",properties:{shouldAnimateIn:"[[shouldAnimateIn]]",isAnimationPaused:"[[isReplayPaused]]"}}},reuseComponents:!0}},actionMap:{"yt-live-chat-actions":"handleLiveChatActions_","yt-remove-chat-item-action":"handleLiveChatAction_","yt-mark-chat-item-as-deleted-action":"handleLiveChatAction_","yt-mark-chat-items-by-author-as-deleted-action":"handleLiveChatAction_","yt-live-chat-seek-success":"handleChatSeekSuccess_", "yt-live-chat-pause-replay":"handlePauseReplay_","yt-live-chat-resume-replay":"handleResumeReplay_"},listeners:{mouseenter:"onMouseEnter_",mouseleave:"onMouseLeave_","yt-live-chat-ticker-remove-ticker-item":"onRemoveTickerItem_","yt-navigate":"onNavigate_"},observers:["itemsChanged_(items.length)"],created:function(){this.asyncHandle_=null;this.shouldAnimateIn=!1;this.scrollClampRaf_=this.lastFrameTimestamp_=null;this.scrollStartTime_=this.scrollRatePixelsPerSecond_=0;this.scrollStopHandle_=null}, attached:function(){this.keepScrollClamped_()}, detached:function(){this.scrollClampRaf_&&window.cancelAnimationFrame(this.scrollClampRaf_);this.stopScrolling_();this.shouldAnimateIn=!1}, dataChanged_:function(){this.clearList()}, clearList:function(){window.cancelAnimationFrame(this.scrollClampRaf_||0);this.cancelAsync(this.scrollStopHandle_||0);window.cancelAnimationFrame(this.asyncHandle_||0);this.items=[];this.asyncHandle_=null;this.shouldAnimateIn=!1;this.scrollClampRaf_=this.lastFrameTimestamp_=null;this.scrollStartTime_=this.scrollRatePixelsPerSecond_=0;this.scrollStopHandle_=null}, handleLiveChatActions_:function(a){a.length&&(a.forEach(this.handleLiveChatAction_,this),this.updateHighlightedItem_(),this.shouldAnimateIn=!0)}, handleLiveChatAction_:function(a){a.addLiveChatTickerItemAction?this.unshift("items",a.addLiveChatTickerItemAction.item):a.markChatItemAsDeletedAction?this.handleMarkChatItemAsDeletedAction_(a.markChatItemAsDeletedAction):a.removeChatItemAction?this.removeTickerItemById_(a.removeChatItemAction.targetItemId):a.markChatItemsByAuthorAsDeletedAction&&this.handleMarkChatItemsByAuthorAsDeletedAction_(a.markChatItemsByAuthorAsDeletedAction)}, maybeClampScroll_:function(){if(this.highlightId){var a=this.$$("#"+this.highlightId),b=a.offsetLeft;a=b+a.offsetWidth;var c=this.$.items,d=c.scrollLeft;c=d+c.offsetWidth-24;b=d+24-b;0=this.$.items.scrollWidth-this.$.container.clientWidth}, handleChatSeekSuccess_:function(){this.clearList()}, handlePauseReplay_:function(){this._setIsReplayPaused(!0)}, handleResumeReplay_:function(){this._setIsReplayPaused(!1)}});var L0a;var M0a;Polymer({is:"yt-live-chat-upsell-dialog-renderer",_template:function(){if(void 0!==M0a)return M0a;var a=document.createElement("template");a.innerHTML="
\n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L0a){var d=document.createElement("template");d.innerHTML=""; L0a=d}d=L0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return M0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hasHeader:{type:Boolean,computed:"computeHasHeader_(data)"}},behaviors:[Z,X.YtRendererBehavior,sYa],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},dataChanged_:function(a){this.hidden=!a.isVisible;a.isVisible||this.impressionLog()}, onButtonClick_:function(){this.fire("yt-close-upsell-dialog")}, computeHasHeader_:function(a){return!!a.headerBackgroundImage}});var N0a;var O0a;var IP=function(){var a=O.apply(this,arguments)||this;a.selectedAmountIndex=1;return a}; p(IP,O);e=IP.prototype;e.onAmountTap=function(a){this.selectedAmountIndex=this.$.amounts.indexForElement(a.currentTarget)}; e.onCheckboxTap=function(){this.updateDonationPrivacyInEndpoint_()}; e.onCloseTap=function(){this.hasAttribute("live-chat")&&(this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow"),this.ytLiveChatErrorMessageBehavior.setErrorRenderer(null))}; e.onDonateButtonTap=function(){if(this.hasAttribute("live-chat")){var a=this.data.payFromLiveChat;a.ypcGetCartEndpoint&&this.ytActionSenderBehavior.sendAction("yt-live-chat-start-buy-flow",[a,{},this.donationCallback_.bind(this)])}else this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[this.is]),(a=KM(this))&&a.getPlayerPromise().then(function(b){b.pauseVideo()}.bind(this))}; e.donationCallback_=function(a){a.success?(this.hasAttribute("live-chat")&&a.response&&a.response.data&&a.response.data.actions&&this.ytActionSenderBehavior.sendAction("yt-live-chat-open-popup",[a.response.data.actions[0]]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[this.is]),this.ytActionSenderBehavior.sendAction("yt-live-chat-close-buy-flow")):a.errorMessageRenderer&&this.ytLiveChatErrorMessageBehavior.setErrorRenderer(a.errorMessageRenderer)}; e.selectedAmountIndexChanged_=function(){this.isCustomAmountSelected()&&this.$["custom-amount-input"].focus()}; e.computeButtonRenderers=function(){return this.data?this.data.suggestedAmounts.map(function(a){return{style:"STYLE_SUGGESTIVE",text:a.label}}):[]}; e.updateAmountInEndpoint_=function(){var a=this.getAmountMicros_();if(a){var b=this.hasAttribute("live-chat")?this.get("payFromLiveChat",this.data):this.get("donateButton.buttonRenderer.command",this.data);if(b.ypcGetCartEndpoint)b.ypcGetCartEndpoint.donationAmountMicros=a;else if(b.urlEndpoint){var c=new kq(b.urlEndpoint.url);ar(c,"amount",a);b.urlEndpoint.url=c.toString()}}}; e.updateDonationPrivacyInEndpoint_=function(){var a=this.hasAttribute("live-chat")?this.get("payFromLiveChat.ypcGetCartEndpoint",this.data):this.get("donateButton.buttonRenderer.command.ypcGetCartEndpoint",this.data);a&&(a.productData={donationData:{isAnonymousDonation:!this.$["privacy-checkbox"].checked}})}; e.getAmountMicros_=function(){return this.getSelectedButtonAmount_()||1E6*Number(this.$["custom-amount-input"].value)}; e.getSelectedButtonAmount_=function(){return this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)}; e.isSelected_=function(a){return a===this.selectedAmountIndex}; e.isCustomAmountSelected=function(){return-1==this.selectedAmountIndex?!1:!this.get("suggestedAmounts."+this.selectedAmountIndex+".amountMicros",this.data)}; e.shouldHideCheckbox=function(a){return!a}; e.validateAmount=function(){var a=this.isAmountValid(this.customAmount),b=""===this.customAmount;this.isCustomAmountSelected()&&!a?this.disableButton_():-1===this.selectedAmountIndex?this.disableButton_():this.enableButton_();this.setInputError_(!a&&!b)}; e.isAmountValid=function(a){if(""===a)return!1;a=1E6*Number(a);var b=this.get("minAmountMicros",this.data),c=this.get("maxAmountMicros",this.data);return b&&ac?!1:!0}; e.setInputError_=function(a){a?this.$["custom-amount-input"].setAttribute("invalid",""):this.$["custom-amount-input"].removeAttribute("invalid")}; e.enableButton_=function(){this.set("data.donateButton.buttonRenderer.isDisabled",!1)}; e.disableButton_=function(){this.set("data.donateButton.buttonRenderer.isDisabled",!0)}; g.Object.defineProperties(IP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O0a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
[[getSimpleString(data.pickerTitle)]]
\n \n \n \n
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.campaignTitle)]]\n
\n
\n [[getSimpleString(data.campaignSubtitle)]]\n
\n
\n
\n
\n [[getSimpleString(data.campaignDescription)]]\n
\n
\n
\n
\n
\n
\n [[getSimpleString(data.campaignDescription)]]\n
\n
\n
\n
\n
\n
\n
\n
\n [[getSimpleString(data.nonprofitTitle)]]\n \n \n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n\n \n\n
\n\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N0a){var d=document.createElement("template");d.innerHTML=""; N0a=d}d=N0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O0a=a}a=O0a;return a}}}); var JP=IP;JP.prototype.validateAmount=JP.prototype.validateAmount;JP.prototype.updateDonationPrivacyInEndpoint_=JP.prototype.updateDonationPrivacyInEndpoint_;JP.prototype.updateAmountInEndpoint_=JP.prototype.updateAmountInEndpoint_;w([P(iO.YtLiveChatErrorMessageBehavior),x("design:type",Object)],JP.prototype,"ytLiveChatErrorMessageBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],JP.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],JP.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],JP.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],JP.prototype,"data",void 0);w([R({observer:"selectedAmountIndexChanged_"}),x("design:type",Object)],JP.prototype,"selectedAmountIndex",void 0);w([R(),x("design:type",String)],JP.prototype,"customAmount",void 0); w([U("data","selectedAmountIndex","customAmount"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JP.prototype,"updateAmountInEndpoint_",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JP.prototype,"updateDonationPrivacyInEndpoint_",null);w([U("data","selectedAmountIndex","customAmount"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JP.prototype,"validateAmount",null); JP=w([V({is:"ytd-donation-amount-picker-renderer"})],JP);var P0a;var Q0a;var KP=function(){var a=O.apply(this,arguments)||this;a.alignAuto=!1;a.collapsed=!0;a.canCollapse=!0;a.collapsedHeight=80;a.disableExpand=!1;a.alwaysCollapsible=!1;a.reversed=!1;a.shouldUseNumberOfLines=!1;a.recomputeOnResize=!1;a.canCollapseJobId_=0;return a}; p(KP,O);e=KP.prototype;e.alwaysCollapsibleChanged=function(a){a&&(this.canCollapse=!0)}; e.reversedChanged_=function(a,b){if(a&&!b||b&&!a){a=Polymer.dom(this.root);b=a.childNodes;for(var c=document.createDocumentFragment(),d=a.childNodes.length-1;0<=d;d--)Polymer.dom(c).appendChild(b[d]);a.appendChild(c)}}; e.ready=function(){var a=this;this.async(function(){return a.initChildrenObserver_()},1)}; e.detached=function(){this.detachObserver_()}; e.toggle=function(a,b){this.canCollapse&&(this.collapsed=b,a&&a.stopPropagation())}; e.reset=function(){this.childrenChanged_()}; e.onIronResize=function(){this.recomputeOnResize&&this.childrenChanged_()}; e.computeIsMoreVisible_=function(a,b){return a&&b}; e.computeShouldUseNumberOfLines_=function(a){return!!a&&CSS.supports("-webkit-line-clamp","1")}; e.computeIsLessVisible_=function(a,b){return a&&!b}; e.observeCollapsedHeightAndMaxLines_=function(){var a=this.collapsedHeight,b=this.maxNumberOfLines;this.shouldUseNumberOfLines?this.updateStyles({"--ytd-expander-max-lines":""+b,"--ytd-expander-collapsed-height":""}):this.updateStyles({"--ytd-expander-collapsed-height":a+"px","--ytd-expander-max-lines":""})}; e.handleMoreTap_=function(a){this.disableExpand||(this.fire("yt-expander-more-tapped"),this.toggle(a,!1))}; e.handleLessTap_=function(a){this.fire("yt-expander-less-tapped");this.toggle(a,!0)}; e.initChildrenObserver_=function(){var a=this;this.observer_=new MutationObserver(function(){return a.childrenChanged_()}); this.observer_.observe(this.$.content,{subtree:!0,childList:!0,attributes:!0});this.childrenChanged_()}; e.childrenChanged_=function(){var a=this;this.alwaysCollapsible?this.canCollapse=this.alwaysCollapsible:this.canCollapseJobId_||(this.canCollapseJobId_=window.requestAnimationFrame(function(){Hk(function(){a.canCollapseJobId_=0;a.calculateCanCollapse_()})}))}; e.calculateCanCollapse_=function(){this.canCollapse=this.shouldUseNumberOfLines?this.alwaysCollapsible||this.$.content.offsetHeightthis.collapsedHeight}; e.detachObserver_=function(){this.observer_&&this.observer_.disconnect()}; g.Object.defineProperties(KP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Q0a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P0a){var d=document.createElement("template");d.innerHTML=""; P0a=d}d=P0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q0a=a}a=Q0a;return a}}}); var LP=KP;LP.prototype.observeCollapsedHeightAndMaxLines_=LP.prototype.observeCollapsedHeightAndMaxLines_;LP.prototype.onIronResize=LP.prototype.onIronResize;w([P(TH),x("design:type",Object)],LP.prototype,"ironResizableBehavior",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],LP.prototype,"alignAuto",void 0);w([R({notify:!0,reflectToAttribute:!0}),x("design:type",Object)],LP.prototype,"collapsed",void 0);w([R({notify:!0}),x("design:type",Object)],LP.prototype,"canCollapse",void 0); w([R(),x("design:type",Object)],LP.prototype,"collapsedHeight",void 0);w([R(),x("design:type",Object)],LP.prototype,"disableExpand",void 0);w([R({observer:"alwaysCollapsibleChanged"}),x("design:type",Object)],LP.prototype,"alwaysCollapsible",void 0);w([R({observer:"reversedChanged_"}),x("design:type",Object)],LP.prototype,"reversed",void 0);w([R(),x("design:type",Number)],LP.prototype,"maxNumberOfLines",void 0); w([R({reflectToAttribute:!0,computed:"computeShouldUseNumberOfLines_(maxNumberOfLines)"}),x("design:type",Object)],LP.prototype,"shouldUseNumberOfLines",void 0);w([R(),x("design:type",Object)],LP.prototype,"recomputeOnResize",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],LP.prototype,"onIronResize",null); w([U("maxNumberOfLines","collapsedHeight"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],LP.prototype,"observeCollapsedHeightAndMaxLines_",null);LP=w([V({is:"ytd-expander"})],LP);var R0a={YtBooleanLogicBehavior:{bindIf:function(a,b,c){return a?b:c}, bindIfDefined:function(a,b){return void 0!==a?a:b}, booleanString:function(a){return(!!a).toString()}, equals:function(a){for(var b=arguments[0],c=1;cb}, isLessThan:function(a,b){return a=b-this.PARTICIPANT_TIME_USEC_&&this.addParticipant(c)}},this); this.checkForStaleParticipants_()}, trimOldParticipants_:function(){for(var a=1E3*Date.now(),b=this.participants.length-1;0<=b;b--){var c=this.participants[b];c=c[Object.keys(c)[0]];c.timestampUsec&&c.timestampUsec=c||1b)&&this.fireSeekContinuation_(a);this.previousProgressSec_=a;return b}, fireSeekContinuationAtCurrentProgress:function(){this.fireSeekContinuation_(this.previousProgressSec_)}, fireSeekContinuation_:function(a){this.previousProgressSec_=a;this.fire("yt-load-seek-continuation",this.getContinuationUrl_.bind(this,1E3*a))}, getContinuationUrl_:function(a,b){a={ctoken:this.data.continuation,currentPlayerTimeMsec:Math.floor(a)};this.data.clickTrackingParams&&(a.itct=this.data.clickTrackingParams);return Id(b,a)}});Polymer({is:"yt-timed-continuation",properties:{data:{type:Object,observer:"dataChanged_"}},created:function(){this.asyncHandle_=null}, attached:function(){this.scheduleCallback_()}, detached:function(){null!==this.asyncHandle_&&(this.cancelAsync(this.asyncHandle_),this.asyncHandle_=null)}, dataChanged_:function(){this.scheduleCallback_()}, forceTrigger:function(a){this.trigger_(a)}, scheduleCallback_:function(){this.isAttached&&this.data&&(null!==this.asyncHandle_&&this.cancelAsync(this.asyncHandle_),this.asyncHandle_=this.async(this.trigger_,this.data.timeoutMs))}, trigger_:function(a){a=void 0===a?{}:a;this.asyncHandle_&&this.cancelAsync(this.asyncHandle_);this.asyncHandle_=null;this.fire("yt-load-timed-continuation",this.getContinuationUrl.bind(this,a))}, getContinuationUrl:function(a,b){var c={ctoken:this.data.continuation};this.data.clickTrackingParams&&(c.itct=this.data.clickTrackingParams);return Id(b,Object.assign(c,a))}});var OP={YtEventForwardingBehavior:{created:function(){this.eventSink_=null;this.eventList_=[]}, forwardEvent_:function(a,b){var c=this.eventSink_.isConnected;void 0===c&&(c=document.body.contains(this.eventSink_));c&&(a.stopPropagation(),this.eventSink_.fire?this.eventSink_.fire(a.type,b):Am(new Ul("eventSink_.fire is undefined",this.eventSink_.is)))}, startForwardingEvents:function(a,b){this.eventSink_&&this.stopForwardingEvents();for(var c=0;c
\n \n \n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W0a){var d=document.createElement("template");d.innerHTML=""; W0a=d}d=W0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return X0a=a}, behaviors:[X.YtRendererBehavior,OP.YtEventForwardingBehavior,Z],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},boundOnTap_:{type:Function,value:function(){return this.onTap_.bind(this)}}}, observers:["observeImpressionEndpoints_(data.promoConfig.impressionEndpoints)"],stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}},"data.acceptButton":{id:"accept-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnTap_]]"}}}}},computeHasButtons_:function(a){return!(!a.dismissButton&&!a.acceptButton)}, computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"}, observeImpressionEndpoints_:function(){var a=this;this.data&&this.data.promoConfig&&this.data.promoConfig.impressionEndpoints&&this.data.promoConfig.impressionEndpoints.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.sendServiceRequestAction([b])})}, onTap_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"])}});var Y0a=new Cl("yt-live-chat"); Polymer({is:"yt-live-chat-renderer",_template:function(){if(void 0!==E0a)return E0a;var a=document.createElement("template");a.innerHTML="
\n\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pZa){var d=document.createElement("template");d.innerHTML=""; pZa=d}d=pZa;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===D0a&&(d=document.createElement("template"),d.innerHTML="", D0a=d);d=D0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return E0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},hideTimestamps:{type:Boolean,value:function(){return!Y0a.get("show-timestamps")}, observer:"hideTimestampsChanged_",reflectToAttribute:!0},hasTicker:{type:Boolean,computed:"toBool(data.ticker)",reflectToAttribute:!0},emojiManager:{type:Object,value:function(){return new AO(jk("live_chat_unicode_emoji_json_url"))}}, participantsManager:{type:Object,value:function(){return document.createElement("yt-live-chat-participants-manager")}}, selectedTab:{type:Number,value:0,notify:!0},messageBuyFlowRenderer:Object,stickerBuyFlowRenderer:Object,donationFlowRenderer:Object,actionPanelRenderer:Object,hasActionPanelRenderer:{type:Boolean,computed:"toBool(actionPanelRenderer)",reflectToAttribute:!0},isClosingActionPanel:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"isClosingActionPanelChanged"},selectedPanel:{type:Number,value:0,observer:"selectedPanelChanged_"},hasPickerOpen:{type:Boolean,value:!1,reflectToAttribute:!0},dialog:Object, hidden:{type:Boolean,reflectToAttribute:!0,computed:"computeIsChatHidden_(data)"}},behaviors:[r_a,$O.YtLiveChatReplayBehavior,R0a.YtBooleanLogicBehavior,Z,{getScrollbarWidth:function(){null==S0a&&(S0a=this.calculateScrollbarWidth_());return S0a}, calculateScrollbarWidth_:function(){var a=document.createElement("div");a.style.height="100px";a.style.overflow="scroll";a.style.top="-9999px";a.style.width="100px";Polymer.dom(this.root).appendChild(a);var b=a.offsetWidth-a.clientWidth;Polymer.dom(this.root).removeChild(a);return b}}, xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,p_a,X.YtRendererBehavior,U0a],listeners:{"yt-participants-back-button":"onParticipantsBackButton_","yt-live-chat-pinned-message-update":"onUpdatePinnedMessage_","yt-navigate":"onYtNavigate_","yt-action":"onYtAction_","yt-close-upsell-dialog":"onYtCloseUpsellDialog_","yt-load-reload-continuation":"onReloadContinuation_","yt-live-chat-continuation-behavior-reload-success":"onReloadContinuationConclusion_","yt-live-chat-continuation-behavior-reload-failure":"onReloadContinuationConclusion_", "yt-live-chat-add-tooltip-target":"registerElementForSupportingTooltips_","yt-live-chat-clear-pinned-message":"clearPinnedMessage_","yt-live-chat-attach-visual-element":"attachVisualElement_"},observers:["actionsChanged_(data.actions, isAttached)"],queuedTooltips_:[],queuedActionPanel_:null,stampDom:{"data.itemList":{id:"item-list",mapping:{liveChatItemListRenderer:{component:"yt-live-chat-item-list-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}}, "data.ticker":{id:"ticker",mapping:{liveChatTickerRenderer:"yt-live-chat-ticker-renderer"}},"data.promotion":{id:"overlay-dialog",mapping:{upsellDialogRenderer:"yt-live-chat-upsell-dialog-renderer"}},"data.actionPanel":{id:"input-panel",mapping:{liveChatMessageInputRenderer:{component:"yt-live-chat-message-input-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]",genericErrorMessage:"[[data.clientMessages.genericError]]"}},liveChatRestrictedParticipationRenderer:"yt-live-chat-restricted-participation-renderer"}}, messageBuyFlowRenderer:{id:"buy-flow",mapping:{liveChatMessageBuyFlowRenderer:{component:"yt-live-chat-message-buy-flow-renderer",properties:{emojiManager:"[[emojiManager]]",participantsManager:"[[participantsManager]]"}}}},stickerBuyFlowRenderer:{id:"super-sticker-buy-flow",mapping:{superStickerBuyFlowRenderer:"yt-live-chat-paid-sticker-panel-renderer"}},donationFlowRenderer:{id:"donation-flow",mapping:{donationAmountPickerRenderer:{component:"ytd-donation-amount-picker-renderer",attributes:{"live-chat":!0}}}}, dialog:{id:"dialog",mapping:{liveChatDialogRenderer:"yt-live-chat-dialog-renderer"}},actionPanelRenderer:{id:"action-panel",mapping:{liveChatActionPanelRenderer:"yt-live-chat-action-panel-renderer"},reuseComponents:!1}},actionMap:{"yt-live-chat-close-buy-flow":"closeBuyFlow_","yt-live-chat-actions":"handleLiveChatActions_","yt-show-live-chat-dialog-action":"handleShowLiveChatDialogAction_","yt-close-live-chat-action-panel-action":"handleCloseLiveChatActionPanelAction_","yt-live-chat-popup-config-ready":"onPopupConfigReady_", "yt-live-chat-picker-changed":"handlePickerChanged_"},created:function(){this.popoutWindowCheckIntervalId_=this.popoutWindow_=null;this.supportedTooltipTargets_=[];this.delayCloseActionPanelTimerId_=this.closeActionPanelTimerId_=null;this.tooltipTimerIds_=new Set}, ready:function(){Polymer.dom(this.root).appendChild(this.participantsManager);this.sharedTooltipAnimationDelay=0;this.sharedTooltipPosition="top"}, attached:function(){this.fire("resize");N("enable_native_live_chat_on_kevlar")&&(this.isPopupConfigReady=!0);this.async(function(){this.updateStyles({"--scrollbar-width":this.getScrollbarWidth()+"px"})})}, detached:function(){this.popoutWindow_=null;this.closePopoutWindow_();this.replayBuffer_=null;clearTimeout(this.closeActionPanelTimerId_);clearTimeout(this.delayCloseActionPanelTimerId_);for(var a=k(this.tooltipTimerIds_),b=a.next();!b.done;b=a.next())clearTimeout(b.value)}, dataChanged_:function(a){this.emojiManager&&a&&a.emojis&&this.emojiManager.load(a.emojis,this.emojiManager);if(this.participantsManager&&a&&(a.viewerName&&(this.participantsManager.viewerName=a.viewerName),a=this.get("participantsList.liveChatParticipantsListRenderer.participants",a)))for(var b=0;b .iron-selected");(a=a&&a.children[0])&&a.focus();this.async(function(){this.sendAction("yt-live-chat-scroll-to-bottom")})}}, hideTimestampsChanged_:function(a){Y0a.set("show-timestamps",!a);this.updateStyles()}, isClosingActionPanelChanged:function(){!this.isClosingActionPanel&&this.queuedActionPanel_&&(this.set("actionPanelRenderer",this.queuedActionPanel_),this.queuedActionPanel_=null)}, computeIsChatHidden_:function(a){return a&&a.initialDisplayState?"LIVE_CHAT_DISPLAY_STATE_HIDDEN"==a.initialDisplayState:this.hidden}, handleLiveChatActions_:function(a){a.forEach(function(b){b.replayChatItemAction&&this.handleLiveChatActions_(b.replayChatItemAction.actions||[]);b.replaceLiveChatRendererAction?this.handleReplaceRendererAction_(b.replaceLiveChatRendererAction):b.showLiveChatDialogAction?this.handleShowLiveChatDialogAction_(b):b.showLiveChatSurveyCommand?this.handleShowLiveChatSurveyCommand_(b.showLiveChatSurveyCommand):b.showLiveChatTooltipCommand?this.handleShowLiveChatTooltipCommand_(b):b.showLiveChatActionPanelAction? this.handleShowLiveChatActionPanelAction_(b.showLiveChatActionPanelAction):b.closeLiveChatActionPanelAction&&this.handleCloseLiveChatActionPanelAction_(b)},this)}, handleShowLiveChatActionPanelAction_:function(a){a.panelToShow&&(this.isClosingActionPanel?this.queuedActionPanel_=a.panelToShow:this.set("actionPanelRenderer",a.panelToShow))}, handleCloseLiveChatActionPanelAction_:function(a,b){var c=this;b=void 0===b?!1:b;var d=this.get("liveChatActionPanelRenderer.id",this.actionPanelRenderer),f=this.get("closeLiveChatActionPanelAction.targetPanelId",a),h=this.get("closeLiveChatActionPanelAction.delayMs",a);d===f?0
\n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z0a){var d=document.createElement("template");d.innerHTML=""; Z0a=d}d=Z0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$0a=a}a=$0a;return a}}}); var QP=PP;w([P(X.YtRendererBehavior),x("design:type",Object)],QP.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],QP.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],QP.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],QP.prototype,"shelf",void 0);w([R({reflectToAttribute:!0,computed:"computeMessageStyle(data.style.value)"}),x("design:type",Boolean)],QP.prototype,"componentStyle",void 0); QP=w([V({is:"ytd-message-renderer"})],QP);var a1a;var b1a;var c1a={};c1a.YtToggleButtonBehavior=[xO.YtActionHandlerBehavior,bYa,{_noAccessors:!0,properties:{data:Object},observers:["stateChanged_(data)","stateChanged_(data.isToggled)","stateChanged_(data.defaultText)","stateChanged_(data.toggledText)","stateChanged_(forceIconOnly)"],created:function(){this.toggleButtonActionMap_={"yt-update-toggle-button-text-action":"handleUpdateToggleButtonTextAction_","yt-update-toggle-button-state-command":"handleUpdateToggleButtonStateCommand_"}}, attached:function(){this.registerActionMap(this.toggleButtonActionMap_)}, detached:function(){this.unregisterActionMap(this.toggleButtonActionMap_)}, onYtToggleButtonTapHandler:function(){}, onYtButtonTapHandler:function(){if(!this.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}b=this.data.defaultServiceEndpoint||null;var c=this.data.toggledServiceEndpoint||null;if(b&&c||b&&this.data.preventAutoToggle)a=a?c:b,this.sendServiceRequestAction([a]),this.fire("yt-execute-service-endpoint",{serviceEndpoint:a})}}, stateChanged_:function(){var a=this.data;if(a){var b=a.isToggled;this._setEndpoint(this.computeEndpoint_(a));this._setServiceEndpoint(this.computeServiceEndpoint_(a));this._setButtonIcon(this.computeButtonIcon_(a,b));this._setButtonText(this.computeButtonText_(a,b));this._setButtonAccessibility(this.computeAccessibility_(a,b));this._setButtonTooltip(this.computeTooltip_(a,b));this._setButtonClass(this.computeButtonClass_(a,b));this._setIconPositionType(this.computeIconPositionType_(a));this.updateRenderedElements(); this.elements_.button&&("yt-icon-button"===this.elements_.button.is?(this.elements_.button.toggleable=!0,this.elements_.button.pressed=b):this.elements_.button.setAttribute("aria-pressed",b))}}, toggle:function(a){this.set("data.isToggled",void 0!==a?a:!this.data.isToggled)}, isModal_:function(){return!!this.endpoint&&(!!this.endpoint.modalEndpoint||!!this.endpoint.shareEndpoint||!!this.endpoint.shareEntityEndpoint)}, computeEndpoint_:function(a){return a&&a.defaultNavigationEndpoint||null}, computeButtonIcon_:function(a,b){var c=a&&a.defaultIcon?a.defaultIcon.iconType.toLowerCase():null;a=a&&a.toggledIcon?a.toggledIcon.iconType.toLowerCase():c;return b?a:c}, handleUpdateToggleButtonStateCommand_:function(a){a=a.updateToggleButtonStateCommand;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&this.toggle(a.toggled)}, computeButtonText_:function(a,b){return a?b&&a.toggledText||a.defaultText||null:null}, computeAccessibility_:function(a,b){return a?(b?this.get("toggledAccessibilityData.accessibilityData",a):this.get("accessibilityData.accessibilityData",a))||a.accessibility||null:null}, computeTooltip_:function(a,b){return a?b&&a.toggledTooltip||a.defaultTooltip||null:null}, computeButtonClass_:function(a,b){if(!a)return"";var c="",d=a.toggledStyle||a.style;if(b=b?d:a.style)b.styleType&&(b=b.styleType),c+=b.toLowerCase().replace(/_/g,"-")+" ";if(a=a.size)a.sizeType&&(a=a.sizeType),c+=a.toLowerCase().replace(/_/g,"-")+" ";return c.trim()}, computeIconPositionType_:function(a){return a&&a.iconPosition||null}, computeServiceEndpoint_:function(a){var b=a&&a.serviceEndpoint,c=this.get("data.command.commandMetadata.webCommandMetadata.sendPost");return b?b:c&&a.command?a.command:null}, handleUpdateToggleButtonTextAction_:function(a){a=a.updateToggleButtonTextAction;this.get("toggleButtonSupportedData.toggleButtonIdData.id",this.data)==a.buttonId&&(this.set("data.defaultText",a.defaultText),this.set("data.toggledText",a.toggledText))}}];TO("sharingToggleButtonAndDefaultButton","toggleButtonRenderer",{component:"ytd-toggle-button-renderer",params:{noink:!0}});var RP=function(){return O.apply(this,arguments)||this}; p(RP,O);RP.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; RP.prototype.onYtButtonTapHandler=function(){if(!this.ytToggleButtonBehavior.isModal_()){var a=this.data.isToggled;if(!this.data.preventAutoToggle){this.ytToggleButtonBehavior.toggle();var b={toggled:this.data.isToggled,actions:{}};b.actions[this.ytToggleButtonBehavior.buttonIcon]=this.data.isToggled;this.fire("yt-toggle-button",b)}if(a=a?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint){b=this.get("commandMetadata.webCommandMetadata.apiUrl",a);var c=this.get("commandMetadata.webCommandMetadata.sendPost", a);b&&c?this.ytActionSenderBehavior.sendServiceRequestAction([a]):this.ytActionSenderBehavior.sendInnerTubeActions([a],this)}}}; RP.prototype.onYtNavigate=function(a){var b=this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.ytdOpenPopupBehavior.openPopup(b))}; g.Object.defineProperties(RP,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b1a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a1a){var d=document.createElement("template");d.innerHTML=""; a1a=d}d=a1a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b1a=a}a=b1a;return a}}}); var SP=RP;SP.prototype.onYtNavigate=SP.prototype.onYtNavigate;w([P(W.YtActionSenderBehavior),x("design:type",Object)],SP.prototype,"ytActionSenderBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],SP.prototype,"ytdOpenPopupBehavior",void 0);w([P(c1a.YtToggleButtonBehavior),x("design:type",Object)],SP.prototype,"ytToggleButtonBehavior",void 0);w([R(),x("design:type",Object)],SP.prototype,"data",void 0);w([R({value:!0}),x("design:type",Boolean)],SP.prototype,"showTooltips",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],SP.prototype,"onYtNavigate",null);SP=w([V({is:"ytd-toggle-button-renderer"})],SP);var TP={created:function(){this.playerListeners_=new Map}, getPlayerListenerKey_:function(a,b){return a+":"+Sa(b)}, getPlayerListener_:function(a,b,c){a=this.getPlayerListenerKey_(a,b);b=this.playerListeners_.get(a);c&&this.playerListeners_.delete(a);return b}, savePlayerListener_:function(a,b){var c=b.bind(this);this.playerListeners_.set(this.getPlayerListenerKey_(a,b),c);return c}, listenToPlayerEvent:function(a,b,c){c=this.savePlayerListener_(b,c);a.addEventListener(b,c)}, listenToPlayerEvents:function(a,b){b.forEach(function(c,d){this.listenToPlayerEvent(a,d,c)}.bind(this))}, unlistenFromPlayerEvent:function(a,b,c){c=this.getPlayerListener_(b,c,!0);a.removeEventListener(b,c)}, unlistenFromPlayerEvents:function(a,b){b.forEach(function(c,d){this.unlistenFromPlayerEvent(a,d,c)}.bind(this))}},d1a=function(){};var e1a;Polymer({is:"yt-payments-manager",_template:function(){if(void 0!==e1a)return e1a;var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);return e1a=a}, behaviors:[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,kO.YtComponentBehavior],actionMap:{"yt-live-chat-start-buy-flow":"handleLiveChatBuyFlow_"},handleLiveChatBuyFlow_:function(a,b,c){var d=YL();d&&jM(d,a)?ZL(YL(),a,b).then(function(f){return{data:f}}).then(this.handleGetCartResponse_.bind(this,c),this.handleFlowError_.bind(this,c),this):this.getInterface(FM).requestDataForServiceEndpoint(a,b).then(this.handleGetCartResponse_.bind(this,c),this.handleFlowError_.bind(this,c),this)}, handleGetCartResponse_:function(a,b){if(b.data&&b.data.messageRenderer)this.handleFlowError_(a,b);else{var c=function(d){d.buyFlowResponse?this.handleBuyFlowResponse_(a,b,d.buyFlowResponse):d.error?this.handleFlowError_(a,d.error):this.handleFlowClosed_(a)}.bind(this); this.sendAction("yt-open-payments-dialog",[b,c])}}, handleBuyFlowResponse_:function(a,b,c){var d=this;this.sendAction("yt-wallet-dialog-completed");if(c.data&&c.data.messageRenderer)this.handleFlowError_(a,c);else if("undefined"==c.integratorData)Zm(new Ul("Buy flow returned 'undefined' in place of integratorData",c.internalErrorDetails)),this.handleFlowError_(a,{});else if(null!=c.error)Am(new Ul("Buy flow returned error code",c.error,c.internalErrorDetails)),this.handleFlowError_(a,{});else{c={payments_payload:btoa(c.integratorData),buybucket_params:b.data.buybucketParams}; var f=YL(),h=b.data.completeTransactionEndpoint;(f&&jM(f,h)?ZL(YL(),h,c).then(function(l){return{data:l}}):this.getInterface(FM).requestDataForServiceEndpoint(h,c)).then(function(l){d.handleCompleteTransactionSuccess_(a,h,l)},function(l){d.handleCompleteTransactionError_(a,h,l)})}}, handleFlowClosed_:function(){this.sendAction("yt-wallet-dialog-closed")}, handleFlowError_:function(a,b){var c={success:!1},d=function(f){return{liveChatErrorMessageRenderer:{errorText:{runs:[{text:f}]}}}}; b&&b.data&&b.data.messageRenderer?c.errorMessageRenderer=b.data.messageRenderer:b&&b.error&&b.error.message?c.errorMessageRenderer=d(b.error.message):b&&b.result&&b.result.error&&b.result.error.message&&(c.errorMessageRenderer=d(b.result.error.message));a(c)}, handleCompleteTransactionSuccess_:function(a,b,c){c.data||(c={data:c});var d=void 0;b&&b.ypcCompleteTransactionEndpoint&&(d=b.ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams);c.data.messageRenderer?(ZN("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",d),this.handleFlowError_(a,c)):(kWa(d),a({success:!0,response:c}))}, handleCompleteTransactionError_:function(a,b,c){var d=void 0;b&&b.ypcCompleteTransactionEndpoint&&(d=b.ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams);ZN("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",d);this.handleFlowError_(a,c)}});Polymer({is:"yt-native-buyflow-launcher",behaviors:[xO.YtActionHandlerBehavior],actionMap:{"yt-open-payments-dialog":"onStartWalletBuyFlow_"},onStartWalletBuyFlow_:function(a,b){oWa(aO.getInstance(),a.data.encryptedPurchaseParams.replace(/-/g,"+").replace(/_/g,"/"),this.onDialogSuccess_.bind(this,b),void 0,this.onDialogError_.bind(this,b),void 0,void 0,this.onDialogClose_.bind(this,b),a.data.serializedTransactionFlowLoggingParams,a.data.serializedPaymentsClientParams)}, onDialogSuccess_:function(a,b){a({success:!0,buyFlowResponse:b})}, onDialogClose_:function(a){a({success:!1,closed:!0})}, onDialogError_:function(a,b){a({success:!1,error:b})}});Polymer({is:"yt-live-chat-kevlar-container",_template:function(){if(void 0!==f0a)return f0a;var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e0a){var d=document.createElement("template");d.innerHTML=""; e0a=d}d=e0a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return f0a=a}, properties:{data:{type:Object,observer:"dataChanged_"},computedData:{type:Object,computed:"computeChatData_(data, chatCollapsed)"},isChatHiddenByUser:{type:Boolean},chatCollapsed:{type:Boolean,value:!1,computed:"isChatCollapsed_(data, isChatHiddenByUser)",reflectToAttribute:!0}},stampDom:{computedData:{id:"chat",mapping:{liveChatRenderer:"yt-live-chat-renderer"}},"computedData.liveChatRenderer.showHideButton":{id:"show-hide-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}}},behaviors:[xO.YtActionHandlerBehavior, W.YtActionSenderBehavior,kO.YtComponentBehavior,LO.YtOpenPopupBehavior,Z,OO.YtEndpointBehavior,TP],listeners:{"yt-navigate":"onYtNavigate_","yt-toggle-button":"onYtToggleButton_"},actionMap:{"yt-live-chat-open-popup":"onOpenPopup_"},created:function(){this.playerEvents_=new tj;this.playerEvents_.set("onAdStart",this.onAdStart_);this.playerEvents_.set("onAdEnd",this.onAdEnd_);this.playerEvents_.set("onStateChange",this.onPlayerStateChange_);this.playerEvents_.set("onVideoProgress",this.onVideoProgressChange_); this.player=null}, ready:function(){N("kevlar_watch_color_update")&&document.documentElement.setAttribute("watch-color-update","")}, attached:function(){this.isChatReplay(this.data)&&this.setupPlayerEvents_();N("load_recaptcha_v3_binary_on_kevlar")&&Zn.getInstance().parkOrScheduleJob(function(){lZa()},2,"eocs",16)}, detached:function(){this.disconnectFromPlayer()}, dataChanged_:function(a){this.isChatReplay(a)?this.setupPlayerEvents_():this.disconnectFromPlayer();if(a.liveChatRenderer&&a.liveChatRenderer.showHideButton&&a.liveChatRenderer.showHideButton.toggleButtonRenderer&&"boolean"===typeof this.isChatHiddenByUser){var b=a.liveChatRenderer.showHideButton.toggleButtonRenderer;if(this.isChatHiddenByUser&&!this.isChatsInitialStateCollapsed_(a)||!this.isChatHiddenByUser&&this.isChatsInitialStateCollapsed_(a))b.isToggled=!b.isToggled}else this.isChatHiddenByUser= void 0}, isChatsInitialStateCollapsed_:function(a){return"LIVE_CHAT_DISPLAY_STATE_COLLAPSED"===a.liveChatRenderer.initialDisplayState}, setupPlayerEvents_:function(){var a=this,b;return Aa(function(c){if(a.isListeningForPlayerProgress)return c.jumpTo(0);b=MM(a);a.isListeningForPlayerProgress=!0;return q(c,b.getPlayerPromise().then(a.onPlayerApiReady.bind(a)),0)})}, setPlayer:function(a){this.player&&this.unlistenFromPlayerEvents(this.player,this.playerEvents_);(this.player=a)&&this.listenToPlayerEvents(this.player,this.playerEvents_)}, onPlayerApiReady:function(a){this.setPlayer(a)}, disconnectFromPlayer:function(){this.setPlayer(null);this.isListeningForPlayerProgress=!1}, onAdStart_:function(){this.sendOptionalAction("yt-live-player-ad-start")}, onAdEnd_:function(){this.sendOptionalAction("yt-live-player-ad-end")}, onPlayerStateChange_:function(a){this.sendOptionalAction("yt-live-player-state-change",[a])}, onVideoProgressChange_:function(a){this.sendOptionalAction("yt-live-player-video-progress",[a])}, computeChatData_:function(a,b){return a&&a.liveChatRenderer&&b?{liveChatRenderer:{showHideButton:a.liveChatRenderer.showHideButton,initialDisplayState:a.liveChatRenderer.initialDisplayState}}:a}, isChatCollapsed_:function(a,b){return void 0!==b?b:a?a.conversationBarRenderer&&a.conversationBarRenderer.availabilityMessage?!0:a.liveChatRenderer?this.isChatsInitialStateCollapsed_(a):!1:!1}, isChatReplay:function(a){return!!(a&&a.liveChatRenderer&&a.liveChatRenderer.isReplay)}, onYtToggleButton_:function(){this.isChatHiddenByUser=!this.chatCollapsed}, onOpenPopup_:function(a){this.openPopup(a)}, onYtNavigate_:function(a,b){b.endpoint.ypcGetOffersEndpoint&&N("enable_native_live_chat_on_kevlar")&&(a.stopPropagation(),this.sendServiceRequestAction([b.endpoint]))}});var f1a=function(){return zE.apply(this,arguments)||this}; p(f1a,zE); var UP=function(a,b,c){if(null!=b&&(g1a(b.viewableCommands)||g1a(b.endOfSessionCommands))){a.classList.add("GoogleActiveViewElement");a.setAttribute("id","YtKevlarVisibilityIdentifier");a.setAttribute("googleAvRs",c);var d="data-"+Lc("googleAvCxn");c="data-"+Lc("googleEOSAvCxn");d=b.viewableCommands&&h1a(a,b.viewableCommands,d);b=b.endOfSessionCommands&&h1a(a,b.endOfSessionCommands,c);if(d||b)Aw.getInstance(),b=Uv(Wv,a),c=lw(mw,Qf,!1),c.r="ac",b&&(mw.dbg.adBlocksRegistered=Qf.__google_lidar_,b.activeviewPingSent|| dta([b],c,void 0),eta([b],c),Isa(b)),qta(Aw.getInstance(),a)}},g1a=function(a){return!!a&&0a.getBoundingClientRect().top,YP(this)}; e.onYtAutonavPauseUserEngagement_=function(a){var b=this;N("user_engagement_enable_autoplay_pause_feature")?isNaN(a.lowEngagementThresholdMs)||0>=a.lowEngagementThresholdMs||"LOW_USER_ENGAGEMENT_ACTION_PAUSE_AUTOPLAY"!==a.lowUserEngagementAction?LJ("YOU_THERE_EVENT_TYPE_F_AUTONAV_INVALID_LACT_THRESHOLD"):this.ytComponentBehavior.getInterface(WP).getTimeSinceActive()b;k1a(this);YP(this)}; e.onYtUserActivity_=function(){var a=this;this.autonavPauseReasons_.userEngagement&&(Bk(Fk,function(){LJ("YOU_THERE_EVENT_TYPE_F_AUTONAV_PAUSE_DISABLED_BY_LACT_RESET",a.userEngagementCsn_)}),this.autonavPauseReasons_.userEngagement=!1,YP(this)); this.autonavPauseReasons_.youthereLactExperiment&&(Bk(Fk,function(){LJ("YOU_THERE_EVENT_TYPE_AUTOPLAY_RESUMED",a.userEngagementCsn_);gl()}),this.autonavPauseReasons_.youthereLactExperiment=!1,YP(this)); this.autonavPauseReasons_.longIdle&&!N("disable_kevlar_resume_autonav_after_user_activity")&&(this.autonavPauseReasons_.longIdle=!1,YP(this))}; e.isInBackground_=function(){var a=window.document.visibilityState;return!(!a||"visible"===a)}; var YP=function(a){for(var b=!1,c=k(Object.values(a.autonavPauseReasons_)),d=c.next();!d.done;d=c.next())d=d.value,b=b||d;b?wL.getInstance().pause(a.autonavPauseReasons_):wL.getInstance().unpause()},k1a=function(a){var b=!1; if(N("enable_autoplay_pause_by_lact")){b=a.ytComponentBehavior.getInterface(WP);var c=1E3*ik("autoplay_pause_by_lact_sec"),d=ik("autoplay_pause_by_lact_sampling_fraction");(b=b.getTimeSinceActive()>=c&&Math.random()b&&(this.scrollTarget.scrollTop+=Math.ceil(a/b),this.autoScrollAnimationStart_=0),this.autoScrollPaused_=!1,this.autoScrollRafId_=window.requestAnimationFrame(this.boundAutoScrollHandler_))}; e.endAutoScroll_=function(){this.autoScrollPaused_=!0;window.cancelAnimationFrame(this.autoScrollRafId_)}; var $P=m1a;$P.prototype.observeAutoScrollEnabled_=$P.prototype.observeAutoScrollEnabled_;w([R(),x("design:type",Object)],$P.prototype,"scrollRate",void 0);w([R(),x("design:type",Object)],$P.prototype,"scrollTarget",void 0);w([R(),x("design:type",Boolean)],$P.prototype,"autoScrollEnabled",void 0);w([U("autoScrollEnabled"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$P.prototype,"observeAutoScrollEnabled_",null);$P=w([AE()],$P);var n1a=[$P.prototype];var aQ=function(){var a=zE.apply(this,arguments)||this;a._noAccessors=!0;a.followUpDialogPromise_=null;a.followUpDialogPromiseResolve_=null;a.followUpDialogPromiseReject_=null;return a}; p(aQ,zE);aQ.prototype.dismissableItemIsDismissedChanged_=function(a){N("kevlar_fluid_dismiss")&&(a?this.fire("yt-dismissable-item-dismissed"):this.fire("yt-dismissable-item-undismissed"))}; aQ.prototype.dismissableItemDataChanged_=function(){o1a(this)}; var o1a=function(a){a.isDismissed&&(a.isDismissed=!1);a.dismissedRenderer&&(a.dismissedRenderer=void 0);a.followUpDialogPromiseReject_&&(Xi(a.followUpDialogPromise_,La),a.followUpDialogPromiseReject_());a.followUpDialogPromise_=new Oi(function(b,c){a.followUpDialogPromiseResolve_=b;a.followUpDialogPromiseReject_=c})}; aQ.prototype.dismissableItemOnYtServiceRequestSent_=function(a,b){b.actions&&p1a(this,a,b.actions)}; var p1a=function(a,b,c){for(var d=0;db&&(a=a.createObjectStore("ResponseStore",{keyPath:["key","clientName"]}),a.createIndex("byExpiration","expireTimestampMs",{unique:!1}),a.createIndex("byInterface","clientName",{unique:!1}))}, version:1}),jQ=function(a,b){gQ.call(this,a,b);this.clientName=a;this.defaultExpirationDelayMs=b}; p(jQ,gQ);e=jQ.prototype;e.get=function(a){return Za(this,function c(){var d,f=this,h;return za(c,function(l){return 1==l.nextAddress?q(l,iQ().open(),2):3!=l.nextAddress?(d=l.yieldResult,q(l,d.get("ResponseStore",[a,f.clientName]),3)):(h=l.yieldResult)?l.return(new hQ(h)):l.return(void 0)})})}; e.putInternal=function(a,b){return Za(this,function d(){var f;return za(d,function(h){if(1==h.nextAddress)return q(h,iQ().open(),2);f=h.yieldResult;return q(h,f.put("ResponseStore",b),0)})})}; e.remove=function(a){return Za(this,function c(){var d,f=this;return za(c,function(h){if(1==h.nextAddress)return q(h,iQ().open(),2);d=h.yieldResult;return h.return(d.delete("ResponseStore",[a,f.clientName]))})})}; e.removeAll=function(){return Za(this,function b(){var c,d=this;return za(b,function(f){if(1==f.nextAddress)return q(f,iQ().open(),2);c=f.yieldResult;return q(f,Hia(c,"byInterface",IDBKeyRange.only(d.clientName)),0)})})}; e.clearExpired=function(){return Za(this,function b(){var c;return za(b,function(d){if(1==d.nextAddress)return q(d,iQ().open(),2);c=d.yieldResult;return q(d,Hia(c,"byExpiration",IDBKeyRange.upperBound(Zk().toString())),0)})})}; e.has=function(){throw Error("Synchronous access to IDB keys not implemented")};function w1a(a){a.responseContext||(a.responseContext={});a.responseContext.maxAgeSeconds=0;return a} function x1a(a){return Za(this,function c(){var d;return za(c,function(f){return 1==f.nextAddress?q(f,y1a(a,"service:topbar:fallback"),2):(d=f.yieldResult)&&iM(d)?f.return(w1a(iM(d))):f.return()})})} function z1a(a){return Za(this,function c(){var d;return za(c,function(f){return 1==f.nextAddress?q(f,y1a(a,"service:downloads_settings:fallback"),2):(d=f.yieldResult)&&iM(d)?f.return(d):f.return()})})} function y1a(a,b){return Za(this,function d(){var f;return za(d,function(h){if(1==h.nextAddress)return a?q(h,a.get(b),2):h.return();f=h.yieldResult;return!f||!iM(f)||!isNaN(Number(f.data.expireTimestampMs))&&f.isExpired()?h.return():h.return(f)})})} ;var kQ=function(a,b,c,d,f,h){var l=this;this.playerApi=a;this.store=b;this.getDownloadState=c;this.innerTubeTransportService=d;this.idbResponseStore=f;this.parsePromoPageData=h;a.addEventListener("localmediachange",function(m){m.videoId?A1a(l,m.videoId):B1a(l)}); B1a(this);C1a(this)},D1a=function(a,b,c,d,f,h){kQ.instance=new kQ(a,b,c,d,f,h)},F1a=function(a,b){return Za(a,function d(){var f=this; return za(d,function(h){return 1==h.nextAddress?(E1a(f,b),q(h,f.playerApi.fetchLocalMediaById(b),2)):q(h,A1a(f,b),0)})})},G1a=function(a,b){Za(a,function d(){var f=this; return za(d,function(h){return 1==h.nextAddress?q(h,f.deleteVideo(b),2):q(h,F1a(f,b),0)})})}; kQ.prototype.deleteVideo=function(a){return Za(this,function c(){var d=this;return za(c,function(f){return 1==f.nextAddress?q(f,d.playerApi.deleteLocalMediaById(a),2):q(f,A1a(d,a),0)})})}; var H1a=function(a){return Za(a,function c(){var d=this;return za(c,function(f){return 1==f.nextAddress?q(f,d.playerApi.deleteAllLocalMedia(),2):q(f,d.store.dispatch(KL({type:"RESET_LOCAL_MEDIA_INFO"})),0)})})}; kQ.prototype.isVideoDownloaded=function(a){return 1===zRa(this.getDownloadState(),a)}; kQ.prototype.hasDownloadedVideos=function(){return!!BRa(this.getDownloadState()).length}; kQ.prototype.getLocalPlayerResponse=function(a){return Za(this,function c(){var d=this;return za(c,function(f){return f.return(d.playerApi.getLocalPlayerResponse(a))})})}; var E1a=function(a,b){b={videoId:b,forOffline:!0};var c=XL(LMa);$L(a.innerTubeTransportService,b,c).then(function(d){a.parsePromoPageData({playerResponse:d},null)})},B1a=function(a){Za(a,function c(){var d=this,f; return za(c,function(h){if(1==h.nextAddress)return q(h,d.playerApi.getAllLocalMediaInfo(),2);f=h.yieldResult;d.store.dispatch(KL({type:"INIT_LOCAL_MEDIA_INFO",payload:{allLocalMediaInfo:f}}));I1a(d);lQ.resolve();ra(h)})})},A1a=function(a,b){return Za(a,function d(){var f=this,h; return za(d,function(l){if(1==l.nextAddress)return q(l,f.playerApi.getLocalMediaInfoById(b),2);h=l.yieldResult;f.store.dispatch(iRa(h));I1a(f);ra(l)})})},C1a=function(a){Za(a,function c(){var d=this,f,h,l,m; return za(c,function(n){if(1==n.nextAddress)return f=d,q(n,z1a(d.idbResponseStore),2);if((h=n.yieldResult)&&!(Number(h.data.refreshTimestampMs||0)d&&(a=A("REMAINING_DOVA_DEFERRED_CHUNKS",-1));0=this.offset_+a&&(this.atEnd=!1):this.atEnd=this.offset_+a>=b-20?!0:!1;this.atStart=20>=this.offset_}}, nextClick_:function(){this.fillRemainingListItems();Polymer.dom.flush();var a=this.$["scroll-container"].clientWidth,b=this.$.items.clientWidth;this.offset_+=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;this.offset_+a>=b&&(this.offset_=b-a);this.reposition_()}, prevClick_:function(){var a=this.$["scroll-container"].clientWidth;this.offset_-=(this.useFloorScrolling?Math.floor(a/this.minComponentWidth_)||1:Math.round(a/this.minComponentWidth_)||1)*this.minComponentWidth_;0>this.offset_&&(this.offset_=0);this.reposition_()}, onIronResize_:function(){this.requestButtonsStateUpdate_()}, onItemsTransitionEnd_:function(a){Polymer.dom(a).rootTarget==this.$.items&&this.markDirty()}, observeShownItems_:function(){this.reset()}}];var v2a={};v2a.YtdPosterHoverAnimationBehavior=[Polymer.IronResizableBehavior,{listeners:{"iron-resize":"onIronPosterResize_"},created:function(){this.initialized_=!1;this.hoverAnimationManager_=null}, attached:function(){var a="rtl"==A("HTML_DIR");N("enable_web_poster_hover_animation")&&!a&&(this.listen(this,"poster-renderer-hover","onPosterRenderHover_"),this.listen(this,"poster-renderer-leave","onPosterRendererLeave_"))}, detached:function(){this.unlisten(this,"poster-renderer-hover","onPosterRenderHover_");this.unlisten(this,"poster-renderer-leave","onPosterRendererLeave_")}, initialize_:function(){var a,b;!this.initialized_&&0<(null===(b=null===(a=null===this||void 0===this?void 0:this.data)||void 0===a?void 0:a.items)||void 0===b?void 0:b.length)&&this.data.items[0].hasOwnProperty("posterRenderer")&&(this.hoverAnimationManager_||(this.hoverAnimationManager_=new bWa(this,"ytd-grid-renderer"==this.is)),this.initialized_=!0,this.$["scroll-container"]&&(this.$["scroll-container"].style.height="313px"),this.updateNumberItemsPerLine_())}, updateNumberItemsPerLine_:function(){this.hoverAnimationManager_.numItemPerLine_=this.clientWidth/214}, onPosterRenderHover_:function(a){a.target.isHovering||(this.hoverAnimationManager_||this.initialize_(),gWa(this.hoverAnimationManager_,a,this.$.items.children,"hovering"))}, onPosterRendererLeave_:function(a){if(this.hoverAnimationManager_){var b=this.$.items.children;if(0!=b.length){var c=a.detail.mouseEvent;a=c.pageX;c=c.pageY;b=b[b.length-1].getBoundingClientRect();if(a>=b.right&&c>=b.top)this.onMouseLeavePosterHoverSection(null)}}}, onMouseLeavePosterHoverSection:function(a){if(this.hoverAnimationManager_){var b=this.hoverAnimationManager_;"steady-state"!=b.currentAnimateState_&&gWa(b,a,this.$.items.children,"after-hover")}}, resetSteadyState:function(){this.hoverAnimationManager_&&this.hoverAnimationManager_.resetSteadyState(this.$.items.children)}, onIronPosterResize_:function(){this.hoverAnimationManager_&&this.updateNumberItemsPerLine_()}}];var w2a=On(115994),x2a=On(115993),JQ=function(a,b,c){var d=this,f=c.dragDownAction;this.layer=0;this.watchConfig={startPosition:0,draggingClass:"gesture-dragging",triggers:{down:{fade:!0,endOpacity:.6,endPosition:100,threshold:100,triggerAction:function(){return d.dragDownAction()}}}}; this.watchFullScreenConfig={startPosition:0,draggingClass:"gesture-dragging",triggers:{down:{disableFinish:!0,endOpacity:.6,endPosition:100,threshold:100,triggerAction:function(){return d.dragDownAction()}}}}; this.fullscreen=!1;if(N("kevlar_touch_gesture_ves")){var h=zL();EL(h,w2a,this.layer);EL(h,x2a,this.layer);this.dragDownAction=function(){f();FL(h,{visualElement:d.fullscreen?w2a:x2a})}}else this.dragDownAction=f; this.gesture=new DN(a,b,this.getConfig(!1));this.attach()}; JQ.prototype.attach=function(){this.gesture.attach()}; JQ.prototype.detach=function(){this.gesture.detach()}; JQ.prototype.update=function(a){this.fullscreen=a;a=this.getConfig(a);this.gesture.config=a}; JQ.prototype.getConfig=function(a){return a?this.watchFullScreenConfig:this.watchConfig};function y2a(a,b){Za(this,function d(){var f;return za(d,function(h){if(1==h.nextAddress)return f=qSa(),ta(h,2),q(h,rSa(f),4);if(2!=h.nextAddress){var l;(null===(l=a.onSuccessCommand)||void 0===l?0:l.watchEndpoint)&&b.fire("yt-navigate",a.onSuccessCommand);return ua(h,0)}va(h);ra(h)})})} ;var z2a=[[{listeners:{"yt-get-context-provider":"getContextProvider_"},attached:function(){this.getProvidedContext()&&this.getProvidedContext().start()}, detached:function(){this.getProvidedContext()&&this.getProvidedContext().pause()}, getContextProvider_:function(a){a.detail.contextProvider=this;a.stopPropagation()}, getProvidedContext:function(){return null}}, {created:function(){this.pageContext=null}, getProvidedContext:function(){return this.pageContext}}], [JWa.YtVisibilityObserverBehavior,{isVisibilityRoot:!0,resetVisibilityRoot:function(){Qg(this.visibilityObserverForChild_)}, disconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.disconnect()}, reconnectVisibilityRoot:function(){this.visibilityObserverForChild_&&this.visibilityObserverForChild_.reconnect();N("kevlar_enable_vimio_logging")&&KNa()}}], {_noAccessors:!0,properties:{active:Boolean,data:Object,loading:Boolean},observers:["ytPageBehaviorActiveObserver_(active)"],created:function(){this.pageCount=0;this.readyResolver_=Ui();this.pageScrollElement=null}, ready:function(){this.readyResolver_.resolve()}, getReady:function(){return this.readyResolver_.promise}, loadPage:function(a){this.pageCount+=1;N("kevlar_attach_vimio_behavior")&&(this.disconnectVisibilityRoot(),this.reconnectVisibilityRoot());this.loadPage_(a)}, loadPage_:function(a){this.data=a}, ytPageBehaviorActiveObserver_:function(a){N("kevlar_attach_vimio_behavior")&&(a?this.reconnectVisibilityRoot():this.disconnectVisibilityRoot())}, setScrollTop:function(a){if(!this.setScrollTopJobId_){var b=this;this.setScrollTopJobId_=window.requestAnimationFrame(function(){b.setScrollTopJobId_=0;var c=b.getInterface(WP);c&&c.ignoreNextScroll();this.getPageScrollingElement().scrollTop=a}.bind(this))}}, getPageScrollingElement:function(){return this.pageScrollElement||ig(document)}, getScrollTop:function(){return this.getPageScrollingElement().scrollTop}}];var A2a=["videoPrimaryInfoRenderer","title"],B2a=["videoSecondaryInfoRenderer","owner","videoOwnerRenderer","title"]; function KQ(a,b){var c=y.getValueByKeys(a,"contents","twoColumnWatchNextResults","results","results","contents"),d=y.getValueByKeys(a,"contents","twoColumnWatchNextResults","playlist","playlist")||null;(void 0===b?0:b)&&(d=null);var f=b=null;if(d)b=y.getValueByKeys(d,"titleText"),c=y.unsafeClone(y.getValueByKeys(d,"longBylineText")),f="",c&&(f=nL(c)),!d.isInfinite&&-1=this.getScrollTop()&&(this.player.isFullscreen()?this.player.toggleFullscreen():this.sendAction("yt-activate-miniplayer-from-watch-action"))}, hasPlaylist_:function(a,b){return this.loading?b:!!Object.keys(a).length}, updatePlayerWithAutonavState_:function(){this.player&&(this.autonavAllowed_()?this.player.setAutonavState(wL.getInstance().getState()):this.player.setAutonavState(1))}, autonavAllowed_:function(){return this.autonavCanceledSignal_?!1:!!this.get("contents.twoColumnWatchNextResults.autoplay.autoplay",this.data)}, autoplayDataChanged_:function(){this.autonavDisabled_=!this.autonavAllowed_();this.updatePlayerWithAutonavState_()}, youthereDataChanged_:function(a){if(a){a=k(a);for(var b=a.next();!b.done;b=a.next())b=b.value,b.youThereRenderer&&BUa(this.youThereManager_,b.youThereRenderer)}}, setPlaylistData_:function(a){return a||{}}, userEngagementConfigDataChanged_:function(a){if(a)if("LOW_USER_ENGAGEMENT_ACTION_LOWER_QUALITY"===a.lowUserEngagementAction){var b=this.youThereManager_;Pk()=this.watchWhileScrollThreshold_?(a.activate(this.getPlayer()),this.schedulePlayerSizeUpdate_()):a.active&&(!b||c=a&&.5624<=a}, computeIsExtraWideVideo_:function(a){return .5624>a}, computeShowFixieCommentHeader_:function(a,b,c){return!!N("kevlar_fixie_watch_layout")&&!!this.get("header.commentsHeaderRenderer",a)&&this.computeShowComments_(a,b,c)}, onYtAutonavStateChangedAction_:function(){this.updatePlayerWithAutonavState_()}, onDisableWatchAnchorOverflow_:function(){var a=this;this.noAnchorOverflow_||(this.noAnchorOverflow_=!0,Polymer.RenderStatus.afterNextRender(this,function(){var b=window.scrollY;a.setScrollTop(b+1);a.setScrollTop(b)}))}, onYtUserActivity_:function(){a:{var a=this.youThereManager_;if(a.youThereData_){if(a.ignoreFullscreenExitUserActivity_)break a;a.youThereData_.userActiveDuringFlowAction&&(N("web_handle_meta_commands")||!a.youThereData_.userActiveDuringFlowAction.commandExecutorCommand?FN(a,[a.youThereData_.userActiveDuringFlowAction]):FN(a,a.youThereData_.userActiveDuringFlowAction.commandExecutorCommand.commands));a.inYouThereFlow_&&(LJ("YOU_THERE_EVENT_TYPE_LACT_RESET",Tn(),a.youThereData_,a.clientPlaybackNonce_), gl());zUa(a,!0)}FUa(a,!1)}}, handleSignalActionPausePlayer_:function(){this.active&&LM(this).pause()}, handleSignalActionPlayPlayer_:function(){this.active&&LM(this).play()}, handleSignalActionAcknowledgeYouThere_:function(){var a=this.youThereManager_;LJ("YOU_THERE_EVENT_TYPE_USER_RESPONDED",Tn(),a.youThereData_,a.clientPlaybackNonce_)}, incrementFullerscreenEduButtonCount_:function(a){var b=cK(a)||0;bK(a,b+1,31536E3);this.updateFullerscreenEduButtonSubtleModeState_()}, updateFullerscreenEduButtonSubtleModeState_:function(){var a=cK("yt-fullerscreen-edu-button-click-count")||0,b=cK("yt-fullerscreen-edu-button-shown-count")||0,c=ik("external_fullscreen_button_shown_threshold"),d=a>=ik("external_fullscreen_button_click_threshold")||b>=c;LM(this).getPlayerPromise().then(function(f){f.updateFullerscreenEduButtonSubtleModeState(d)})}, resetFullerscreenEduButtonForNewPlayback_:function(){this.fullerscreenEduButtonShownThisPlayback_=this.fullerscreenEduButtonClickedThisPlayback_=!1}, computePlaylistData_:function(a,b){return b}, onYtPlaylistDataUpdated_:function(){this.externalPlaylistData_=this.getInterface(cN).getPlaylistData()||{}}, schedulePanelMaxHeightUpdate_:function(){var a=this;this.panelMaxHeightUpdateJob_&&Fk.cancelJob(this.panelMaxHeightUpdateJob_);this.panelMaxHeightUpdateJob_=Ck(Fk,function(){a.panelMaxHeightUpdateJob_=0;var b=!a.isTwoColumns_||a.theater||a.fullscreen?460:a.calculateNormalPlayerSize_().height;a.updateStyles({"--ytd-watch-flexy-panel-max-height":Math.min(b,502)+"px","--ytd-watch-flexy-chat-max-height":b+"px"})})}, computeHideAutoplay_:function(){return this.playlistData&&this.playlistData.isInfinite?!0:this.playlistData&&this.playlistData.totalVideos&&void 0!==this.playlistData.currentIndex?this.playlistData.currentIndex!==this.playlistData.totalVideos-1:!1}, onYtShowEngagementPanelScrimAction_:function(a){this.engagementPanelScrimOnClickCommands_=this.get("showEngagementPanelScrimAction.onClickCommands",a)||null;this.showEngagementPanelScrim_=!0}, onYtHideEngagementPanelScrimAction_:function(){this.engagementPanelScrimOnClickCommands_=null;this.showEngagementPanelScrim_=!1}, onEngagementPanelScrimClick_:function(){this.engagementPanelScrimOnClickCommands_&&this.sendInnerTubeActions(this.engagementPanelScrimOnClickCommands_,this)}, showEngagementPanelScrimChanged_:function(a){a?this.listen(this.$["engagement-panel-scrim"],"tap","onEngagementPanelScrimClick_"):this.unlisten(this.$["engagement-panel-scrim"],"tap","onEngagementPanelScrimClick_")}, handleLoopCommand_:function(a){a.loopCommand&&LM(this).getPlayerPromise().then(function(b){a.loopCommand.loop?(b.setLoopRange({startTimeMs:parseInt(a.loopCommand.startTimeMs,10),endTimeMs:parseInt(a.loopCommand.endTimeMs,10),postId:a.loopCommand.postId}),b.playVideo()):b.setLoopRange(null)})}, onGetCurrentVideoIdAction_:function(){if(this.active)return this.videoId}, onSecondaryMouseenter_:function(){this.secondaryHovered_=!0}, onSecondaryMouseleave_:function(){this.secondaryHovered_=!1}, onYtGetLocationCommand_:function(a){a.getLocationCommand&&this.active&&N("web_enable_client_location_service")&&y2a(a.getLocationCommand,this)}, onYtScrollToWatchColumns_:function(){if("ytd-watch-flexy"===this.is){var a=this.querySelector("#columns");a&&!this.scrollToAnimation_.isAnimating_&&this.scrollToAnimation_.start(this.getScrollTop(),Math.max(0,a.offsetTop-56),500)}}, onYtScrollToWatchElement_:function(a){if("ytd-watch-flexy"===this.is&&this.contains(a)&&!this.scrollToAnimation_.isAnimating_){var b=a.offsetTop-24;a=a.offsetTop+a.offsetHeight+24;var c=this.getPageScrollingElement(),d=this.getScrollTop(),f=d+c.clientHeight-56;if(bf)b=a-c.clientHeight;else return;this.scrollToAnimation_.start(this.getScrollTop(),Math.max(0,b),500)}}}; F2a.YtdWatchBehavior=[X.YtRendererBehavior,TP,Z,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,z2a,OO.YtEndpointBehavior,H2a];var I2a=function(){return O.apply(this,arguments)||this}; p(I2a,O);var J2a=I2a;J2a=w([V({is:"ytd-watch-items"})],J2a);var K2a;var L2a;var NQ=[yO.YtTaskEmitterBehavior,W.YtActionSenderBehavior,{_noAccessors:!0,listeners:{"yt-load-next-continuation":"onLoadNextContinuation_"},nextContinuation:void 0,pendingContinuationRequest_:void 0,listeningForNavigate_:!1,created:function(){this.continuationStartNavCount_=-1;this.getNextContinuation&&this.getNextContinuation instanceof Function&&(this.nextContinuation=this.getNextContinuation())}, detached:function(){this.stopListeningForNavigate_()}, canUseContextualNetworkManager_:function(){return N("polymer_task_manager_proxied_promise")&&this.shouldUseTaskManager()&&!!this.getNetworkManager()}, startListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||this.listeningForNavigate_||(this.listen(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!0)}, stopListeningForNavigate_:function(){this.canUseContextualNetworkManager_()||(this.unlisten(document,"yt-navigate-start","onYtNavigateStart_"),this.listeningForNavigate_=!1)}, onLoadNextContinuation_:function(a,b){a.stopPropagation();if(this.nextContinuation.requestPath){a=this.nextContinuation.requestPath;var c={};N("direct_innertube_click_tracking_reporting")&&(c={context:{clickTracking:{clickTrackingParams:this.nextContinuation.clickTrackingParams}}});this.makeNextContinuationRequest_(a,b,c)}else a={locationRetrieved:function(d,f){var h={};N("direct_innertube_click_tracking_reporting")&&f.clickTrackingParams&&Object.assign(h,{context:{clickTracking:{clickTrackingParams:f.clickTrackingParams}}}); this.makeNextContinuationRequest_(d,b,h)}.bind(this)},this.fire("yt-retrieve-location",a)}, makeNextContinuationRequest_:function(a,b,c){bp("nct");this.continuationStartNavCount_=A("NAV_COUNT",void 0);this.pendingContinuationRequest_&&this.pendingContinuationRequest_.cancel();a=b(a);var d;this.canUseContextualNetworkManager_()&&(d=this.getNetworkManager());d||(d=this.getInterface(FM));c=this.nextContinuation.usePost?d.postData(a,c):d.fetchData(a,c);c.then(this.updateNextContinuationData_.bind(this,a));this.pendingContinuationRequest_=c;this.startListeningForNavigate_()}, updateNextContinuationData_:function(a,b){bp("ncl");this.continuationStartNavCount_!=A("NAV_COUNT",void 0)&&Uo("ncpm",1);this.pendingContinuationRequest_=void 0;if(b){var c={};this.nextContinuation&&(c=this.nextContinuation);if(b.response&&b.response.continuationContents&&b.response.continuationContents[c.continuationType]){a=b.response.continuationContents[c.continuationType];var d=c.header||"data.header",f=a[c.responseHeaderKey||"header"];f&&this.set(d,f);d=c.contentsArray||"data.contents";f=this.getContents_(a, c.responseContentsKey||"contents")||[];this.pathExists_(d)?(f.unshift(d),this.push.apply(this,f)):this.set(d,f);if(f){var h=this.getScreenLayer();f=Tn(h);h=Sn(h);var l=this.get("response.trackingParams",b);l&&f&&h&&(l=Nn(l),yJ(f,h,l),this.sendAction("yt-store-grafted-ve-action",[l]));this.fire("yt-next-continuation-data-updated",{continuationData:b,page:this,contentsArray:d})}this.set(c.continuationsArray||"data.continuations",a[c.responseContinuationsKey||"continuations"]||[])}else b.reload?Am(new Ul("Reloading from continuation is unsupported")): b.responseContext&&b.responseContext.errors||(delete b.xsrf_token,delete b.timing,delete b.endpoint,delete b.csn,b.responseContext&&delete b.responseContext.serviceTrackingParams,d={request:ol(a,{ctoken:"x",continuation:"x",itct:"x"}),responseKeys:Object.keys(b).sort()},b.response&&(d.responseContentKeys=Object.keys(b.response).sort()),this.nextContinuation&&this.nextContinuation.continuationType&&(d.continuationType=this.nextContinuation.continuationType.substr(0,256)),b=new Ul("Malformed continuation", d),0==a.indexOf("/comment_service_ajax")?Am(b):Zm(b)),this.set(c.continuationsArray||"data.continuations",[])}else Zm(new Ul("Missing continuation response",a))}, getContents_:function(a,b){b=b.split(".");return y.getValueByKeys(a,b)}, pathExists_:function(a){var b=this;a=a.toString().split(".");for(var c=0;c\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K2a){var d=document.createElement("template");d.innerHTML=""; K2a=d}d=K2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L2a=a}a=L2a;return a}}}); var PQ=OQ;PQ.prototype.onLoadReloadContinuation_=PQ.prototype.onLoadReloadContinuation_;PQ.prototype.onRetrieveLocation_=PQ.prototype.onRetrieveLocation_;w([P(NQ),x("design:type",Object)],PQ.prototype,"ytNextContinuationBehavior",void 0);w([P(XO),x("design:type",Object)],PQ.prototype,"ytVisibilityBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],PQ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],PQ.prototype,"ytRendererstamperBehavior",void 0); w([P(kO.YtComponentBehavior),x("design:type",Object)],PQ.prototype,"ytComponentBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],PQ.prototype,"data",void 0);w([R({computed:"computeHasContinuation_(data.continuations)"}),x("design:type",Boolean)],PQ.prototype,"hasContinuation_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Boolean)],PQ.prototype,"isLoading_",void 0); w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],PQ.prototype,"onRetrieveLocation_",null);w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Function]),x("design:returntype",void 0)],PQ.prototype,"onLoadReloadContinuation_",null);PQ=w([V({is:"ytd-backstage-comments-renderer"})],PQ);var M2a;var N2a;TO("menuRenderer","menuRenderer","ytd-menu-renderer");var QQ=function(){return O.apply(this,arguments)||this}; p(QQ,O);e=QQ.prototype; e.configureRendererStamper=function(){return{"data.topLevelButtons":{id:"top-level-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}},accountLinkButtonRenderer:{component:"ytd-account-link-button-renderer"}, downloadButtonRenderer:{component:"ytd-download-button-renderer",properties:{buttonTooltipPosition:"[[buttonTooltipPosition]]",forceIconButton:"[[forceIconButton]]",styleActionButton:"[[styleActionButton]]"}}}}}}; e.ready=function(){var a=this,b=this.$.button;this.persistentMenu?(this.menuFocused=!0,this.overlayOpen=!1):(b.addEventListener("focus",function(){a.onMenuFocus()}),b.addEventListener("blur",function(){a.onMenuBlur()})); this.ytdOpenPopupBehavior.popupPositionTarget=b}; e.detached=function(){this.icon="yt-icons:more_vert"}; e.computeMenuActive=function(a,b){return a||b}; e.onPopupOpened=function(){this.overlayOpen=!0;this.fire("yt-menu-overlay-changed",this.overlayOpen);null==this.menuFocused&&(this.menuFocused=!1)}; e.onPopupClosed=function(){this.overlayOpen=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen)}; e.onPopupCanceled=function(){this.overlayOpen=!1;this.fire("yt-menu-overlay-changed",this.overlayOpen)}; e.onMenuFocus=function(){this.menuFocused=!0;null==this.overlayOpen&&(this.overlayOpen=!1)}; e.onMenuBlur=function(){this.menuFocused=!1}; e.computeAccessibilityLabel=function(a){return this.get("accessibility.accessibilityData.label",a)}; e.isHidden=function(a){return null==a?!0:null!=a.fetchMenuCommand?!1:null==a.items}; e.onOverflowTap=function(){if(this.data.fetchMenuCommand)this.ytActionSenderBehavior.sendServiceRequestAction([this.data.fetchMenuCommand]);else{var a=this.createMenuRendererVe();this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:{menuPopupRenderer:this.data},veData:a}})}}; e.createMenuRendererVe=function(){var a=this.data.trackingParams,b=Tn(),c=Sn();return a&&b&&c?(a=Nn(a),c=On(7591),yJ(b,a,c),c):null}; g.Object.defineProperties(QQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===N2a){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M2a){var d=document.createElement("template");d.innerHTML=""; M2a=d}d=M2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);N2a=a}a=N2a;return a}}}); var RQ=QQ;RQ.prototype.onPopupCanceled=RQ.prototype.onPopupCanceled;RQ.prototype.onPopupClosed=RQ.prototype.onPopupClosed;RQ.prototype.onPopupOpened=RQ.prototype.onPopupOpened;w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],RQ.prototype,"ytdOpenPopupBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],RQ.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],RQ.prototype,"ytActionSenderBehavior",void 0); w([P(Z),x("design:type",Object)],RQ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],RQ.prototype,"data",void 0);w([R({value:"yt-icons:more_vert"}),x("design:type",String)],RQ.prototype,"icon",void 0);w([R({reflectToAttribute:!0,computed:"computeMenuActive(menuFocused, overlayOpen)"}),x("design:type",Boolean)],RQ.prototype,"menuActive",void 0);w([R(),x("design:type",Boolean)],RQ.prototype,"menuFocused",void 0); w([R({value:function(){return N("desktop_persistent_menu")&&window.matchMedia("(any-pointer: coarse)").matches}}), x("design:type",Boolean)],RQ.prototype,"persistentMenu",void 0);w([R({value:"bottom"}),x("design:type",String)],RQ.prototype,"buttonTooltipPosition",void 0);w([R(),x("design:type",Boolean)],RQ.prototype,"noInkOnDropdownButton",void 0);w([R(),x("design:type",Boolean)],RQ.prototype,"overlayOpen",void 0);w([R({value:!0}),x("design:type",Boolean)],RQ.prototype,"forceIconButton",void 0);w([R(),x("design:type",Boolean)],RQ.prototype,"styleActionButton",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RQ.prototype,"onPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RQ.prototype,"onPopupClosed",null);w([S("yt-popup-canceled"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RQ.prototype,"onPopupCanceled",null);RQ=w([V({is:"ytd-menu-renderer"})],RQ);var O2a;var P2a;var SQ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-account-linking-state-changed-command":"handleAccountLinkingStateChangedCommand","yt-signal-action-show-account-link-dialog":"handleShowAccountLinkDialog"};return a}; p(SQ,O);SQ.prototype.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{forceIconButton:!0}}}}}}; SQ.prototype.handleAccountLinkingStateChangedCommand=function(a){var b;if(a.accountLinkingStateChangedCommand){var c=null===(b=this.data)||void 0===b?void 0:b.providerKey,d=a.accountLinkingStateChangedCommand.providerKey;c&&d&&c.id===d.id&&c.subject===d.subject&&(a=a.accountLinkingStateChangedCommand.linked,void 0!==a&&(this.set("data.linked",a),this.setPlayerAccountLinkState(a)))}}; SQ.prototype.setPlayerAccountLinkState=function(a){var b=new PI;GKa(b,FKa(new QI,a));var c=KM(this);c&&c.getPlayerPromise().then(function(d){d.setAccountLinkState(Le(b.serializeBinary(),4));d.updateAccountLinkingConfig(a)})}; SQ.prototype.handleShowAccountLinkDialog=function(){var a=this.get("button.buttonRenderer.command");a&&this.get("button.buttonRenderer.command.signalServiceEndpoint.actions.0.openPopupAction.popup.gamingAccountLinkSettingRenderer")&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; g.Object.defineProperties(SQ.prototype,{button:{configurable:!0,enumerable:!0,get:function(){if(this.data){if(this.data.linked&&this.data.linkedButton)return this.data.linkedButton;if(!this.data.linked&&this.data.unlinkedButton)return this.data.unlinkedButton}}}}); g.Object.defineProperties(SQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P2a){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O2a){var d=document.createElement("template");d.innerHTML="";O2a=d}d= O2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P2a=a}a=P2a;return a}}}); var TQ=SQ;w([P(Z),x("design:type",Object)],TQ.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],TQ.prototype,"ytRendererBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],TQ.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],TQ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],TQ.prototype,"data",void 0); w([BE("data","data.linked"),x("design:type",Object),x("design:paramtypes",[])],TQ.prototype,"button",null);TQ=w([V({is:"ytd-account-link-button-renderer"})],TQ);var Q2a;var R2a;var S2a=kL(YK("DOWNLOAD",{},"Download")),T2a=kL(YK("DOWNLOADING",{},"Downloading")),U2a=kL(YK("DOWNLOADED",{},"Downloaded")),V2a=kL(YK("RETRY",{},"Retry")),UQ=function(){var a=O.apply(this,arguments)||this;a.downloadStatus=0;a.downloadProgress=0;a.isDownloadComplete=!1;return a}; p(UQ,O);UQ.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; UQ.prototype.dataChanged=function(){var a,b;if(!this.data.text){var c=fQ(NL.getState(),null===(b=null===(a=this.data.serviceEndpoint)||void 0===a?void 0:a.offlineVideoEndpoint)||void 0===b?void 0:b.videoId);this.updateButton(c)}}; UQ.prototype.updateButton=function(a){if(this.data){this.isDownloadComplete=!1;switch(a){case 0:a=S2a;var b="OFFLINE_DOWNLOAD";break;case 4:a=V2a;b="OFFLINE_DOWNLOAD";break;case 1:a=U2a;b="OFFLINE_PIN";this.isDownloadComplete=!0;break;case 2:a=T2a;b="OFFLINE_DOWNLOADING_ZERO";break;case 3:a=T2a;b="OFFLINE_DOWNLOADING_ZERO";break;default:a=S2a,b="OFFLINE_DOWNLOAD";}var c=Object.assign({},this.data);c.text=a;c.icon={iconType:b};c.size="SIZE_DEFAULT";c.style="STYLE_DEFAULT";this.set("data",c)}}; UQ.prototype.updateProgressIcon=function(a){var b;if(this.data){this.isDownloadComplete=!1;var c="OFFLINE_DOWNLOAD";0=a?c="OFFLINE_DOWNLOADING_ZERO":.1=a?c="OFFLINE_DOWNLOADING_TWENTY":.3=a?c="OFFLINE_DOWNLOADING_FORTY":.5=a?c="OFFLINE_DOWNLOADING_SIXTY":.7a?c="OFFLINE_DOWNLOADING_EIGHTY":1===a&&(c="OFFLINE_PIN",this.isDownloadComplete=!0);c!==(null===(b=this.data.icon)||void 0===b?void 0:b.iconType)&&(a=Object.assign({},this.data),a.icon={iconType:c},this.set("data", a))}}; g.Object.defineProperties(UQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R2a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q2a){var d=document.createElement("template");d.innerHTML=""; Q2a=d}d=Q2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R2a=a}a=R2a;return a}}}); var VQ=UQ;VQ.prototype.updateProgressIcon=VQ.prototype.updateProgressIcon;VQ.prototype.updateButton=VQ.prototype.updateButton;VQ.prototype.dataChanged=VQ.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],VQ.prototype,"ytRendererBehavior",void 0);w([P(CQ),x("design:type",Object)],VQ.prototype,"ytdReduxBehavior",void 0);w([P(RO.YtButtonBehavior),x("design:type",Object)],VQ.prototype,"ytButtonBehavior",void 0);w([R(),x("design:type",Object)],VQ.prototype,"data",void 0); w([R({selector:fQ,selectorArgs:["data.serviceEndpoint.offlineVideoEndpoint.videoId"]}),x("design:type",Number)],VQ.prototype,"downloadStatus",void 0);w([R({selector:function(a,b){return(a=ARa(a.download,b))?mRa([a]):0}, selectorArgs:["data.serviceEndpoint.offlineVideoEndpoint.videoId"]}),x("design:type",Object)],VQ.prototype,"downloadProgress",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],VQ.prototype,"isDownloadComplete",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],VQ.prototype,"dataChanged",null);w([U("downloadStatus"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],VQ.prototype,"updateButton",null); w([U("downloadProgress"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],VQ.prototype,"updateProgressIcon",null);VQ=w([V({is:"ytd-download-button-renderer"})],VQ);var W2a;var X2a;var WQ=function(){var a=O.apply(this,arguments)||this;a.enableUnifiedVerifiedBadge=N("enable_unified_verified_badge");return a}; p(WQ,O);WQ.prototype.basicPaletteChanged=function(){this.data&&this.data.colorData&&this.data.colorData.basicColorPaletteData&&QO(this,this.data.colorData.basicColorPaletteData)}; WQ.prototype.colorChanged=function(){if(this.data&&this.data.color){var a=this.get("basicColorPaletteData.backgroundColor",this.data.color),b=this.get("basicColorPaletteData.foregroundTitleColor",this.data.color),c={};a?(a=PN(a),c["--ytd-author-comment-badge-background-color"]=a):(c["--ytd-author-comment-badge-icon-background-color"]="transparent",c["--ytd-author-comment-badge-background-color"]="transparent");b?(b=PN(b),c["--ytd-author-comment-badge-name-color"]=b,c["--ytd-author-comment-badge-icon-color"]= b):c["--ytd-author-comment-badge-name-color"]="var(--yt-primary-text-color)";0\n \n \n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W2a){var d=document.createElement("template");d.innerHTML=""; W2a=d}d=W2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);X2a=a}a=X2a;return a}}}); var XQ=WQ;XQ.prototype.colorChanged=XQ.prototype.colorChanged;XQ.prototype.basicPaletteChanged=XQ.prototype.basicPaletteChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],XQ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],XQ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],XQ.prototype,"enableUnifiedVerifiedBadge",void 0); w([R({reflectToAttribute:!0}),BE("data.icon.iconType"),x("design:type",Object),x("design:paramtypes",[])],XQ.prototype,"iconType",null);w([R({reflectToAttribute:!0}),BE("data.authorUnifiedVerified"),x("design:type",Object),x("design:paramtypes",[])],XQ.prototype,"verified",null);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Object),x("design:paramtypes",[])],XQ.prototype,"creator",null); w([U("data.colorData.basicColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],XQ.prototype,"basicPaletteChanged",null);w([U("data.color"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],XQ.prototype,"colorChanged",null);XQ=w([V({is:"ytd-author-comment-badge-renderer"})],XQ);var Y2a;var Z2a;var YQ=function(){return O.apply(this,arguments)||this}; p(YQ,O);e=YQ.prototype;e.addTooltips=function(){for(var a=Polymer.dom(this.root).querySelectorAll(".badge"),b=0,c;c=a[b++];){var d=this.repeatElement.itemForElement(c);c=Polymer.dom(c);c.lastChild&&"paper-tooltip"===c.lastChild.is&&c.removeChild(c.lastChild);if(d=d.metadataBadgeRenderer&&d.metadataBadgeRenderer.tooltip){var f=mo("paper-tooltip");Polymer.dom(f).textContent=d;f.setAttribute("position","top");c.appendChild(f)}}}; e.badgesChanged=function(a){var b=this.addTooltips.bind(this);Zn.getInstance().parkOrScheduleJob(b,0,"eocs",16);this.updateComputedBadges(a,this.topStandaloneBadge)}; e.topStandaloneBadgeChanged=function(a){this.updateComputedBadges(this.badges,a,this.bottomStandaloneBadge)}; e.bottomStandaloneBadgeChanged=function(a){this.updateComputedBadges(this.badges,this.topStandaloneBadge,a)}; e.computeStyle=function(a){N("enable_html5_teal_ad_badge")&&"BADGE_STYLE_TYPE_AD"===a&&(a="badge-style-type-ad-alternate");return a?a.toLowerCase().replace(/_/g,"-"):""}; e.updateComputedBadges=function(a,b,c){this.computedBadges=(b=b?[b]:c)?b:a}; g.Object.defineProperties(YQ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Z2a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y2a){var d=document.createElement("template");d.innerHTML=""; Y2a=d}d=Y2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z2a=a}a=Z2a;return a}}}); var ZQ=YQ;w([R({observer:"badgesChanged"}),x("design:type",Array)],ZQ.prototype,"badges",void 0);w([R({observer:"topStandaloneBadgeChanged"}),x("design:type",Object)],ZQ.prototype,"topStandaloneBadge",void 0);w([R({observer:"bottomStandaloneBadgeChanged"}),x("design:type",Array)],ZQ.prototype,"bottomStandaloneBadge",void 0);w([R(),x("design:type",Object)],ZQ.prototype,"computedBadges",void 0);w([CE("#repeat"),x("design:type",Object)],ZQ.prototype,"repeatElement",void 0); ZQ=w([V({is:"ytd-badge-supported-renderer"})],ZQ);var $2a;var a3a;var $Q=function(){var a=O.apply(this,arguments)||this;a.DEFAULT_TOOLTIP_OFFSET="10";a.TOOLTIP_OFFSET_NO_BANNER="-8";a.badges=null;a.noEndpoints=!1;a.wrapText=!1;a.forceVerified=!1;a.tooltipPosition="top";a.height=0;a.lineHeight=0;return a}; p($Q,O);e=$Q.prototype;e.registerTargetId=function(){var a=this.get("badges.0.metadataBadgeRenderer.targetId");a&&N("enable_unified_verified_badge")&&gUa(a,this)}; e.created=function(){this.ytActionHandlerBehavior.actionMap={"yt-window-resized":"handleWindowResized"}}; e.attached=function(){var a=this;this.observer=new MutationObserver(function(b,c){a.handleResized();c.disconnect()}); this.observer.observe(this.textEl,{childList:!0})}; e.detached=function(){this.observer&&this.observer.disconnect()}; e.handleWindowResized=function(){this.handleResized()}; e.onChannelNameChanged=function(){this.verified?this.handleResized():(this.textEl.style.removeProperty("width"),this.textContainerEl.style.removeProperty("padding"),this.textContainerEl.style.removeProperty("margin-right"),this.textContainerEl.style.removeProperty("margin-left"))}; e.onHeightChanged=function(){if(this.verified){var a=Math.ceil(this.height*Math.tan(30*Math.PI/180))+"px";"rtl"===A("HTML_DIR")?this.textContainerEl.style.marginLeft=a:this.textContainerEl.style.marginRight=a}}; e.onLineHeightChanged=function(){this.verified&&(24<=this.lineHeight||0===this.lineHeight&&24<=this.height)&&(this.textContainerEl.style.padding="rtl"===A("HTML_DIR")?"0 6px 0 2px":"0 2px 0 6px")}; e.handleResized=function(){var a=this;this.verified&&Ck(Fk,function(){a.fitBackgroundToText();var b=getComputedStyle(a).lineHeight;b&&(b=b.match(/\d+/))&&b.length&&(a.lineHeight=Number(b[0]));a.height=a.lineHeight&&!a.wrapText?a.lineHeight:a.textEl.offsetHeight})}; e.fitBackgroundToText=function(){if(this.verified&&this.wrapText){this.textEl.style.width="unset";var a=document.createRange(),b=Polymer.dom(this.textEl.root).children;0
\n
\n \n \n
\n \n [[tooltipText]]\n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$2a){var d=document.createElement("template");d.innerHTML=""; $2a=d}d=$2a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a3a=a}a=a3a;return a}}}); var aR=$Q;aR.prototype.onLineHeightChanged=aR.prototype.onLineHeightChanged;aR.prototype.onHeightChanged=aR.prototype.onHeightChanged;aR.prototype.onChannelNameChanged=aR.prototype.onChannelNameChanged;aR.prototype.registerTargetId=aR.prototype.registerTargetId;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],aR.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],aR.prototype,"badges",void 0);w([R(),x("design:type",Object)],aR.prototype,"channelName",void 0); w([R(),x("design:type",Object)],aR.prototype,"noEndpoints",void 0);w([R(),x("design:type",Boolean)],aR.prototype,"wrapText",void 0);w([R(),x("design:type",Boolean)],aR.prototype,"forceVerified",void 0);w([R(),x("design:type",String)],aR.prototype,"tooltipPosition",void 0);w([R(),x("design:type",String)],aR.prototype,"tooltip",void 0);w([R(),x("design:type",Boolean)],aR.prototype,"hasChannelArt",void 0);w([CE("#text-container"),x("design:type",HTMLElement)],aR.prototype,"textContainerEl",void 0); w([CE("#text"),x("design:type",O)],aR.prototype,"textEl",void 0);w([CE("#verified-tooltip"),x("design:type",HTMLElement)],aR.prototype,"verifiedTooltip",void 0);w([R(),x("design:type",Number)],aR.prototype,"height",void 0);w([R(),x("design:type",Number)],aR.prototype,"lineHeight",void 0);w([R({reflectToAttribute:!0}),BE("badges","forceVerified"),x("design:type",Boolean),x("design:paramtypes",[])],aR.prototype,"verified",null); w([BE("badges","verified"),x("design:type",Boolean),x("design:paramtypes",[])],aR.prototype,"hideBadges",null);w([BE("channelName"),x("design:type",Object),x("design:paramtypes",[])],aR.prototype,"formattedName",null);w([BE("badges","verified","formattedName"),x("design:type",String),x("design:paramtypes",[])],aR.prototype,"tooltipText",null);w([BE("hasChannelArt"),x("design:type",String),x("design:paramtypes",[])],aR.prototype,"tooltipOffset",null); w([U("badges"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aR.prototype,"registerTargetId",null);w([U("channelName"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aR.prototype,"onChannelNameChanged",null);w([U("height"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aR.prototype,"onHeightChanged",null); w([U("lineHeight","height"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aR.prototype,"onLineHeightChanged",null);aR=w([V({is:"ytd-channel-name"})],aR);var b3a;var c3a;var bR=function(){var a=O.apply(this,arguments)||this;a.isOpen_=!1;a.inPopupContainer=!1;a.isCommentboxLoading_=!1;a.triggerHintJobId_=0;a.actionMap={"yt-create-comment-action":"onCreateCommentAction_","yt-create-poll-action":"onCreatePollAction","yt-add-video-link-action":"onAddVideoLinkAction","yt-show-scheduling-panel-command":"onShowSchedulingPanelCommand"};return a}; p(bR,O);e=bR.prototype; e.configureRendererStamper=function(){return{"data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:{component:"ytd-flat-dropdown-renderer",classListBinding:"[[dropdownRendererClasses_]]"}}},"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.postOptionsMenu":{id:"option-menu", mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:arrow_drop_down"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){var a=this.$["placeholder-area"],b=this.onOpen_.bind(this);a.addEventListener("tap",b);a.addEventListener("keypress",b)}; e.onYtServiceRequestSent_=function(a,b){if(!N("kevlar_command_handler")&&b.actions)for(var c=0;c\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===b3a){var d=document.createElement("template");d.innerHTML=""; b3a=d}d=b3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);c3a=a}a=c3a;return a}}}); var cR=bR;cR.prototype.onPopupClosed_=cR.prototype.onPopupClosed_;cR.prototype.onYtNavigate_=cR.prototype.onYtNavigate_;cR.prototype.onIronSelect_=cR.prototype.onIronSelect_;cR.prototype.onYtVideoLinkSelected_=cR.prototype.onYtVideoLinkSelected_;cR.prototype.onYtVideoLinkButtonCancel_=cR.prototype.onYtVideoLinkButtonCancel_;cR.prototype.onYtCommentboxLoadingEnd_=cR.prototype.onYtCommentboxLoadingEnd_;cR.prototype.onYtCommentboxLoadingStart_=cR.prototype.onYtCommentboxLoadingStart_; cR.prototype.onYtCommentboxDismiss_=cR.prototype.onYtCommentboxDismiss_;cR.prototype.onYtServiceRequestSent_=cR.prototype.onYtServiceRequestSent_;w([P(Z),x("design:type",Object)],cR.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],cR.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],cR.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],cR.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],cR.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],cR.prototype,"isOpen_",void 0);w([R({computed:"computeCreationDisabled_(data.postCreationDisabledText)"}),x("design:type",Boolean)],cR.prototype,"creationDisabled_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],cR.prototype,"enableCreationBox",void 0); w([R({reflectToAttribute:!0,computed:"computeIsCreationDialog_(data.purpose)"}),x("design:type",Boolean)],cR.prototype,"isCreationDialog",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],cR.prototype,"inPopupContainer",void 0);w([R({reflectToAttribute:!0,computed:"computeIsCreationDialogWithHeader_(data)"}),x("design:type",Boolean)],cR.prototype,"isCreationDialogWithHeader_",void 0);w([R(),x("design:type",Object)],cR.prototype,"accessRestriction_",void 0); w([R({computed:"computeDropdownRendererClasses_(isCreationDialogWithHeader_)"}),x("design:type",Array)],cR.prototype,"dropdownRendererClasses_",void 0);w([R(),x("design:type",Object)],cR.prototype,"isCommentboxLoading_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],cR.prototype,"onYtServiceRequestSent_",null); w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtCommentboxDismiss_",null);w([S("yt-commentbox-loading-start"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtCommentboxLoadingStart_",null); w([S("yt-commentbox-loading-end"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtCommentboxLoadingEnd_",null);w([S("yt-video-link-button-cancel"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtVideoLinkButtonCancel_",null); w([S("yt-video-link-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtVideoLinkSelected_",null);w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onIronSelect_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],cR.prototype,"onYtNavigate_",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cR.prototype,"onPopupClosed_",null);cR=w([V({is:"ytd-backstage-post-dialog-renderer"})],cR);var d3a;var e3a;var dR=function(){var a=O.apply(this,arguments)||this;a.value="";a.label="";a.disabled=!1;return a}; p(dR,O);e=dR.prototype;e.configureRendererStamper=function(){return{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:"ytd-privacy-dropdown-item-renderer",navigationDropdownItemRenderer:"ytd-navigation-dropdown-item-renderer"}}}}; e.reset=function(){this.entries.selected=-1;this.entries.forceSynchronousItemUpdate();this.entries.select(this.getInitiallySelectedItem());this.setInitialLabel()}; e.dataChanged=function(){this.reset()}; e.valueChanged=function(){var a;if(this.value&&null!==(a=this.data)&&void 0!==a&&a.entries)for(var b=k(this.data.entries),c=b.next();!c.done;c=b.next())if((c=this.getRendererForEntry(c.value))&&this.getItemRendererValue(c)===this.value){this.label=this.ytComponentBehavior.getSimpleString(c.label);break}}; e.setInitialLabel=function(){if(this.data&&this.data.entries)for(var a=k(this.data.entries),b=a.next();!b.done;b=a.next())if(b=this.getRendererForEntry(b.value)){if(b.isSelected){this.label=this.ytComponentBehavior.getSimpleString(b.label);break}this.data.label&&(this.label=this.data.label)}}; e.getInitiallySelectedItem=function(){if(!this.data||!this.data.entries)return-1;for(var a=k(this.data.entries),b=a.next();!b.done;b=a.next())if(b=this.getRendererForEntry(b.value),null===b||void 0===b?0:b.isSelected)return this.getItemRendererValue(b)||-1;return-1}; e.getItemRendererValue=function(a){return"stringValue"in a||"int32Value"in a?a.stringValue||a.int32Value||null:null}; e.getRendererForEntry=function(a){return a.dropdownItemRenderer||a.privacyDropdownItemRenderer||a.navigationDropdownItemRenderer||null}; g.Object.defineProperties(dR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===e3a){var a=document.createElement("template");a.innerHTML="\n \n
[[label]]
\n \n \n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===d3a){var d=document.createElement("template");d.innerHTML=""; d3a=d}d=d3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);e3a=a}a=e3a;return a}}}); var eR=dR;eR.prototype.valueChanged=eR.prototype.valueChanged;eR.prototype.dataChanged=eR.prototype.dataChanged;w([P(kO.YtComponentBehavior),x("design:type",Object)],eR.prototype,"ytComponentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],eR.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],eR.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],eR.prototype,"data",void 0); w([R({notify:!0}),x("design:type",Object)],eR.prototype,"value",void 0);w([R(),x("design:type",Object)],eR.prototype,"label",void 0);w([CE("#entries"),x("design:type",Object)],eR.prototype,"entries",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],eR.prototype,"disabled",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eR.prototype,"dataChanged",null); w([U("value"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eR.prototype,"valueChanged",null);eR=w([V({is:"ytd-flat-dropdown-renderer"})],eR);var f3a;var g3a;var fR=function(){var a=O.apply(this,arguments)||this;a.boundCaptureFocus=a.onCaptureFocus.bind(a);return a}; p(fR,O);e=fR.prototype;e.attached=function(){document.addEventListener("focus",this.boundCaptureFocus,!0)}; e.detached=function(){document.removeEventListener("focus",this.boundCaptureFocus)}; e.onCaptureFocus=function(a){-1!==Polymer.dom(a).path.indexOf(this)&&this.item.focus()}; e.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; e.onSelect=function(){var a,b,c;if(null===(a=this.data)||void 0===a?0:a.onSelectCommand)(null===(c=null===(b=this.data.onSelectCommand.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?this.fire("yt-navigate",{endpoint:this.data.onSelectCommand}):this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onSelectCommand])}; g.Object.defineProperties(fR.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data?nL(this.data.label):""}}, value:{configurable:!0,enumerable:!0,get:function(){return this.data?"string"===typeof this.data.stringValue?this.data.stringValue:"number"===typeof this.data.int32Value?this.data.int32Value:null:null}}}); g.Object.defineProperties(fR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===g3a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f3a){var d=document.createElement("template");d.innerHTML=""; f3a=d}d=f3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);g3a=a}a=g3a;return a}}}); var gR=fR;w([P(X.YtRendererBehavior),x("design:type",Object)],gR.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],gR.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],gR.prototype,"data",void 0);w([CE("#item"),x("design:type",HTMLElement)],gR.prototype,"item",void 0);w([BE("data.label"),x("design:type",String),x("design:paramtypes",[])],gR.prototype,"label",null); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],gR.prototype,"value",null);gR=w([V({is:"ytd-privacy-dropdown-item-renderer"})],gR);var h3a;var i3a;var j3a,hR=function(){return O.apply(this,arguments)||this}; p(hR,O);hR.prototype.computeThumbnailWidth=function(a){if("BACKSTAGE_SURFACE_TYPE_STREAM"===a)return j3a.communityTabWidth}; g.Object.defineProperties(hR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i3a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h3a){var d=document.createElement("template");d.innerHTML=""; h3a=d}d=h3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i3a=a}a=i3a;return a}}}); var iR=j3a=hR;iR.communityTabWidth=638;w([P(X.YtRendererBehavior),x("design:type",Object)],iR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],iR.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],iR.prototype,"icon",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],iR.prototype,"surface",void 0);iR=j3a=w([V({is:"ytd-backstage-image-renderer"})],iR);var k3a;var l3a;var jR=function(){var a=O.apply(this,arguments)||this;a.errorMessage="";a.hasPreview=!1;a.isBackstagePost=!1;return a}; p(jR,O);e=jR.prototype;e.configureRendererStamper=function(){return{selectionCancel:{id:"selection-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},previewCancel:{id:"preview-cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.selectButton":{id:"select",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.detached=function(){this.removeOverlay()}; e.setPreview=function(a){Polymer.dom(this.root).querySelector("#preview-picker").imageData=a;this.hasPreview=!0;this.fire("yt-backstage-image-select-preview")}; e.cancel=function(){this.errorMessage="";this.overlay&&this.overlay.cancel();this.hasPreview=!1;var a=Polymer.dom(this.root).querySelector("#dropzone");a.classList.remove("dragover");a.classList.remove("error");this.fire("yt-backstage-image-select-cancel")}; e.setupOverlay=function(a){this.removeOverlay();if(a&&a.imageValidationInfo){var b=Polymer.dom(this.root).querySelector("#dropzone"),c=Polymer.dom(this.root).querySelector("#select");this.overlay=new nJ(a.uploadUrl,a.channelId,a.imageValidationInfo.maxFileSizeMb,a.imageValidationInfo.allowedMaxAspectRatio,b,c,!0);vi(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1,this);vi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",this.onImageError,!1,this);vi(this.overlay, "yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this);vi(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this);vi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this)}}; e.removeOverlay=function(){this.overlay&&(zi(this.overlay,"yt.comments.ImageUploadOverlay.INVALID_EVENT",this.onImageError,!1,this),zi(this.overlay,"yt.comments.ImageUploadOverlay.HOVER_EVENT",this.onDragOver,!1,this),zi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT",this.onImageError,!1,this),zi(this.overlay,"yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT",this.onImageAlert,!1,this),zi(this.overlay,"yt.comments.ImageUploadOverlay.CHANGE_EVENT",this.onPreview,!1, this),this.overlay.dispose(),this.overlay=void 0)}; e.onDragOver=function(a){var b=Polymer.dom(this.root).querySelector("#dropzone");this.toggleClass("dragover",a.value,b)}; e.onPreview=function(a){this.setPreview(a.value)}; e.onImageError=function(a){var b,c,d;if("yt.comments.ImageUploadOverlay.FILE_TOO_LARGE_EVENT"===a.type)a=null===(b=this.data)||void 0===b?void 0:b.fileSizeError;else if("yt.comments.ImageUploadOverlay.INVALID_EVENT"===a.type)a=null===(c=this.data)||void 0===c?void 0:c.invalidError;else if("yt.comments.ImageUploadOverlay.FILE_INVALID_ASPECT_RATIO_EVENT"===a.type)a=null===(d=this.data)||void 0===d?void 0:d.invalidAspectRatioError;else return;this.errorMessage=nL(a);Polymer.dom(this.root).querySelector("#dropzone").classList.add("error")}; e.onImageAlert=function(a){this.onImageError(a)}; e.uploadPromise=function(){var a=this,b=this.overlay&&this.overlay.uploadPromise();if(b)return b.catch(function(){throw Error(a.data?nL(a.data.uploadFailureError):"")}.bind(this))}; g.Object.defineProperties(jR.prototype,{selectionCancel:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.cancelButton}}, previewCancel:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.cancelButton}}, icon:{configurable:!0,enumerable:!0,get:function(){var a,b;if(null!==(b=null===(a=this.data)||void 0===a?void 0:a.icon)&&void 0!==b&&b.iconType)return jO(this.data.icon.iconType)}}}); g.Object.defineProperties(jR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===l3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k3a){var d=document.createElement("template");d.innerHTML=""; k3a=d}d=k3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l3a=a}a=l3a;return a}}}); var kR=jR;w([P(Z),x("design:type",Object)],kR.prototype,"rendererStamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],kR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],kR.prototype,"data",void 0);w([R({observer:"setupOverlay"}),x("design:type",Object)],kR.prototype,"imageUploadEndpoint",void 0);w([R(),x("design:type",Object)],kR.prototype,"errorMessage",void 0);w([R(),x("design:type",nJ)],kR.prototype,"overlay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],kR.prototype,"hasPreview",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],kR.prototype,"isBackstagePost",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],kR.prototype,"selectionCancel",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],kR.prototype,"previewCancel",null);w([BE("data.icon.iconType"),x("design:type",Object),x("design:paramtypes",[])],kR.prototype,"icon",null); kR=w([V({is:"ytd-backstage-image-select-renderer"})],kR);var m3a={imageHorizontalPosition:"IMAGE_HORIZONTAL_POSITION_LABEL",imageVerticalPosition:"IMAGE_VERTICAL_POSITION_LABEL",horizontalRepositionInstruction:"REPOSITION_IMAGE_HORIZONTALLY_LABEL",verticalRepositionInstruction:"REPOSITION_IMAGE_VERTICALLY_LABEL",reachTopOfImage:"REACH_TOP_OF_IMAGE_TEXT",reachBottomOfImage:"REACH_BOTTOM_OF_IMAGE_TEXT",reachLeftOfImage:"REACH_LEFT_OF_IMAGE_TEXT",reachRightOfImage:"REACH_RIGHT_OF_IMAGE_TEXT"};var n3a;var o3a;function lR(a,b){return Math.round(a/1E-5)===Math.round(b/1E-5)} var mR=function(){var a=O.apply(this,arguments)||this;a.a11yConfig=m3a;a.imageDisplayOffsetTop=0;a.imageDisplayOffsetLeft=0;a.pickerDisplayOffsetTop=0;a.pickerDisplayOffsetLeft=0;a.cropCoordinatesSaved=!1;a.previewSize=0;a.startPicker=!1;a.repositionOptional=!1;return a}; p(mR,O);e=mR.prototype;e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()}; e.ready=function(){this.keyboardInterfaceTarget=this.imageInBackground}; e.onArrowKeysDown=function(a){if(!this.cropCoordinatesSaved&&this.pickerSize&&this.imageHeight&&this.imageWidth&&this.displayScale){a.detail.keyboardEvent.preventDefault();var b=0,c=0,d="";switch(a.detail.keyboardEvent.key){case"ArrowUp":lR(this.imageDisplayOffsetTop+this.imageHeight,this.pickerDisplayOffsetTop+this.pickerSize)?d=this.a11yConfig.reachBottomOfImage:b=-.05*this.imageHeight;break;case"ArrowDown":lR(this.pickerDisplayOffsetTop,this.imageDisplayOffsetTop)?d=this.a11yConfig.reachTopOfImage: b=.05*this.imageHeight;break;case"ArrowLeft":lR(this.pickerDisplayOffsetLeft+this.pickerSize,this.imageDisplayOffsetLeft+this.imageWidth)?d=this.a11yConfig.reachRightOfImage:c=-.05*this.imageWidth;break;case"ArrowRight":lR(this.pickerDisplayOffsetLeft,this.imageDisplayOffsetLeft)?d=this.a11yConfig.reachLeftOfImage:c=.05*this.imageWidth;}d&&YK(d)&&this.fire("iron-announce",{text:YK(d)});if(c||b)this.imageHeight>this.imageWidth?(this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+ this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop+b)),a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight),a=YK(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})):(this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft+c)),a=this.getPreviewPosition(this.pickerDisplayOffsetLeft,this.pickerSize, this.imageDisplayOffsetLeft,this.imageWidth),a=YK(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})),a&&this.fire("iron-announce",{text:a})}}; e.getPreviewPosition=function(a,b,c,d){return Math.round(100*(a+.5*b-c)/d)}; e.displayImage=function(){var a=this.pickerContainer.getBoundingClientRect().width,b=this.pickerContainer.getBoundingClientRect().height,c=Math.min(this.picker.getBoundingClientRect().height,this.picker.getBoundingClientRect().width),d=this.imageInBackground.naturalWidth,f=this.imageInBackground.naturalHeight;this.displayScale=Math.max(c/d,c/f);this.imageWidth=d*this.displayScale;this.imageHeight=f*this.displayScale;this.pickerDisplayOffsetLeft=(a-c)/2;this.pickerDisplayOffsetTop=(b-c)/2;this.imageDisplayOffsetLeft= f>d?this.pickerDisplayOffsetLeft:(a-this.imageWidth)/2;this.imageDisplayOffsetTop=d>f?this.pickerDisplayOffsetTop:(b-this.imageHeight)/2;this.repositionOptional&&this.saveCropCoordinates()}; e.onImageDataChange=function(){this.imageData&&(this.pickerDisplayOffsetLeft=this.pickerDisplayOffsetTop=0,this.cropCoordinatesSaved=!1,wc(this.imageInBackground,this.imageData),wc(this.imageInPicker,this.imageData),wc(this.imageInPreviewClipper,this.imageData),wc(this.imageAsPreview,this.imageData))}; e.getSignedPosition=function(a,b,c){return"X"===b&&"rtl"===A("HTML_DIR")?"-"===c?a+"px":-1*a+"px":"-"===c?-1*a+"px":a+"px"}; e.pickerMove=function(a){if(this.startPicker&&!this.cropCoordinatesSaved&&this.pickerSize&&void 0!==this.pickerOffsetX&&void 0!==this.pickerOffsetY&&this.imageHeight&&this.imageWidth&&this.displayScale){var b=this.pickerOffsetX-a.clientX,c=this.pickerOffsetY-a.clientY;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY;this.imageHeight>this.imageWidth?this.imageDisplayOffsetTop=Math.min(this.pickerDisplayOffsetTop,Math.max(this.pickerDisplayOffsetTop+this.pickerSize-this.imageHeight,this.imageDisplayOffsetTop- c)):this.imageDisplayOffsetLeft=Math.min(this.pickerDisplayOffsetLeft,Math.max(this.pickerDisplayOffsetLeft+this.pickerSize-this.imageWidth,this.imageDisplayOffsetLeft-b))}}; e.pickerMoveStart=function(a){this.startPicker=!0;this.pickerOffsetX=a.clientX;this.pickerOffsetY=a.clientY}; e.pickerMoveComplete=function(){this.startPicker=!1;this.pickerOffsetY=this.pickerOffsetX=void 0}; e.saveCropCoordinates=function(){this.cropCoordinatesSaved?(this.cropCoordinatesSaved=!1,this.previewSize=0,this.fire("yt-img-crop-reposition")):(this.startPicker=!1,this.generateCropPreview())}; e.getPreviewOffset=function(a,b,c,d){return b&&a&&c?("X"===d&&"rtl"===A("HTML_DIR")?c/b*a:c/b*a*-1)+"px":"0px"}; e.getSimpleText=function(a){return a?nL(a):""}; e.generateCropPreview=function(){if(this.imageWidth&&this.imageHeight&&this.pickerSize){this.cropCoordinatesSaved=!0;var a=this.cropOffsetTop/this.imageHeight,b=(this.cropOffsetLeft+this.pickerSize)/this.imageWidth,c=(this.cropOffsetTop+this.pickerSize)/this.imageHeight,d=this.cropOffsetLeft/this.imageWidth;this.previewSize=Polymer.dom(this.root).querySelector("#preview-clipper").getBoundingClientRect().width;this.fire("yt-img-crop-coordinates-update",{top:a,right:b,bottom:c,left:d})}}; g.Object.defineProperties(mR.prototype,{altLabelForImage:{configurable:!0,enumerable:!0,get:function(){if(!this.imageWidth||!this.imageHeight||!this.pickerSize)return"";if(this.imageHeight>this.imageWidth){var a=this.getPreviewPosition(this.pickerDisplayOffsetTop,this.pickerSize,this.imageDisplayOffsetTop,this.imageHeight);return YK(this.a11yConfig.imageVerticalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+YK(this.a11yConfig.verticalRepositionInstruction)}a=this.getPreviewPosition(this.pickerDisplayOffsetLeft, this.pickerSize,this.imageDisplayOffsetLeft,this.imageWidth);return YK(this.a11yConfig.imageHorizontalPosition,{x_percent:""+a,y_percent:""+(100-a)})+"\n"+YK(this.a11yConfig.horizontalRepositionInstruction)}}, pickerSize:{configurable:!0,enumerable:!0,get:function(){return this.imageHeight&&this.imageWidth?this.imageHeight>this.imageWidth?this.imageWidth:this.imageHeight:0}}, imageOrientationStyle:{configurable:!0,enumerable:!0,get:function(){if(this.imageHeight&&this.imageWidth)return this.imageHeight===this.imageWidth?"SQUARE":this.imageHeight>this.imageWidth?"PORTRAIT":"LANDSCAPE"}}, editButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.previewInstruction&&this.instruction.previewInstruction.editButtonLabel)return{size:"SIZE_SMALL",style:"STYLE_SUGGESTIVE",text:this.instruction.previewInstruction.editButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.previewInstruction.editButtonLabel)}}}}}, saveButton:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction&&this.instruction.editInstruction.saveButtonLabel)return{style:"STYLE_PRIMARY",size:"SIZE_SMALL",text:this.instruction.editInstruction.saveButtonLabel,accessibilityData:{accessibilityData:{label:this.getSimpleText(this.instruction.editInstruction.saveButtonLabel)}}}}}, cropOffsetTop:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetTop||void 0===this.pickerDisplayOffsetTop?0:this.pickerDisplayOffsetTop-this.imageDisplayOffsetTop}}, cropOffsetLeft:{configurable:!0,enumerable:!0,get:function(){return void 0===this.imageDisplayOffsetLeft||void 0===this.pickerDisplayOffsetLeft?0:this.pickerDisplayOffsetLeft-this.imageDisplayOffsetLeft}}, pickerBackgroundStyle:{configurable:!0,enumerable:!0,get:function(){return ec({transform:"translateX("+this.getSignedPosition(this.imageDisplayOffsetLeft,"X",void 0)+") translateY("+this.getSignedPosition(this.imageDisplayOffsetTop,"Y",void 0)+")"})}}, pickerDisplayStyle:{configurable:!0,enumerable:!0,get:function(){return ec({width:this.pickerSize+"px",height:this.pickerSize+"px",transform:"translateX("+this.getSignedPosition(this.pickerDisplayOffsetLeft,"X",void 0)+") translateY("+this.getSignedPosition(this.pickerDisplayOffsetTop,"Y",void 0)+")"})}}, imageInPickerStyle:{configurable:!0,enumerable:!0,get:function(){return ec({transform:"translateX("+this.getSignedPosition(this.cropOffsetLeft,"X","-")+") translateY("+this.getSignedPosition(this.cropOffsetTop,"Y","-")+")"})}}, previewClipperStyle:{configurable:!0,enumerable:!0,get:function(){return ec({transform:"translateX("+this.getPreviewOffset(this.cropOffsetLeft,this.pickerSize,this.previewSize,"X")+") translateY("+this.getPreviewOffset(this.cropOffsetTop,this.pickerSize,this.previewSize,"Y")+")"})}}, pickerModeStyle:{configurable:!0,enumerable:!0,get:function(){return this.cropCoordinatesSaved?"preview":"edit"}}, learnMore:{configurable:!0,enumerable:!0,get:function(){if(this.instruction&&this.instruction.editInstruction)return this.instruction.editInstruction.learnMore}}, learnMoreUrl:{configurable:!0,enumerable:!0,get:function(){if(this.learnMore&&this.learnMore.runs&&this.learnMore.runs[0]&&this.learnMore.runs[0].navigationEndpoint&&this.learnMore.runs[0].navigationEndpoint.urlEndpoint)return this.learnMore.runs[0].navigationEndpoint.urlEndpoint.url}}}); g.Object.defineProperties(mR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===o3a){var a=document.createElement("template");a.innerHTML="
\"[[altLabelForImage]]\"
\"\"
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n3a){var d=document.createElement("template");d.innerHTML=""; n3a=d}d=n3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o3a=a}a=o3a;return a}}}); var nR=mR;nR.prototype.onImageDataChange=nR.prototype.onImageDataChange;w([R(),x("design:type",Object)],nR.prototype,"imageData",void 0);w([R(),x("design:type",Object)],nR.prototype,"instruction",void 0);w([R(),x("design:type",Object)],nR.prototype,"a11yConfig",void 0);w([R(),x("design:type",Number)],nR.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],nR.prototype,"imageHeight",void 0);w([R(),x("design:type",Number)],nR.prototype,"displayScale",void 0); w([R(),x("design:type",Object)],nR.prototype,"imageDisplayOffsetTop",void 0);w([R(),x("design:type",Object)],nR.prototype,"imageDisplayOffsetLeft",void 0);w([R(),x("design:type",Object)],nR.prototype,"pickerDisplayOffsetTop",void 0);w([R(),x("design:type",Object)],nR.prototype,"pickerDisplayOffsetLeft",void 0);w([R(),x("design:type",Object)],nR.prototype,"cropCoordinatesSaved",void 0);w([R(),x("design:type",Object)],nR.prototype,"previewSize",void 0); w([R(),x("design:type",Object)],nR.prototype,"startPicker",void 0);w([R(),x("design:type",Number)],nR.prototype,"pickerOffsetX",void 0);w([R(),x("design:type",Number)],nR.prototype,"pickerOffsetY",void 0);w([R(),x("design:type",Object)],nR.prototype,"repositionOptional",void 0);w([CE("#picker-container"),x("design:type",HTMLElement)],nR.prototype,"pickerContainer",void 0);w([CE("#picker"),x("design:type",HTMLElement)],nR.prototype,"picker",void 0); w([CE("#image-in-picker-background"),x("design:type",HTMLImageElement)],nR.prototype,"imageInBackground",void 0);w([CE("#image-in-picker"),x("design:type",HTMLImageElement)],nR.prototype,"imageInPicker",void 0);w([CE("#image-in-preview-clipper"),x("design:type",HTMLImageElement)],nR.prototype,"imageInPreviewClipper",void 0);w([CE("#full-image-as-preview"),x("design:type",HTMLImageElement)],nR.prototype,"imageAsPreview",void 0); w([BE("pickerSize","imageWidth","imageHeight","pickerDisplayOffsetTop","imageDisplayOffsetTop"),x("design:type",String),x("design:paramtypes",[])],nR.prototype,"altLabelForImage",null);w([BE("imageHeight","imageWidth"),x("design:type",Number),x("design:paramtypes",[])],nR.prototype,"pickerSize",null);w([BE("imageHeight","imageWidth"),x("design:type",Object),x("design:paramtypes",[])],nR.prototype,"imageOrientationStyle",null); w([BE("instruction.previewInstruction.editButtonLabel"),x("design:type",Object),x("design:paramtypes",[])],nR.prototype,"editButton",null);w([BE("instruction.editInstruction.saveButtonLabel"),x("design:type",Object),x("design:paramtypes",[])],nR.prototype,"saveButton",null);w([BE("imageDisplayOffsetTop","pickerDisplayOffsetTop"),x("design:type",Number),x("design:paramtypes",[])],nR.prototype,"cropOffsetTop",null); w([BE("imageDisplayOffsetLeft","pickerDisplayOffsetLeft"),x("design:type",Number),x("design:paramtypes",[])],nR.prototype,"cropOffsetLeft",null);w([BE("imageDisplayOffsetLeft","imageDisplayOffsetTop"),x("design:type",dc),x("design:paramtypes",[])],nR.prototype,"pickerBackgroundStyle",null);w([BE("pickerDisplayOffsetLeft","pickerDisplayOffsetTop"),x("design:type",dc),x("design:paramtypes",[])],nR.prototype,"pickerDisplayStyle",null); w([BE("cropOffsetLeft","cropOffsetTop"),x("design:type",dc),x("design:paramtypes",[])],nR.prototype,"imageInPickerStyle",null);w([BE("cropOffsetLeft","cropOffsetTop","pickerSize","previewSize"),x("design:type",dc),x("design:paramtypes",[])],nR.prototype,"previewClipperStyle",null);w([U("imageData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nR.prototype,"onImageDataChange",null); w([BE("cropCoordinatesSaved"),x("design:type",String),x("design:paramtypes",[])],nR.prototype,"pickerModeStyle",null);w([BE("instruction.editInstruction.learnMore"),x("design:type",Object),x("design:paramtypes",[])],nR.prototype,"learnMore",null);w([BE("learnMore"),x("design:type",Object),x("design:paramtypes",[])],nR.prototype,"learnMoreUrl",null);nR=w([fO({is:"yt-img-crop-picker",noInjection:!0})],nR);var p3a;var q3a;var oR=function(){var a=O.apply(this,arguments)||this;a.isLoading_=!1;a.selectedItemIndex_=-1;a.showPollChoiceBorder=N("enable_poll_choice_border_on_web");return a}; p(oR,O);e=oR.prototype;e.computeIsChannelOwner_=function(a){if(!a)return!0;a=a[0];return!(a&&(a.signinEndpoint||a.selectServiceEndpoint))}; e.computePollClass_=function(a){if(!a)return"";a=nL(a.totalVotes);return this.isChannelOwner_&&"0"==a[0]?"owner-no-vote":""}; e.styleWidth_=function(a){return ec({width:(a?100*a:0)+"%"})}; e.dataChanged_=function(a){if(a&&(this.isLoading_=!1,this.previousPollInfo_=null,a.choices)){a=a.choices;for(var b=0;b\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p3a){var d=document.createElement("template");d.innerHTML=""; p3a=d}d=p3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q3a=a}a=q3a;return a}}}); var pR=oR;pR.prototype.onYtServiceRequestCompleted_=pR.prototype.onYtServiceRequestCompleted_;pR.prototype.onYtServiceRequestSent_=pR.prototype.onYtServiceRequestSent_;pR.prototype.onYtCommentPollRevert_=pR.prototype.onYtCommentPollRevert_;pR.prototype.onPopupClosed_=pR.prototype.onPopupClosed_;w([P(Polymer.PaperItemBehavior),x("design:type",Object)],pR.prototype,"paperItemBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],pR.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],pR.prototype,"ytRendererBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],pR.prototype,"ytdOpenPopupBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],pR.prototype,"data",void 0);w([R(),x("design:type",Object)],pR.prototype,"isLoading_",void 0);w([R({computed:"computeIsChannelOwner_(data.choices)"}),x("design:type",Boolean)],pR.prototype,"isChannelOwner_",void 0); w([R(),x("design:type",Object)],pR.prototype,"previousPollInfo_",void 0);w([R(),x("design:type",Object)],pR.prototype,"selectedItemIndex_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],pR.prototype,"showPollChoiceBorder",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],pR.prototype,"onPopupClosed_",null); w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],pR.prototype,"onYtCommentPollRevert_",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],pR.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],pR.prototype,"onYtServiceRequestCompleted_",null);pR=w([V({is:"ytd-backstage-poll-renderer"})],pR);var r3a;var s3a;var t3a=function(){return O.apply(this,arguments)||this}; p(t3a,O); g.Object.defineProperties(t3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===s3a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.lengthText)]]
";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r3a){var d=document.createElement("template");d.innerHTML=""; r3a=d}d=r3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s3a=a}a=s3a;return a}}}); var qR=t3a;w([P(kO.YtComponentBehavior),x("design:type",Object)],qR.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],qR.prototype,"data",void 0);qR=w([V({is:"ytd-child-video-renderer"})],qR);var u3a;var v3a;TO("itemSectionRenderer","playlistRenderer","ytd-playlist-renderer");var rR=function(){var a=O.apply(this,arguments)||this;a.displayItemCount=2;a.isBackstagePlaylist=!1;a.isPostCompactPlaylist=!1;return a}; p(rR,O);e=rR.prototype;e.computeFirstVideos=function(a,b){return void 0===a||void 0===b?[]:a.slice(0,b)}; e.dataChanged=function(a){a&&a.thumbnailRenderer&&(a=a.thumbnailRenderer,a.playlistVideoThumbnailRenderer&&this.set("data.thumbnail",a.playlistVideoThumbnailRenderer.thumbnail),a.playlistCustomThumbnailRenderer&&this.set("data.thumbnail",a.playlistCustomThumbnailRenderer.thumbnail))}; e.computeThumbnailHeight=function(a,b,c){return c?240:b?72:a?118:138}; e.computeThumbnailWidth=function(a,b,c,d){return c?"BIG1"===d?340:"BIG2"===d?320:"MEDIUM1"===d?300:"MEDIUM2"===d?280:360:b?128:a?210:246}; e.computeUseProminentThumbs=function(a){return a&&N("desktop_search_prominent_thumbs")}; g.Object.defineProperties(rR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v3a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u3a){var d=document.createElement("template");d.innerHTML=""; u3a=d}d=u3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v3a=a}a=v3a;return a}}}); var sR=rR;sR.prototype.dataChanged=sR.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],sR.prototype,"ytRendererBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],sR.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],sR.prototype,"data",void 0);w([R(),x("design:type",Object)],sR.prototype,"displayItemCount",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],sR.prototype,"isBackstagePlaylist",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],sR.prototype,"isPostCompactPlaylist",void 0);w([R({value:!1}),x("design:type",Boolean)],sR.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"computeUseProminentThumbs(isSearch)"}),x("design:type",Boolean)],sR.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],sR.prototype,"prominentThumbStyle",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],sR.prototype,"dataChanged",null);sR=w([V({is:"ytd-playlist-renderer"})],sR);var w3a;var x3a;var y3a=function(){return O.apply(this,arguments)||this}; p(y3a,O); g.Object.defineProperties(y3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x3a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w3a){var d=document.createElement("template");d.innerHTML=""; w3a=d}d=w3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x3a=a}a=x3a;return a}}}); var tR=y3a;w([P(X.YtRendererBehavior),x("design:type",Object)],tR.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],tR.prototype,"watchFeedThumbnail",void 0);w([R(),x("design:type",Object)],tR.prototype,"data",void 0);w([R(),x("design:type",Number)],tR.prototype,"size",void 0);tR=w([V({is:"ytd-playlist-custom-thumbnail-renderer"})],tR);var z3a;var A3a;var B3a=function(){return O.apply(this,arguments)||this}; p(B3a,O); g.Object.defineProperties(B3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===A3a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z3a){var d=document.createElement("template");d.innerHTML=""; z3a=d}d=z3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);A3a=a}a=A3a;return a}}}); var uR=B3a;w([P(X.YtRendererBehavior),x("design:type",Object)],uR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],uR.prototype,"data",void 0);w([R(),x("design:type",Number)],uR.prototype,"width",void 0);uR=w([V({is:"ytd-playlist-video-thumbnail-renderer"})],uR);var C3a;var D3a;var E3a=function(){return O.apply(this,arguments)||this}; p(E3a,O); g.Object.defineProperties(E3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D3a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C3a){var d=document.createElement("template");d.innerHTML=""; C3a=d}d=C3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D3a=a}a=D3a;return a}}}); var vR=E3a;w([P(X.YtRendererBehavior),x("design:type",Object)],vR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],vR.prototype,"data",void 0);w([R(),x("design:type",Number)],vR.prototype,"width",void 0);vR=w([V({is:"ytd-show-custom-thumbnail-renderer"})],vR);var F3a;var G3a;var wR=function(){return O.apply(this,arguments)||this}; p(wR,O);wR.prototype.sampledThumbnailColorChanged=function(){if(this.sampledThumbnailColor){var a=this.sampledThumbnailColor;this.style.backgroundColor="rgba("+a.red+","+a.green+","+a.blue+",0.8)"}}; g.Object.defineProperties(wR.prototype,{overlayStyle:{configurable:!0,enumerable:!0,get:function(){return N("enable_programmed_playlist_redesign")&&this.data.text&&this.data.icon?!0:!1}}}); g.Object.defineProperties(wR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F3a){var d=document.createElement("template");d.innerHTML=""; F3a=d}d=F3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G3a=a}a=G3a;return a}}}); var xR=wR;xR.prototype.sampledThumbnailColorChanged=xR.prototype.sampledThumbnailColorChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],xR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],xR.prototype,"data",void 0);w([R(),x("design:type",Object)],xR.prototype,"sampledThumbnailColor",void 0);w([R({reflectToAttribute:!0}),BE("data.icon","data.text"),x("design:type",Object),x("design:paramtypes",[])],xR.prototype,"overlayStyle",null); w([U("sampledThumbnailColor"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],xR.prototype,"sampledThumbnailColorChanged",null);xR=w([V({is:"ytd-thumbnail-overlay-bottom-panel-renderer"})],xR);var H3a;var I3a;var yR=function(){return O.apply(this,arguments)||this}; p(yR,O);g.Object.defineProperties(yR.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.text)}}}); g.Object.defineProperties(yR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I3a){var a=document.createElement("template");a.innerHTML="\n[[text]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H3a){var d=document.createElement("template");d.innerHTML=""; H3a=d}d=H3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I3a=a}a=I3a;return a}}}); var zR=yR;w([P(X.YtRendererBehavior),x("design:type",Object)],zR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],zR.prototype,"data",void 0);w([BE("data.text"),x("design:type",Object),x("design:paramtypes",[])],zR.prototype,"text",null);zR=w([V({is:"ytd-thumbnail-overlay-hover-text-renderer"})],zR);var J3a;var K3a;var L3a=function(){return O.apply(this,arguments)||this}; p(L3a,O); g.Object.defineProperties(L3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===K3a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J3a){var d=document.createElement("template");d.innerHTML=""; J3a=d}d=J3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K3a=a}a=K3a;return a}}}); var M3a=L3a;w([R({reflectToAttribute:!0}),x("design:type",Boolean)],M3a.prototype,"animateEqualizer",void 0);M3a=w([V({is:"ytd-thumbnail-overlay-equalizer"})],M3a);var N3a;var O3a;var AR=function(){var a=O.apply(this,arguments)||this;a.hideThumbnailEqualizer=N("kevlar_thumbnail_equalizer_killswitch");a.actionMap={"yt-miniplayer-endpoint-changed":"onMiniplayerEndpointChanged","yt-miniplayer-play-state-changed":"onMiniplayerPlayStateChanged"};return a}; p(AR,O);AR.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; AR.prototype.onMiniplayerEndpointChanged=function(){this.isVideoPlaying=!1}; AR.prototype.onMiniplayerPlayStateChanged=function(a){this.isVideoPlaying=a}; g.Object.defineProperties(AR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O3a){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.text)]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N3a){var d=document.createElement("template");d.innerHTML=""; N3a=d}d=N3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O3a=a}a=O3a;return a}}}); var BR=AR;w([P(X.YtRendererBehavior),x("design:type",Object)],BR.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],BR.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],BR.prototype,"data",void 0);w([R(),x("design:type",Boolean)],BR.prototype,"isVideoPlaying",void 0);w([R(),x("design:type",Object)],BR.prototype,"hideThumbnailEqualizer",void 0);BR=w([V({is:"ytd-thumbnail-overlay-now-playing-renderer"})],BR);var P3a;var Q3a;var R3a=function(){return O.apply(this,arguments)||this}; p(R3a,O); g.Object.defineProperties(R3a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Q3a){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P3a){var d=document.createElement("template");d.innerHTML=""; P3a=d}d=P3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q3a=a}a=Q3a;return a}}}); var CR=R3a;w([P(X.YtRendererBehavior),x("design:type",Object)],CR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],CR.prototype,"data",void 0);CR=w([V({is:"ytd-thumbnail-overlay-playback-status-renderer"})],CR);var S3a;var T3a;var DR=function(){return O.apply(this,arguments)||this}; p(DR,O);DR.prototype.onDurationChanged=function(a){this.$.progress.style.width=a+"%"}; g.Object.defineProperties(DR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===T3a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S3a){var d=document.createElement("template");d.innerHTML=""; S3a=d}d=S3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);T3a=a}a=T3a;return a}}}); var ER=DR;ER.prototype.onDurationChanged=ER.prototype.onDurationChanged;w([P(kO.YtComponentBehavior),x("design:type",Object)],ER.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],ER.prototype,"data",void 0);w([U("data.percentDurationWatched"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],ER.prototype,"onDurationChanged",null);ER=w([V({is:"ytd-thumbnail-overlay-resume-playback-renderer"})],ER);var U3a;var V3a;var FR=function(){var a=O.apply(this,arguments)||this;a.bottomPanel=!1;a.richGridOverlay=!1;a.watchFeedOverlay=!1;return a}; p(FR,O);FR.prototype.widthChanged=function(){this.watchFeedOverlay?this.style.width="":this.richGridOverlay||(this.style.width=this.width+"px")}; g.Object.defineProperties(FR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===V3a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U3a){var d=document.createElement("template");d.innerHTML=""; U3a=d}d=U3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);V3a=a}a=V3a;return a}}}); var GR=FR;GR.prototype.widthChanged=GR.prototype.widthChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],GR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],GR.prototype,"data",void 0);w([R(),x("design:type",Number)],GR.prototype,"width",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],GR.prototype,"bottomPanel",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],GR.prototype,"richGridOverlay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],GR.prototype,"watchFeedOverlay",void 0);w([U("width","watchFeedOverlay"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],GR.prototype,"widthChanged",null);GR=w([V({is:"ytd-thumbnail-overlay-side-panel-renderer"})],GR);var W3a;var X3a;var HR=function(){var a=O.apply(this,arguments)||this;a.hasIcon=!1;return a}; p(HR,O);HR.prototype.dataChanged=function(){this.data&&(this.hasIcon=!!this.data.icon)}; g.Object.defineProperties(HR.prototype,{overlayStyle:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.style)return this.data.style}}, overlayType:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.type)return this.data.type.replace("THUMBNAIL_OVERLAY_TIME_STATUS_TYPE_","")}}}); g.Object.defineProperties(HR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===X3a){var a=document.createElement("template");a.innerHTML="\n [[getSimpleString(data.text)]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W3a){var d=document.createElement("template");d.innerHTML=""; W3a=d}d=W3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);X3a=a}a=X3a;return a}}}); var IR=HR;IR.prototype.dataChanged=IR.prototype.dataChanged;w([P(kO.YtComponentBehavior),x("design:type",Object)],IR.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],IR.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],IR.prototype,"icon",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],IR.prototype,"hasIcon",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],IR.prototype,"dataChanged",null);w([R({reflectToAttribute:!0}),BE("data.style"),x("design:type",Object),x("design:paramtypes",[])],IR.prototype,"overlayStyle",null);w([R({reflectToAttribute:!0}),BE("data.type"),x("design:type",Object),x("design:paramtypes",[])],IR.prototype,"overlayType",null);IR=w([V({is:"ytd-thumbnail-overlay-time-status-renderer"})],IR);var Y3a;var Z3a;var JR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a}; p(JR,O);JR.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; JR.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:"ytd-thumbnail-overlay-bottom-panel-renderer",thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]", bottomPanel:"[[bottomSidePanel]]",watchFeedOverlay:"[[watchFeedThumbnail]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer"}},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer"}},"data.thumbnailRenderer":{id:"playlist-thumbnails",mapping:{playlistVideoThumbnailRenderer:{component:"ytd-playlist-video-thumbnail-renderer", properties:{width:"[[width]]"}},playlistCustomThumbnailRenderer:{component:"ytd-playlist-custom-thumbnail-renderer",properties:{size:"[[customThumbnailSize]]",watchFeedThumbnail:"[[watchFeedThumbnail]]"}},showCustomThumbnailRenderer:{component:"ytd-show-custom-thumbnail-renderer",properties:{width:"[[width]]"}}}}}}; g.Object.defineProperties(JR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Z3a){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y3a){var d=document.createElement("template");d.innerHTML=""; Y3a=d}d=Y3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z3a=a}a=Z3a;return a}}}); var KR=JR;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],KR.prototype,"ytActionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],KR.prototype,"ytRendererstamperBehavior",void 0);w([P(t2a.YtdThumbnailBehavior),x("design:type",Object)],KR.prototype,"ytdThumbnailBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],KR.prototype,"componentBehavior",void 0);w([R({value:!1}),x("design:type",Boolean)],KR.prototype,"watchFeedThumbnail",void 0); w([R(),x("design:type",Number)],KR.prototype,"customThumbnailSize",void 0);w([R(),x("design:type",Object)],KR.prototype,"data",void 0);KR=w([V({is:"ytd-playlist-thumbnail"})],KR);var $3a;var a4a;var LR=function(){var a=O.apply(this,arguments)||this;a.noEndpoints=!1;return a}; p(LR,O);e=LR.prototype;e.getMetadata=function(a){var b=[],c=a.shortViewCountText||a.viewCountText;c&&b.push(nL(c));a.publishedTimeText&&b.push(nL(a.publishedTimeText));a.upcomingEventData&&a.upcomingEventData.upcomingEventText&&b.push(pJ(nL(a.upcomingEventData.upcomingEventText),Number(a.upcomingEventData.startTime)));return b}; e.observeDataForBylineSeparator=function(){this.data&&this.toggleClass("byline-separated",0\n
\n \n
\n \n
\n
\n
\n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$3a){var d=document.createElement("template");d.innerHTML=""; $3a=d}d=$3a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a4a=a}a=a4a;return a}}}); var MR=LR;MR.prototype.observeDataForBylineSeparator=MR.prototype.observeDataForBylineSeparator;w([R(),x("design:type",Object)],MR.prototype,"data",void 0);w([R(),x("design:type",Object)],MR.prototype,"noEndpoints",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],MR.prototype,"radioMeta",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],MR.prototype,"watchFeedBigThumbs",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],MR.prototype,"richMeta",void 0);w([R(),x("design:type",Boolean)],MR.prototype,"noByline",void 0);w([R({computed:"isLongByline(data, radioMeta)"}),x("design:type",Boolean)],MR.prototype,"longByline",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],MR.prototype,"truncateMetadataLine",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],MR.prototype,"miniMode",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],MR.prototype,"observeDataForBylineSeparator",null);w([BE("longByline"),x("design:type",String),x("design:paramtypes",[])],MR.prototype,"longBylineClass",null);w([BE("data","longByline"),x("design:type",Object),x("design:paramtypes",[])],MR.prototype,"bylineText",null);MR=w([V({is:"ytd-video-meta-block"})],MR);function NR(a,b,c){a=k(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;if(d===b)break;for(var f=k(c),h=f.next();!h.done;h=f.next())if(d.tagName===h.value)return!0}return!1} ;var b4a;var c4a;TO("itemSectionRenderer","videoRenderer","ytd-video-renderer");var OR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-hide-item-section-videos-by-id-command":"handleHideItemSectionVideosByIdCommand"};return a}; p(OR,O);e=OR.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"},initialRenderPriority:!N("polymer_video_renderer_defer_menu")||N("desktop_persistent_menu")&&EN?void 0:0},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.attached=function(){this.toggleClass("blue-links",N("kevlar_video_blue_links"))}; e.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history");this.$["description-text"].toggleAttribute("ellipsis-truncate",!!this.data.topStandaloneBadge)}; e.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!NR(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})}; e.computeThumbnailWidth=function(a,b,c,d){return c?"BIG1"===d?340:"BIG2"===d?320:"MEDIUM1"===d?300:"MEDIUM2"===d?280:360:b?128:a?210:246}; e.handleHideItemSectionVideosByIdCommand=function(a){a.hideItemSectionVideosByIdCommand&&this.data&&this.data.videoId===a.hideItemSectionVideosByIdCommand.videoId&&(this.isHidden=!0)}; e.computeUseProminentThumbs=function(a){return a&&N("desktop_search_prominent_thumbs")}; e.getMetadataSnippetContainerClass=function(a){return a?"metadata-snippet-container-one-line":"metadata-snippet-container"}; g.Object.defineProperties(OR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===c4a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n

\n \n \n \n \n \n

\n
\n
\n \n \n
\n \n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===b4a){var d=document.createElement("template");d.innerHTML=""; b4a=d}d=b4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);c4a=a}a=c4a;return a}}}); var PR=OR;w([P(X.YtRendererBehavior),x("design:type",Object)],PR.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],PR.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],PR.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],PR.prototype,"ytdLockupBehavior",void 0);w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],PR.prototype,"ytdMouseDownPrefetchableBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],PR.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],PR.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],PR.prototype,"isBackstageVideo",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],PR.prototype,"isPostCompactVideo",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],PR.prototype,"isHistory",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],PR.prototype,"isRichGridVideoPost",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],PR.prototype,"isHidden",void 0);w([R({value:!1}),x("design:type",Boolean)],PR.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"computeUseProminentThumbs(isSearch)"}),x("design:type",Boolean)],PR.prototype,"useProminentThumbs",void 0); w([R({reflectToAttribute:!0,computed:"computeIcon_(data.inlineTitleIcon)"}),x("design:type",String)],PR.prototype,"inlineTitleIcon",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],PR.prototype,"prominentThumbStyle",void 0);PR=w([V({is:"ytd-video-renderer"})],PR);var d4a;var e4a;var QR=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-upcoming-event-reminder-button-state-command":"handleUpdateUpcomingEventReminderButtonStateCommand"};return a}; p(QR,O);e=QR.prototype;e.configureRendererStamper=function(){return{"currentButtonStateRenderer.button":{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.onSeriesReminderStateEntityChange=function(){var a,b,c;(null===(a=this.eventReminderStateEntity)||void 0===a?0:a.key)&&"SPORTS_SERIES_REMINDER_STATE_ALL"===(null===(b=this.seriesReminderStateEntity)||void 0===b?void 0:b.state)&&"UPCOMING_EVENT_REMINDER_STATE_SINGLE"===(null===(c=this.eventReminderStateEntity)||void 0===c?void 0:c.state)&&this.ytdReduxBehavior.dispatch(LL("upcomingEventReminderStateEntity",this.eventReminderStateEntity.key,Object.assign(Object.assign({},this.eventReminderStateEntity), {state:"UPCOMING_EVENT_REMINDER_STATE_NONE"})))}; e.onYtServiceRequestCompleted=function(){this.set("data.currentState",this.getButtonStateFromReminderState())}; e.onYtServiceRequestError=function(){var a;this.updateReminderStateEntitiesFromButtonState(null===(a=this.data)||void 0===a?void 0:a.currentState)}; e.handleUpdateUpcomingEventReminderButtonStateCommand=function(a){var b;if(a.updateUpcomingEventReminderButtonStateCommand){var c=null===(b=this.data)||void 0===b?void 0:b.targetId;c&&a.updateUpcomingEventReminderButtonStateCommand.targetId===c&&this.async(this.updateReminderStateEntitiesFromButtonState.bind(this,a.updateUpcomingEventReminderButtonStateCommand.state))}}; e.getButtonStateFromReminderState=function(){var a,b,c,d,f;return"SPORTS_SERIES_REMINDER_STATE_ALL"===(null===(a=this.seriesReminderStateEntity)||void 0===a?void 0:a.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SERIES":"UPCOMING_EVENT_REMINDER_STATE_SINGLE"===(null===(b=this.eventReminderStateEntity)||void 0===b?void 0:b.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SINGLE":"SPORTS_SERIES_REMINDER_STATE_NONE"===(null===(c=this.seriesReminderStateEntity)||void 0===c?void 0:c.state)&&"UPCOMING_EVENT_REMINDER_STATE_NONE"===( null===(d=this.eventReminderStateEntity)||void 0===d?void 0:d.state)?"UPCOMING_EVENT_REMINDER_BUTTON_STATE_NONE":null===(f=this.data)||void 0===f?void 0:f.currentState}; e.updateReminderStateEntitiesFromButtonState=function(a){var b,c;if(a){switch(a){case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SERIES":a="UPCOMING_EVENT_REMINDER_STATE_NONE";var d="SPORTS_SERIES_REMINDER_STATE_ALL";break;case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_SINGLE":a="UPCOMING_EVENT_REMINDER_STATE_SINGLE";d="SPORTS_SERIES_REMINDER_STATE_NONE";break;case"UPCOMING_EVENT_REMINDER_BUTTON_STATE_NONE":a="UPCOMING_EVENT_REMINDER_STATE_NONE";d="SPORTS_SERIES_REMINDER_STATE_NONE";break;default:return;}(null===( b=this.eventReminderStateEntity)||void 0===b?0:b.key)&&this.ytdReduxBehavior.dispatch(LL("upcomingEventReminderStateEntity",this.eventReminderStateEntity.key,Object.assign(Object.assign({},this.eventReminderStateEntity),{state:a})));(null===(c=this.seriesReminderStateEntity)||void 0===c?0:c.key)&&this.ytdReduxBehavior.dispatch(LL("sportsSeriesReminderStateEntity",this.seriesReminderStateEntity.key,Object.assign(Object.assign({},this.seriesReminderStateEntity),{state:d})))}}; g.Object.defineProperties(QR.prototype,{currentButtonStateRenderer:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d=this.getButtonStateFromReminderState();if(d&&null!==(b=null===(a=this.data)||void 0===a?void 0:a.states)&&void 0!==b&&b.length)for(var f=k(this.data.states),h=f.next();!h.done;h=f.next())if(h=h.value,(null===(c=h.upcomingEventReminderButtonStateRenderer)||void 0===c?void 0:c.state)===d)return h.upcomingEventReminderButtonStateRenderer}}}); g.Object.defineProperties(QR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===e4a){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===d4a){var d=document.createElement("template");d.innerHTML="";d4a=d}d=d4a;c.call(b, d.content.cloneNode(!0),a.content.firstChild);e4a=a}a=e4a;return a}}}); var RR=QR;RR.prototype.onYtServiceRequestError=RR.prototype.onYtServiceRequestError;RR.prototype.onYtServiceRequestCompleted=RR.prototype.onYtServiceRequestCompleted;RR.prototype.onSeriesReminderStateEntityChange=RR.prototype.onSeriesReminderStateEntityChange;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],RR.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],RR.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],RR.prototype,"ytRendererstamperBehavior",void 0);w([P(CQ),x("design:type",Object)],RR.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],RR.prototype,"data",void 0);w([R({selectorArgs:["data.upcomingEventData.reminderStateEntityKey"],selector:function(a,b){return ML(a.entities,"upcomingEventReminderStateEntity",b)}}), x("design:type",Object)],RR.prototype,"eventReminderStateEntity",void 0);w([R({selectorArgs:["eventReminderStateEntity.seriesReminderState"],selector:function(a,b){return ML(a.entities,"sportsSeriesReminderStateEntity",b)}}), x("design:type",Object)],RR.prototype,"seriesReminderStateEntity",void 0);w([BE("data.currentState","eventReminderStateEntity","seriesReminderStateEntity"),x("design:type",Object),x("design:paramtypes",[])],RR.prototype,"currentButtonStateRenderer",null);w([U("seriesReminderStateEntity"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RR.prototype,"onSeriesReminderStateEntityChange",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RR.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RR.prototype,"onYtServiceRequestError",null);RR=w([V({is:"ytd-upcoming-event-reminder-button-renderer"})],RR);var f4a;var g4a;var SR=function(){return O.apply(this,arguments)||this}; p(SR,O);SR.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{ellipsisTruncate:!0}}}}}}; g.Object.defineProperties(SR.prototype,{text:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.ytRendererBehavior.getSimpleString(this.data.responseText)}}}); g.Object.defineProperties(SR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===g4a){var a=document.createElement("template");a.innerHTML="[[text]]\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f4a){var d=document.createElement("template");d.innerHTML=""; f4a=d}d=f4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);g4a=a}a=g4a;return a}}}); var TR=SR;w([P(Z),x("design:type",Object)],TR.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],TR.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],TR.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],TR.prototype,"shelfDismissal",void 0);w([BE("data.responseText"),x("design:type",Object),x("design:paramtypes",[])],TR.prototype,"text",null); TR=w([V({is:"ytd-notification-multi-action-renderer"})],TR);var h4a;var i4a;var UR=function(){return O.apply(this,arguments)||this}; p(UR,O);UR.prototype.ready=function(){var a=this;this.$.undo.addEventListener("tap",function(){a.onUndoTap()})}; UR.prototype.onUndoTap=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.undoEndpoint])}; g.Object.defineProperties(UR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i4a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h4a){var d=document.createElement("template");d.innerHTML=""; h4a=d}d=h4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i4a=a}a=i4a;return a}}}); var VR=UR;w([P(X.YtRendererBehavior),x("design:type",Object)],VR.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],VR.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],VR.prototype,"data",void 0);VR=w([V({is:"ytd-notification-text-renderer"})],VR);var j4a;var k4a;var l4a={},m4a="player_uid_"+(1E9*Math.random()>>>0);function n4a(a,b,c,d){d=void 0===d?!0:d;a="string"===typeof a?ag(document,a):a;var f=m4a+"_"+Sa(a),h=l4a[f];if(h&&d)return o4a(b,c)?h.api.loadVideoByPlayerVars(b.args||null):h.loadNewVideoConfig(b),h.api;h=new $K(a,f,b,c);l4a[f]=h;Wk("player-added",h.api);eea(h,function(){delete l4a[h.getId()]}); return h.api} function o4a(a,b){return b&&b.serializedExperimentFlags?b.serializedExperimentFlags.includes("web_player_remove_playerproxy=true"):a&&a.args&&a.args.fflags?a.args.fflags.includes("web_player_remove_playerproxy=true"):!1} ;var WR=function(){var a=O.apply(this,arguments)||this;a.mouseOverDelayJobId_=0;a.hideImageDelayJobId_=0;a.fadeInImageDelayJobId_=0;a.startTimeMs_=-1;a.loadingStartTimeMs_=-1;a.loadingEndTimeMs_=-1;a.api_=null;a.hasVideoPreview_=!1;return a}; p(WR,O);e=WR.prototype;e.attached=function(){this.data&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())}; e.detached=function(){this.isAttachedAndDataSet_=!1;this.hideThumbnail_();this.data=void 0;this.csn=null}; e.dataChanged_=function(a){a&&this.isAttached&&!this.isAttachedAndDataSet_&&(this.isAttachedAndDataSet_=!0,this.showThumbnail_())}; e.showThumbnail_=function(){var a=this;this.csn=Tn();bp("fmth");Fk.cancelJob(this.mouseOverDelayJobId_);this.data&&this.data.movingThumbnailDetails&&this.data.movingThumbnailDetails.thumbnails?this.mouseOverDelayJobId_=Gk(function(){a.loadingStartTimeMs_=vk();if(N("enable_live_video_preview"))a.startPlayback_();else{var b=a.$.thumbnail;b.complete?a.displayMouseOverImage_():a.listen(b,"load","displayMouseOverImage_")}},150):this.toggleClass("show",!0,this.$.play)}; e.hideThumbnail_=function(){this.data&&this.data.enableHoveredLogging&&!N("enable_live_video_preview")&&this.logEvent_("INTERACTION_LOGGING_GESTURE_TYPE_HOVER");this.removeVideoPreview_()}; e.onTap_=function(){this.removeVideoPreview_()}; e.startPlayback_=function(){var a=this;Fk.cancelJob(this.hideImageDelayJobId_);this.fadeInImageDelayJobId_=Gk(function(){a.toggleClass("loading",!0,a.$["player-container"]);a.acquireApi_(a.$["player-container"]).then(function(b){b.addEventListener("onStateChange",function(c){a.onPlayerStateChange_(c)})})},50)}; e.acquireApi_=function(a){var b=this;this.releaseApi_();var c=Ui(),d=this.getPlayerConfig_();d.args.jsapicallback=function(f){c.resolve(f)}; this.ytComponentBehavior.getInterface(JM).loadPlayer().then(function(){b.api_=n4a(a,d)}); return c.promise}; e.onPlayerStateChange_=function(a){var b=this,c=this.$["player-container"],d=this.$.play;1==a&&(this.loadingEndTimeMs_=vk(),this.startTimeMs_=vk(),this.hasVideoPreview_=!0,this.toggleClass("loading",!1,c),this.toggleClass("playing",!0,c),this.hideImageDelayJobId_=Gk(function(){b.toggleClass("playing",!1,c);b.toggleClass("fade-in",!0,d);b.releaseApi_()},2500))}; e.releaseApi_=function(){this.api_&&(this.api_.stopVideo&&this.api_.stopVideo(),this.api_.destroy&&this.api_.destroy(),this.api_=null)}; e.getPlayerConfig_=function(){var a=A("FILLER_DATA").player;a.attrs.id="video-preview";a.args.el="videopreview";a.args.mute="1";a.args.autoplay="1";a.args.controls="0";a.args.showinfo="0";a.args.enablecastapi="0";a.args.modestbranding="1";a.args.iv_load_policy="3";a.args.rel="0";a.args.player_wide="1";a.args.video_id=this.videoId;a.args.ss="1";a.args.showwatchlater="0";a.args.enablesizebutton="0";a.args.ps="desktop-polymer";a.args.vq="tiny";a.args.player_response=void 0;return a}; e.logEvent_=function(a){if(!(0>=this.loadingStartTimeMs_)){var b={isMovingThumbnail:this.hasVideoPreview_};if(this.hasVideoPreview_&&0
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j4a){var d=document.createElement("template");d.innerHTML=""; j4a=d}d=j4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);k4a=a}a=k4a;return a}}}); var YR=WR;YR.prototype.onTap_=YR.prototype.onTap_;w([P(X.YtRendererBehavior),x("design:type",Object)],YR.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],YR.prototype,"ytComponentBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],YR.prototype,"data",void 0);w([R(),x("design:type",Object)],YR.prototype,"csn",void 0);w([R(),x("design:type",Object)],YR.prototype,"trackingParams",void 0); w([R(),x("design:type",String)],YR.prototype,"videoId",void 0);w([R(),x("design:type",Boolean)],YR.prototype,"isAttachedAndDataSet_",void 0);w([S("click"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],YR.prototype,"onTap_",null);YR=w([V({is:"ytd-moving-thumbnail-renderer"})],YR);var p4a;var q4a;var ZR=function(){return O.apply(this,arguments)||this}; p(ZR,O);e=ZR.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("top-right-overlay")||this.setAttribute("top-right-overlay","true");this.tooltip.position="rtl"===A("HTML_DIR")?"right":"left"}; e.dataChanged=function(){this.popupOpen=!1}; e.computeAriaLabel=function(a){return a.accessibilityData.label}; e.onTap=function(a){a.stopPropagation();a.preventDefault();this.ytActionSenderBehavior.sendServiceRequestAction([this.data.command])}; e.onPopupOpened=function(){this.popupOpen=!0;this.eventForwardingBehavior.startForwardingEvents(["yt-navigate"],this.eventSink)}; e.onPopupClosed=function(){this.popupOpen=!1;this.eventForwardingBehavior.stopForwardingEvents()}; g.Object.defineProperties(ZR,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===q4a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p4a){var d=document.createElement("template");d.innerHTML=""; p4a=d}d=p4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q4a=a}a=q4a;return a}}}); var $R=ZR;$R.prototype.onPopupClosed=$R.prototype.onPopupClosed;$R.prototype.onPopupOpened=$R.prototype.onPopupOpened;$R.prototype.onTap=$R.prototype.onTap;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],$R.prototype,"eventForwardingBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],$R.prototype,"ytActionSenderBehavior",void 0);w([P(Polymer.IronButtonState),x("design:type",Object)],$R.prototype,"ironButtonState",void 0); w([P(kO.YtComponentBehavior),x("design:type",Object)],$R.prototype,"componentBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],$R.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:-1}),x("design:type",Number)],$R.prototype,"tabindex",void 0);w([R({reflectToAttribute:!0,computed:"computeAriaLabel(data.accessibility)"}),x("design:type",String)],$R.prototype,"ariaLabel",void 0);w([R({value:!1}),x("design:type",Boolean)],$R.prototype,"disableTooltips",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],$R.prototype,"popupOpen",void 0);w([R(),x("design:type",Element)],$R.prototype,"eventSink",void 0);w([CE("#tooltip"),x("design:type",Object)],$R.prototype,"tooltip",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],$R.prototype,"onTap",null);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$R.prototype,"onPopupOpened",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$R.prototype,"onPopupClosed",null);$R=w([V({is:"ytd-thumbnail-overlay-button-renderer"})],$R);var r4a;var s4a;var t4a=function(){var a=O.apply(this,arguments)||this;a.active=!1;return a}; p(t4a,O); g.Object.defineProperties(t4a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===s4a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r4a){var d=document.createElement("template");d.innerHTML=""; r4a=d}d=r4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s4a=a}a=s4a;return a}}}); var aS=t4a;w([P(X.YtRendererBehavior),x("design:type",Object)],aS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],aS.prototype,"data",void 0);w([R(),x("design:type",Object)],aS.prototype,"active",void 0);aS=w([V({is:"ytd-thumbnail-overlay-downloading-renderer"})],aS);var u4a;var v4a;var w4a=function(){return O.apply(this,arguments)||this}; p(w4a,O); g.Object.defineProperties(w4a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v4a){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u4a){var d=document.createElement("template");d.innerHTML=""; u4a=d}d=u4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v4a=a}a=v4a;return a}}}); var bS=w4a;w([P(X.YtRendererBehavior),x("design:type",Object)],bS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],bS.prototype,"data",void 0);bS=w([V({is:"ytd-thumbnail-overlay-endorsement-renderer"})],bS);var x4a;var y4a;var z4a=function(){return O.apply(this,arguments)||this}; p(z4a,O); g.Object.defineProperties(z4a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===y4a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n\n\n \n \n \n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x4a){var d=document.createElement("template");d.innerHTML=""; x4a=d}d=x4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);y4a=a}a=y4a;return a}}}); var cS=z4a;w([P(X.YtRendererBehavior),x("design:type",Object)],cS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],cS.prototype,"data",void 0);cS=w([V({is:"ytd-thumbnail-overlay-pinking-renderer"})],cS);var A4a;var B4a;var dS=function(){var a=O.apply(this,arguments)||this;a.disableTooltips=!1;a.isLoading_=!1;a.useExpandableTooltip=!1;a.toggled=!1;a.hovered=!1;a.mouseoverDelayJobId_=0;a.toggleDelayJobId_=0;a.expandAnimationDelayJobId_=0;return a}; p(dS,O);e=dS.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1");this.hasAttribute("top-right-overlay")||this.setAttribute("top-right-overlay","true");this.$.tooltip.position="rtl"==A("HTML_DIR")?"right":"left"}; e.detached=function(){this.useExpandableTooltip&&(this.isLoading_=this.hovered=!1,this.data&&!this.data.toggledServiceEndpoint&&this.set("data.isToggled",!1),this.mouseoverDelayJobId_&&Fk.cancelJob(this.mouseoverDelayJobId_),this.toggleDelayJobId_&&Fk.cancelJob(this.toggleDelayJobId_),this.expandAnimationDelayJobId_&&Fk.cancelJob(this.expandAnimationDelayJobId_),this.useExpandableTooltip=!1)}; e.dataChanged=function(){this.popupOpen=this.isLoading_=!1;this.mouseoverDelayJobId_&&Fk.cancelJob(this.mouseoverDelayJobId_);this.toggleDelayJobId_&&Fk.cancelJob(this.toggleDelayJobId_);this.expandAnimationDelayJobId_&&Fk.cancelJob(this.expandAnimationDelayJobId_)}; e.computeIcon_=function(a,b,c){return(c?b:a).iconType}; e.computeAriaLabel_=function(a,b,c){return(c?b:a).accessibilityData.label}; e.computeTooltip_=function(a,b,c){return c?b:a}; e.computeToggled_=function(){return!(!this.data||!this.data.isToggled)}; e.onTap_=function(a){var b=this;a.stopPropagation();a.preventDefault();if(!this.isLoading_||this.useExpandableTooltip)if(a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint)this.isLoading_=!0,this.set("data.isToggled",!this.data.isToggled),this.ytActionSenderBehavior.sendServiceRequestAction([a]),this.useExpandableTooltip&&(this.toggleDelayJobId_=Gk(function(){b.hovered=!1;b.data&&!b.data.toggledServiceEndpoint&&(b.expandAnimationDelayJobId_=Gk(function(){b.set("data.isToggled", !1)},200))},2E3))}; e.onMouseenter_=function(){var a=this;this.useExpandableTooltip&&(this.mouseoverDelayJobId_=Gk(function(){a.hovered=!0},300))}; e.onMouseleave_=function(){Fk.cancelJob(this.mouseoverDelayJobId_);this.toggled||(this.hovered=!1)}; e.onPopupOpened_=function(){this.popupOpen=!0;this.ytEventForwardingBehavior.startForwardingEvents(["yt-navigate"],this.eventSink)}; e.onPopupClosed_=function(){this.popupOpen=!1;this.ytEventForwardingBehavior.stopForwardingEvents()}; e.onServiceRequestCompleted_=function(a,b){this.isLoading_=!1;if(!this.useExpandableTooltip||this.data.toggledServiceEndpoint&&this.data.untoggledServiceEndpoint)this.serviceRequestWasSuccessful_(b)||this.set("data.isToggled",!this.data.isToggled)}; e.serviceRequestWasSuccessful_=function(a){return(this.data.isToggled?this.data.toggledServiceEndpoint:this.data.untoggledServiceEndpoint).playlistEditEndpoint?"STATUS_SUCCEEDED"===a.data.status:!0}; g.Object.defineProperties(dS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B4a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A4a){var d=document.createElement("template");d.innerHTML=""; A4a=d}d=A4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B4a=a}a=B4a;return a}}}); var eS=dS;eS.prototype.onServiceRequestCompleted_=eS.prototype.onServiceRequestCompleted_;eS.prototype.onPopupClosed_=eS.prototype.onPopupClosed_;eS.prototype.onPopupOpened_=eS.prototype.onPopupOpened_;eS.prototype.onMouseleave_=eS.prototype.onMouseleave_;eS.prototype.dataChanged=eS.prototype.dataChanged;w([P(Polymer.IronButtonState),x("design:type",Object)],eS.prototype,"ironButtonState",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],eS.prototype,"ytComponentBehavior",void 0); w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],eS.prototype,"ytEventForwardingBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],eS.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],eS.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeAriaLabel_(data.untoggledAccessibility, data.toggledAccessibility, data.isToggled)"}),x("design:type",String)],eS.prototype,"ariaLabel",void 0); w([R(),x("design:type",Object)],eS.prototype,"disableTooltips",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],eS.prototype,"popupOpen",void 0);w([R(),x("design:type",Object)],eS.prototype,"isLoading_",void 0);w([R(),x("design:type",Element)],eS.prototype,"eventSink",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],eS.prototype,"useExpandableTooltip",void 0); w([R({reflectToAttribute:!0,computed:"computeToggled_(data.isToggled)"}),x("design:type",Object)],eS.prototype,"toggled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],eS.prototype,"hovered",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eS.prototype,"dataChanged",null);w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eS.prototype,"onMouseleave_",null); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eS.prototype,"onPopupOpened_",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eS.prototype,"onPopupClosed_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],eS.prototype,"onServiceRequestCompleted_",null); eS=w([V({is:"ytd-thumbnail-overlay-toggle-button-renderer"})],eS);var C4a;var D4a;var fS=function(){var a=O.apply(this,arguments)||this;a.eventSink=function(){return a}; a.actionMap={"yt-miniplayer-endpoint-changed":"checkMiniplayer_"};return a}; p(fS,O); fS.prototype.configureRendererStamper=function(){return{"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayBottomPanelRenderer:{component:"ytd-thumbnail-overlay-bottom-panel-renderer",properties:{sampledThumbnailColor:"[[data.thumbnail.sampledThumbnailColor]]"}},thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]", bottomPanel:"[[bottomSidePanel]]",richGridOverlay:"[[richGridThumbnail]]",watchFeedOverlay:"[[watchFeedThumbnail]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer",thumbnailOverlayNowPlayingRenderer:"ytd-thumbnail-overlay-now-playing-renderer",thumbnailOverlayPinkingRenderer:"ytd-thumbnail-overlay-pinking-renderer",thumbnailOverlayDownloadingRenderer:{component:"ytd-thumbnail-overlay-downloading-renderer",params:{active:!0}}},initialRenderPriority:N("defer_overlays")? 0:void 0,waitForSignal:"eocs"},hoverOverlays_:{id:"hover-overlays",mapping:{thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer",thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]",eventSink:"[[eventSink]]",useExpandableTooltip:"[[useExpandableTooltip]]"}},thumbnailOverlayButtonRenderer:{component:"ytd-thumbnail-overlay-button-renderer",properties:{disableTooltips:"[[disableTooltips]]", eventSink:"[[eventSink]]"}},thumbnailOverlayEndorsementRenderer:"ytd-thumbnail-overlay-endorsement-renderer"}},richThumbnail:{id:"mouseover-overlay",mapping:{movingThumbnailRenderer:{component:"ytd-moving-thumbnail-renderer",properties:{trackingParams:"[[data.trackingParams]]",videoId:"[[data.videoId]]"}}},renderPriority:2,waitForSignal:"eocs"}}}; fS.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; fS.prototype.computeRichThumbnail=function(a,b){if(a&&b&&!N("disable_moving_thumbs_handling"))return b}; g.Object.defineProperties(fS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D4a){var a=document.createElement("template");a.innerHTML="\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C4a){var d=document.createElement("template");d.innerHTML=""; C4a=d}d=C4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D4a=a}a=D4a;return a}}}); var gS=fS;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],gS.prototype,"ytActionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],gS.prototype,"ytRendererstamperBehavior",void 0);w([P(t2a.YtdThumbnailBehavior),x("design:type",Object)],gS.prototype,"ytdThumbnailBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],gS.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],gS.prototype,"data",void 0); w([R({value:!1}),x("design:type",Boolean)],gS.prototype,"circular",void 0);w([R({computed:"computeRichThumbnail(finalHoveredState_,data.richThumbnail)"}),x("design:type",Object)],gS.prototype,"richThumbnail",void 0);w([R(),x("design:type",Object)],gS.prototype,"eventSink",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],gS.prototype,"queued",void 0);w([R({value:!1}),x("design:type",Boolean)],gS.prototype,"richGridThumbnail",void 0); w([R({value:!1}),x("design:type",Boolean)],gS.prototype,"useExpandableTooltip",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],gS.prototype,"objectFit",void 0);w([R({value:!1}),x("design:type",Boolean)],gS.prototype,"watchFeedThumbnail",void 0);gS=w([V({is:"ytd-thumbnail"})],gS);var E4a;var F4a;var G4a=(MA.FIRSTDAYOFWEEK+1)%7;function H4a(a,b){return a.year===b.year&&a.month===b.month&&a.day===b.day} function hS(a,b){return a.year!==b.year?a.year.25*(O4a-N4a))L4a=[];else{for(var P4a=N4a;P4a=this.timeZones.length))return this.timeZones[this.selectedTimezoneIndex]}}, selectedTime:{configurable:!0,enumerable:!0,get:function(){return this.timeOfDayOptions[this.selectedTimeIndex]}}}); g.Object.defineProperties(jS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F4a){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n \n
[[selectedTime.text]]
\n \n \n
\n \n \n \n
\n \n \n
[[getTimezoneFormat(selectedTimezone)]]
\n \n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E4a){var d=document.createElement("template");d.innerHTML=""; E4a=d}d=E4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F4a=a}a=F4a;return a}}}); var kS=jS;kS.prototype.onDateTimeTimezoneChange=kS.prototype.onDateTimeTimezoneChange;kS.prototype.onDatePicked=kS.prototype.onDatePicked;kS.prototype.updateDefaultSelectedValue=kS.prototype.updateDefaultSelectedValue;w([R(),x("design:type",Object)],kS.prototype,"data",void 0);w([R(),x("design:type",Object)],kS.prototype,"calendarConfig",void 0);w([R(),x("design:type",Object)],kS.prototype,"selectedDate",void 0);w([R(),x("design:type",Object)],kS.prototype,"selectedTimeIndex",void 0); w([R(),x("design:type",Object)],kS.prototype,"selectedTimezoneIndex",void 0);w([CE("#time-listbox"),x("design:type",Object)],kS.prototype,"timeListBox",void 0);w([CE("#timezone-listbox"),x("design:type",Object)],kS.prototype,"timezoneListBox",void 0);w([P(Z),x("design:type",Object)],kS.prototype,"rendererStamperBehavior",void 0);w([BE("data.timezoneOptions"),x("design:type",Object),x("design:paramtypes",[])],kS.prototype,"timeZones",null); w([U("data","timeZones"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kS.prototype,"updateDefaultSelectedValue",null);w([BE("selectedTimezoneIndex","timeZones"),x("design:type",Object),x("design:paramtypes",[])],kS.prototype,"selectedTimezone",null);w([BE("selectedTimeIndex"),x("design:type",Object),x("design:paramtypes",[])],kS.prototype,"selectedTime",null); w([S("ytd-calendar-date-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],kS.prototype,"onDatePicked",null);w([U("selectedTimezone","selectedTime","selectedDate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kS.prototype,"onDateTimeTimezoneChange",null);kS=w([V({is:"ytd-date-time-picker-renderer"})],kS);var Y4a;var Z4a;var lS=function(){var a=O.apply(this,arguments)||this;a.skipNextOpenDialog=!1;a.errorMessage="";return a}; p(lS,O);e=lS.prototype;e.attached=function(){var a=this,b=new MutationObserver(function(){0c;c++)b.push(MA.NARROWWEEKDAYS[(c+G4a)%7]);c=[];for(var d=new Date(a.start.year,a.start.month);d.getFullYear()\n \n
[[dateText]]
\n \n \n
\n
\n\n\n
\n
\n \n \n \n [[errorMessage]]\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y4a){var d=document.createElement("template");d.innerHTML=""; Y4a=d}d=Y4a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z4a=a}a=Z4a;return a}}}); var mS=lS;mS.prototype.onEscOrClickingOutside=mS.prototype.onEscOrClickingOutside;mS.prototype.scrollToDate=mS.prototype.scrollToDate;w([R(),x("design:type",Object)],mS.prototype,"calendarConfig",void 0);w([R(),x("design:type",Object)],mS.prototype,"skipNextOpenDialog",void 0);w([R(),x("design:type",Object)],mS.prototype,"errorMessage",void 0);w([CE("#textbox"),x("design:type",HTMLInputElement)],mS.prototype,"textbox",void 0); w([CE("#calendar-dialog"),x("design:type",Object)],mS.prototype,"dialog",void 0);w([CE("#calendar-main"),x("design:type",Object)],mS.prototype,"calendarMain",void 0);w([CE("#date-picker"),x("design:type",HTMLElement)],mS.prototype,"dropdownButton",void 0);w([BE("calendarConfig.selectedDate"),x("design:type",String),x("design:paramtypes",[])],mS.prototype,"dateText",null); w([BE("calendarConfig","calendarConfig.selectedDate"),x("design:type",Object),x("design:paramtypes",[])],mS.prototype,"renderData",null);w([U("renderData","calendarConfig.selectedDate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mS.prototype,"scrollToDate",null);w([S("iron-overlay-canceled"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],mS.prototype,"onEscOrClickingOutside",null); mS=w([fO({is:"ytd-calendar-date-picker",noInjection:!0})],mS);function $4a(a,b){b=b.months.findIndex(function(c){return c.year===a.year&&c.month===a.month}); return 0<=b?b:void 0} ;var a5a;var b5a;var nS=function(){var a=O.apply(this,arguments)||this;a.boundOnTapDismissButton=function(){a.dismissTapHandler()}; return a}; p(nS,O);nS.prototype.configureRendererStamper=function(){return{attachmentPreview:{id:"attachment-preview",mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},dismissButton:{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapDismissButton]]"}}}}}}; nS.prototype.dismissTapHandler=function(){this.fire("yt-backstage-attachment-dismissed")}; nS.prototype.computeAttachmentType=function(a){return a?a.backstageImageRenderer?"image":a.videoRenderer?"video":"none":"none"}; g.Object.defineProperties(nS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b5a){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a5a){var d=document.createElement("template");d.innerHTML=""; a5a=d}d=a5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b5a=a}a=b5a;return a}}}); var oS=nS;w([P(X.YtRendererBehavior),x("design:type",Object)],oS.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],oS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],oS.prototype,"attachmentPreview",void 0);w([R(),x("design:type",Object)],oS.prototype,"dismissButton",void 0);w([R(),x("design:type",Object)],oS.prototype,"boundOnTapDismissButton",void 0); w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAttachmentType(attachmentPreview)"}),x("design:type",String)],oS.prototype,"attachmentType",void 0);oS=w([V({is:"ytd-backstage-dismissable-attachment"})],oS);var c5a;var d5a;var pS=function(){var a=O.apply(this,arguments)||this;a.selectedVideoId_=void 0;a.picker_=null;return a}; p(pS,O);e=pS.prototype;e.configureRendererStamper=function(){return{videoPreview:{id:"video-preview",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}}}},cancelButton:{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onLaunchVideoPicker=function(a){var b=nL(this.get("addVideoLinkAction.title",a));if(a=this.get("addVideoLinkAction.onePickHostId",a))this.picker_||(this.picker_=ZTa(a).setTitle(b).addView(new iD().setSite("youtube.com")).addView(new hD().setType("video").setSite("youtube.com")).addView("youtube").setCallback(Ua(this.onPickVideo_,this)).build()),this.picker_.setVisible(!0)}; e.onPickVideo_=function(a){if(a)if("cancel"==a.action)this.fire("yt-video-link-button-cancel");else if("picked"===a.action){a=a.docs;if(!a||0===a.length)this.onGetVideoPreviewError_("No valid docs in response");this.selectedVideoId_=a[0].id;this.setVideoPreview_()}}; e.setVideoPreview_=function(){this.ytComponentBehavior.getInterfaceForTs("yt-network-manager").postData("/comment_service_ajax?action_get_video_preview=1",{video_id:this.selectedVideoId_}).then(this.onGetVideoPreviewSuccess_.bind(this),this.onGetVideoPreviewError_.bind(this))}; e.onGetVideoPreviewSuccess_=function(a){if(a&&a.videoPreview&&a.cancelButton)this.videoPreview=a.videoPreview,this.cancelButton=a.cancelButton,this.fire("yt-video-link-selected",{videoId:this.selectedVideoId_});else this.onGetVideoPreviewError_("Empty data from ajax")}; e.onGetVideoPreviewError_=function(){this.cancel()}; e.cancel=function(){this.videoPreview=this.cancelButton=this.selectedVideoId_=void 0;this.fire("yt-video-link-cancel")}; e.isValid=function(){return!(!this.videoPreview||!this.selectedVideoId_)}; g.Object.defineProperties(pS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d5a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c5a){var d=document.createElement("template");d.innerHTML=""; c5a=d}d=c5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d5a=a}a=d5a;return a}}}); var qS=pS;w([P(Z),x("design:type",Object)],qS.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],qS.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],qS.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],qS.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],qS.prototype,"videoPreview",void 0); w([R(),x("design:type",Object)],qS.prototype,"cancelButton",void 0);qS=w([V({is:"ytd-backstage-video-link-attachment"})],qS);function rS(a){if(!a)return!1;try{if(a.host&&"YT-FORMATTED-STRING"===a.host.tagName&&"contenteditable-textarea"===a.host.id||a.nodeType===Node.ELEMENT_NODE&&"YTD-COMMENTBOX"===a.tagName)return!0}catch(b){return!1}return rS(a.parentNode)} function sS(a){return a?"A"===a.tagName&&a.href&&a.classList.contains("yt-simple-endpoint"):!1} function e5a(a){return a?"IMG"===a.tagName&&a.classList.contains("emoji"):!1} function f5a(a,b,c){if(!a)return null;var d=sS(a);if(d&&c)return b=a.pathname.substring(a.pathname.indexOf("/channel/")+9),document.createTextNode("@"+b);if(d&&!c)return document.createTextNode("");if(e5a(a))return c=a.alt,a=a.dataset.emojiId,!a&&b&&(b=DO(b,c))&&b.isCustomEmoji&&(a=b.emojiId),a?document.createTextNode(""):document.createTextNode(c);d=a.cloneNode(!1);for(var f=0;f=b&&a.setStart(a.startContainer,a.startOffset-b)}; e.updateSuggestions=function(a,b){var c=this;this.lastSuggestionRange_&&(this.lastSuggestionRange_.detach(),this.lastSuggestionRange_=null);var d=this.$.dropdown;if((b=p5a.exec(b))&&b.length&&(b=b[b.length-1].toLocaleLowerCase(),2\n\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n5a){var d=document.createElement("template");d.innerHTML=""; n5a=d}d=n5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o5a=a}a=o5a;return a}}}); var wS=vS;wS.prototype.onKeyPress_=wS.prototype.onKeyPress_;wS.prototype.onKeyUp_=wS.prototype.onKeyUp_;wS.prototype.onKeyDown_=wS.prototype.onKeyDown_;w([P(Z),x("design:type",Object)],wS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Array)],wS.prototype,"suggestions",void 0);w([R(),x("design:type",AO)],wS.prototype,"emojiManager",void 0);w([R(),x("design:type",Number)],wS.prototype,"verticalSuggestionsOffset",void 0); w([S("keydown"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],wS.prototype,"onKeyDown_",null);w([S("keyup"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent,Range]),x("design:returntype",void 0)],wS.prototype,"onKeyUp_",null);w([S("keypress"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],wS.prototype,"onKeyPress_",null);wS=w([V({is:"ytd-emoji-input"})],wS);var q5a;var r5a;var xS=function(){return O.apply(this,arguments)||this}; p(xS,O);xS.prototype.dataChanged=function(){this.active=!1}; xS.prototype.onTap=function(){this.fire("yt-select-emoji-suggestion",this.data)}; xS.prototype.identity=function(a){return a}; g.Object.defineProperties(xS.prototype,{imageSrc:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null!==(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.image)||void 0===b?void 0:b.thumbnails)||void 0===c?void 0:c[0])&&void 0!==d&&d.url){var f=this.data.image.thumbnails[0].url;return f.startsWith("data:image/svg+xml")?Yb(f):ac(f)}}}}); g.Object.defineProperties(xS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r5a){var a=document.createElement("template");a.innerHTML="\n \"[[data.alt]]\"\n [[data.text]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q5a){var d=document.createElement("template");d.innerHTML=""; q5a=d}d=q5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r5a=a}a=r5a;return a}}}); var yS=xS;yS.prototype.dataChanged=yS.prototype.dataChanged;w([R(),x("design:type",Object)],yS.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],yS.prototype,"active",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],yS.prototype,"dataChanged",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],yS.prototype,"imageSrc",null);yS=w([V({is:"ytd-emoji-suggestion"})],yS);var s5a;var t5a;var zS=function(){var a=O.apply(this,arguments)||this;a.hasMaxOptions=!1;return a}; p(zS,O);e=zS.prototype;e.configureRendererStamper=function(){return{"data.addOptionButton":{id:"add-option",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.pollOptions_=this.setPollOptions_(this.data)}; e.setPrefilledChoices=function(a){var b=this;this.set("pollOptions_",[]);var c;for(c=0;c=this.data.maxPollOptions;Polymer.RenderStatus.afterNextRender(this,function(){var d=b.pollOptions_;Polymer.dom(b.root).querySelectorAll(".poll-option-input").forEach(function(f,h){f.value=d[h]})})}; e.focusChanged_=function(){this.updateStyles()}; e.onInput_=function(){var a=this;this.debounce("onInput_",function(){a.isValid()?a.fire("yt-commentbox-post-enable"):a.fire("yt-commentbox-post-disable")},300)}; e.setPollOptions_=function(){for(var a,b=[],c=(null===(a=this.data)||void 0===a?0:a.minPollOptions)?this.data.minPollOptions:0,d=0;d .poll-option-input").focus()})}; e.onRemovePollOption_=function(a){this.setPollOptionsFromInputs_();this.data.minPollOptions&&this.pollOptions_.length==this.data.minPollOptions?(this.clearPollOptions(),this.fire("yt-poll-attachment-dismiss")):(a=this.$.repeat.indexForElement(a.target.parentNode),this.splice("pollOptions_",a,1),this.hasMaxOptions=!1,this.areAllOptionsValid_()&&(this.$.repeat.render(),this.fire("yt-commentbox-post-enable")))}; e.isValid=function(){this.setPollOptionsFromInputs_();return this.areAllOptionsValid_()}; e.areAllOptionsValid_=function(){if(this.data.minPollOptionChars)for(var a=0,b=this.pollOptions_.length;a
\n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s5a){var d=document.createElement("template");d.innerHTML=""; s5a=d}d=s5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t5a=a}a=t5a;return a}}}); var AS=zS;AS.prototype.dataChanged=AS.prototype.dataChanged;w([P(Z),x("design:type",Object)],AS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],AS.prototype,"data",void 0);w([R(),x("design:type",Array)],AS.prototype,"pollOptions_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],AS.prototype,"hasMaxOptions",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],AS.prototype,"enableCreationBox",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],AS.prototype,"dataChanged",null);AS=w([V({is:"ytd-poll-attachment"})],AS);var u5a;var v5a;var w5a;var x5a;var BS=function(){var a=O.apply(this,arguments)||this;a.focusedSuggestionIndex=-1;return a}; p(BS,O);e=BS.prototype;e.created=function(){this.ytRendererBehavior.monitorScroll=!0}; e.clearFocusedSuggestion=function(){this.focusedSuggestionIndex=-1;this._setFocusedSuggestionId(void 0)}; e.setFocusedSuggestionIndex=function(a){!this.data||!this.data.suggestions||0>a||a>=this.data.suggestions.length||(this.focusedSuggestionIndex=a,a=this.getSuggestionId(a),this._setFocusedSuggestionId(a))}; e.advanceSuggestion=function(a){-1===this.focusedSuggestionIndex||-1!==a&&1!==a||(this.setFocusedSuggestionIndex(this.focusedSuggestionIndex+a),this.ensureSuggestionVisible(this.focusedSuggestionIndex))}; e.ensureSuggestionVisible=function(a){a=this.getSuggestionId(a);a=this.$$("[id="+a+"]");null!=a&&(a.offsetTopthis.scrollTop+this.clientHeight&&a.scrollIntoView(!1))}; e.getSuggestionId=function(a){return"user-mention-suggestion-"+a}; e.onSuggestionTap=function(a){var b=a.model.item.userMentionSuggestionRenderer;this.ytRendererBehavior.logExplicitClick(b);this.fire("yt-user-mention-suggestion-selected",{data:b,index:a.model.index})}; e.onSuggestionMouseMove=function(a){a.model.index!==this.focusedSuggestionIndex&&this.setFocusedSuggestionIndex(a.model.index)}; e.isSuggestionFocused=function(a,b){return a===b}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; g.Object.defineProperties(BS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x5a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w5a){var d=document.createElement("template");d.innerHTML=""; w5a=d}d=w5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x5a=a}a=x5a;return a}}}); var CS=BS;CS.prototype.onDomChange=CS.prototype.onDomChange;w([P(X.YtRendererBehavior),x("design:type",Object)],CS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],CS.prototype,"data",void 0);w([R(),x("design:type",Object)],CS.prototype,"focusedSuggestionIndex",void 0);w([R({readOnly:!0,notify:!0}),x("design:type",String)],CS.prototype,"focusedSuggestionId",void 0); w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],CS.prototype,"onDomChange",null);CS=w([V({is:"yt-user-mention-suggestions-dropdown"})],CS);var DS=function(){var a=O.apply(this,arguments)||this;a.suggestionsResponse=null;a.activeMention=null;a.selectionChangeListener=a.onSelectionChange.bind(a);a.pendingQuery=null;a.flowNonce=null;return a}; p(DS,O);e=DS.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={up:"focusPreviousSuggestion",down:"focusNextSuggestion","tab enter":"selectFocusedSuggestion",esc:"cancelActiveMention"}}; e.attached=function(){document.addEventListener("selectionchange",this.selectionChangeListener)}; e.detached=function(){document.removeEventListener("selectionchange",this.selectionChangeListener)}; e.hasSuggestions=function(a){return!!(a&&a.suggestions&&0c)){var d=b.textContent;!(d=d&&d.charAt(c-1))||0>"@\uFE6B\uFF20+\uFE62\uFF0B".indexOf(d)||(this.activeMention=mH(b,c-1,a.getEndNode(),a.getEndOffset()),this.flowNonce=Kn(),this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STARTED"))}}}; e.updateActiveMention=function(){if(this.activeMention){var a=NG();a&&a.isCollapsed()&&(this.activeMention=mH(this.activeMention.getStartNode(),this.activeMention.getStartOffset(),a.getEndNode(),a.getEndOffset()))}}; e.requestSuggestions=function(a){if(this.activeMention){var b={suggestions_query:a};this.pendingQuery=a;this.ytActionSenderBehavior.sendServiceRequestAction([this.suggestionsEndpoint,b])}}; e.cancelActiveMention=function(){this.activeMention&&this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_MENTION_FLOW_STOPPED");this.suggestionsResponse=this.pendingQuery=this.activeMention=null;this.dropdown.clearFocusedSuggestion()}; e.focusPreviousSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(-1),a.preventDefault())}; e.focusNextSuggestion=function(a){this.hasSuggestions(this.suggestionsResponse)&&(this.dropdown.advanceSuggestion(1),a.preventDefault())}; e.selectFocusedSuggestion=function(a){if(this.hasSuggestions(this.suggestionsResponse)){var b=this.suggestionsResponse.suggestions[this.dropdown.focusedSuggestionIndex];b.userMentionSuggestionRenderer&&(this.selectSuggestion(b.userMentionSuggestionRenderer,this.dropdown.focusedSuggestionIndex),a.preventDefault())}}; e.selectSuggestion=function(a,b){if(a){var c=this.activeMention;if(c){var d=document.createElement("a");Cg(d,"\xA0@"+a.displayName+"\xA0");vc(d,"/channel/"+a.channelId);d.classList.add("yt-formatted-string","yt-simple-endpoint");d.setAttribute("spellcheck","false");c.replaceContentsWithNode(d);a=document.createTextNode(" ");d.parentNode.insertBefore(a,d.nextSibling);window.getSelection().collapse(a,1);this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_SUGGESTION_SELECTED",{suggestionSelected:{suggestionIndex:b}}); this.cancelActiveMention();this.fire("yt-mention-inserted")}}}; e.getPositionTarget=function(a){return a&&a.getBrowserRangeObject()}; e.onDomChange=function(){this.ironDropdown.refit();this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_CONTENT_UPDATED")}; e.onFocusedSuggestionIdChanged=function(a){var b=this.getContentChildren("")[0];b&&(a.detail.value?b.setAttribute("aria-activedescendant",a.detail.value):b.removeAttribute("aria-activedescendant"))}; e.onDropdownOpened=function(){this.logGELEvent("USER_MENTION_AUTO_COMPLETE_BOX_EVENT_TYPE_BOX_OPENED")}; e.logGELEvent=function(a,b){a={eventType:a,flowNonce:this.flowNonce,source:"USER_MENTION_AUTO_COMPLETE_SOURCE_BACKSTAGE_POST"};b&&(a=Object.assign(a,b));Bm("userMentionAutoCompleteBoxEvent",a)}; g.Object.defineProperties(DS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v5a){var a=document.createElement("template");a.innerHTML="\n\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u5a){var d=document.createElement("template");d.innerHTML=""; u5a=d}d=u5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v5a=a}a=v5a;return a}}}); var ES=DS;ES.prototype.onDomChange=ES.prototype.onDomChange;ES.prototype.onUserMentionSuggestionSelected=ES.prototype.onUserMentionSuggestionSelected;ES.prototype.onServiceRequestError=ES.prototype.onServiceRequestError;ES.prototype.onServiceRequestCompleted=ES.prototype.onServiceRequestCompleted;ES.prototype.onServiceRequestSent=ES.prototype.onServiceRequestSent;ES.prototype.onInput=ES.prototype.onInput; w([P(W.YtActionSenderBehavior),x("design:type",Object)],ES.prototype,"ytActionSenderBehavior",void 0);w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],ES.prototype,"ironA11yKeysBehavior",void 0);w([R(),x("design:type",Object)],ES.prototype,"suggestionsEndpoint",void 0);w([R(),x("design:type",Object)],ES.prototype,"suggestionsResponse",void 0);w([R(),x("design:type",Object)],ES.prototype,"activeMention",void 0);w([CE("#dropdown"),x("design:type",CS)],ES.prototype,"dropdown",void 0); w([CE("#iron-dropdown"),x("design:type",Object)],ES.prototype,"ironDropdown",void 0);w([S("input"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],ES.prototype,"onInput",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ES.prototype,"onServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ES.prototype,"onServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ES.prototype,"onServiceRequestError",null); w([S("yt-user-mention-suggestion-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ES.prototype,"onUserMentionSuggestionSelected",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ES.prototype,"onDomChange",null);ES=w([V({is:"yt-user-mention-autosuggest-input"})],ES);var y5a;var z5a;var A5a=function(){return O.apply(this,arguments)||this}; p(A5a,O); g.Object.defineProperties(A5a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z5a){var a=document.createElement("template");a.innerHTML="\n\n
\n
[[data.displayName]]
\n \n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y5a){var d=document.createElement("template");d.innerHTML=""; y5a=d}d=y5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z5a=a}a=z5a;return a}}}); var FS=A5a;w([P(X.YtRendererBehavior),x("design:type",Object)],FS.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],FS.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],FS.prototype,"focused",void 0);FS=w([V({is:"yt-user-mention-suggestion-renderer"})],FS);var GS=null; Polymer({is:"ytd-commentbox",_template:function(){if(void 0!==m5a)return m5a;var a=document.createElement("template");a.innerHTML="\n\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l5a){var d=document.createElement("template");d.innerHTML=""; l5a=d}d=l5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return m5a=a}, behaviors:[Polymer.IronA11yKeysBehavior,Z,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior],keyBindings:{left:"leftKeyPressed_",right:"rightKeyPressed_",end:"endKeyPressed_",backspace:"maybeBackspaceChip_","delete":"maybeDeleteChip_","ctrl+enter meta+enter":"submitIfNotBackstagePost_","ctrl+backspace alt+backspace":"maybeBackspaceChipWordMode_","ctrl+delete alt+delete":"maybeDeleteChipWordMode_"},properties:{data:{type:Object,observer:"dataChanged_"},receivedFocusPreviously_:{type:Boolean,value:!1}, isReply:{type:Boolean,value:!1},isBackstageComment:{type:Boolean,computed:"computeIsBackstageComment_(data.avatarSize)",reflectToAttribute:!0},isBackstagePost:{type:Boolean,value:!1,reflectToAttribute:!0},serviceEndpoint:{type:Object,readOnly:!0,computed:"computeServiceEndpoint_(data)"},submitButtonDisabled:Boolean,attachment:Object,isLoading:{type:Boolean,observer:"isLoadingChanged_"},errorMessage_:{type:Object,value:null},alertMessage_:{type:Object,value:null},imageUploadEndpoint_:{type:Object, computed:"computeImageUploadEndpoint_(data)"},addedAttachment:{type:String,value:"none",reflectToAttribute:!0},prefilledAttachment_:{type:String,value:"none",reflectToAttribute:!0},editableText_:{type:String,computed:"computeEditableText_(data.editableText)"},previousText_:String,inlineSchedulePanel_:{type:Object,computed:"computeInlineSchedulingPanel_(data.purpose, data.schedulingDateTimePicker)"},dropdownSchedulePanel_:{type:Object,computed:"computeDropdownSchedulingPanel_(data.purpose, data.schedulingDateTimePicker)"}, scheduleButton_:Object,zeroStepFooterText:Object,enableCreationBox:{type:Boolean,reflectToAttribute:!0},isInputFocus_:{type:Boolean,observer:"onIsInputFocusChanged_"},hasImage_:{type:Boolean,computed:"computeHasImage_(addedAttachment)"},hasPollRendererInEditDialog_:{type:Boolean,computed:"computeHasPollRendererInEditDialog_(data.purpose, data.backstageAttachment.pollRenderer)"},hasVideo_:{type:Boolean,computed:"computeHasVideo_(addedAttachment)"},hasPoll_:{type:Boolean,computed:"computeHasPoll_(addedAttachment)"}, prefilledContent_:{type:Object,readOnly:!0,computed:"computePrefilledContent_(data)"},editAttachment_:{type:Object,readOnly:!0,computed:"computeEditAttachment_(data)"},isCreationBox:{type:Boolean,reflectToAttribute:!0,value:!1},isPopupBox:{type:Boolean,reflectToAttribute:!0,value:!1},emojiManager:{type:Object,readOnly:!0,value:function(){return EO}}, isEmojiButtonDisplayed:{type:Boolean,computed:"computeIsEmojiButtonDisplayed_(data)",value:!1},isEmojiPickerDisplayed:{type:Boolean,value:!1,reflectToAttribute:!0},emojiInput:Object,verticalSuggestionsOffset:{type:Number,value:30},isPostCreationDialogV2:{type:Boolean,reflectToAttribute:!0,value:!1},accessRestriction:{type:String},charCount_:{type:Number,value:0},charLimit_:{type:Number,computed:"computeCharLimit_(data)"},aboveCharLimit_:{type:Boolean,reflectToAttribute:!0,value:!1},inputEventSupported_:{type:Boolean, value:!1},textRequiresScrolling:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["observePrefilledImage_(data.purpose, data.prefilledImageData, data.backstageAttachment)","observePrefilledVideo_(data.purpose, data.backstageAttachment)","observePrefilledPoll_(data.prefilledAttachment)"],listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-service-request-sent":"onYtServiceRequestSent_","yt-backstage-image-select-cancel":"onImageCancel_", "yt-backstage-image-select-alert":"onImageAlert_","yt-backstage-image-select-preview":"onImageSelected_","yt-img-crop-coordinates-update":"onImagePreviewCoordinatesUpdated_","yt-img-crop-reposition":"onImagePreviewReposition_","yt-poll-attachment-dismiss":"onPollAttachmentDismiss_","yt-navigate":"onYtNavigate_","yt-video-link-selected":"onVideoLinkSelected_","yt-video-link-cancel":"onVideoLinkCanceled_","yt-video-link-button-cancel":"onVideoLinkButtonCancel_","yt-commentbox-post-enable":"onSubmitButtonEnable_", "yt-commentbox-post-disable":"onSubmitButtonDisable_","yt-backstage-attachment-dismissed":"onPrefilledContentDismissed_","yt-emoji-select":"onEmojiSelect_","yt-insert-suggestion":"onSuggestionInsert_","yt-select-emoji-suggestion":"onEmojiSuggestionClick_","ytd-date-time-selection-update":"onDateTimeSelectionUpdate_","ytd-date-time-selection-cancelled":"onDateTimeSelectionCancelled_","yt-mention-inserted":"onInsertMention_"},stampDom:{"data.videoLinkButton":{id:"video-link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.imageButton":{id:"image-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.pollButton":{id:"poll-button",mapping:{buttonRenderer:"ytd-button-renderer"}},editAttachment_:{id:"attachment-preview",mapping:{backstageImageRenderer:"ytd-backstage-image-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isBackstageVideo:"[[isBackstagePost]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isBackstagePlaylist:"[[isBackstagePost]]"}},postMultiImageRenderer:"ytd-post-multi-image-renderer"}}, "data.accessRestrictionsSelector":{id:"access-restrictions-selector",mapping:{dropdownRenderer:"ytd-flat-dropdown-renderer"}},"data.backstageAttachment":{id:"poll-preview",mapping:{pollRenderer:"ytd-backstage-poll-renderer"}},"imageUploadEndpoint_.imageEditor":{id:"image-select",mapping:{backstageImageSelectRenderer:{component:"ytd-backstage-image-select-renderer",properties:{imageUploadEndpoint:"[[imageUploadEndpoint_]]",isBackstagePost:"[[isBackstagePost]]"}}}},"data.emojiButton":{id:"emoji-button", mapping:{buttonRenderer:"ytd-button-renderer"}},"data.emojiPicker":{id:"emoji-picker",mapping:{emojiPickerRenderer:{component:"yt-emoji-picker-renderer",properties:{emojiManager:"[[emojiManager]]"}}}},"data.postOptionsMenu":{id:"option-menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:arrow_drop_down",noInkOnDropdownButton:!0}}}},dropdownSchedulePanel_:{id:"scheduling-panel",mapping:{dateTimePickerRenderer:"ytd-date-time-picker-renderer"}},inlineSchedulePanel_:{id:"inline-scheduling-panel", mapping:{dateTimePickerRenderer:"ytd-date-time-picker-renderer"}}},ready:function(){this.listen(document,"tap","onTap_");this.emojiInput=this.$.emoji}, isLoadingChanged_:function(a){this.fire(a?"yt-commentbox-loading-start":"yt-commentbox-loading-end")}, dataChanged_:function(a){this.set("submitButtonDisabled",void 0);this.clear();if(a&&this.computeIsEmojiButtonDisplayed_(a)){var b=this.$$("#emoji-picker > yt-emoji-picker-renderer");b&&b.updateCategoriesAndPlaceholder_(a.emojiPicker.emojiPickerRenderer,!0)}}, observePrefilledImage_:function(a,b,c){this.isValidPrefilledImage_(a,b,c)&&(this.prefilledAttachment_="image",this.prefilledImageData_=b,this.submitButtonDisabled=!1)}, observePrefilledVideo_:function(a,b){this.isValidPrefilledVideo_(a,b)&&(this.prefilledAttachment_="video")}, observePrefilledPoll_:function(a){a&&a.pollData&&a.pollData.choices&&(this.addedAttachment="poll",this.$["poll-attachment"].setPrefilledChoices(a.pollData.choices))}, attached:function(){this.$["input-container"].getElementsByClassName("underline")[0].style.height=0;Polymer.dom.flush();this.focus()}, detached:function(){this.unlisten(document,"tap","onTap_")}, created:function(){this.scheduledPublishTimeSec_=this.prefilledImageData_=this.imagePreviewCoordinates_=this.selectedVideoId_=void 0;document.addEventListener("selectionchange",this.onSelectionChange_);this.textRequiresScrolling=!1}, onEmojiButtonTap_:function(){this.isEmojiPickerDisplayed=!this.isEmojiPickerDisplayed;this.$$("#emoji-picker > yt-emoji-picker-renderer").selected=!this.$$("#emoji-picker > yt-emoji-picker-renderer").selected}, onEmojiSelect_:function(a){a=a.detail;a=a.isCustomEmoji?a.shortcuts[0]:a.emojiId;var b=this.getInputRange_().cloneRange();this.insertTextWithEmojis_(b,a);this.maybeUpdateTextDirection_()}, getInputRange_:function(){var a=NG();if(a){a=a.getBrowserRangeObject();for(var b=a.commonAncestorContainer;b;){if(b===this.getEditableTextArea_())return a;b=b.parentNode}}a=this.getEditableTextArea_();a=lH(a,a.childNodes.length);a.select();return a.getBrowserRangeObject()}, insertTextWithEmojis_:function(a,b,c){(b=this.emojiManager.createDocumentFragment(b,!0,!1,void 0===c?!0:c))&&0!==b.childNodes.length&&(a.collapsed||a.deleteContents(),c=b.lastChild,a.insertNode(b),ZG(c).select(),this.getInputRange_().collapse(!1),this.getEditableTextArea_().normalize(),this.submitButtonDisabled=!1)}, onSelectionChange_:function(){var a=NG();if(a){var b=a.getStartNode(),c=a.getEndNode();if(rS(b)&&rS(c)){var d=a.getStartOffset(),f,h;if(h=He&&b.nodeType===Node.ELEMENT_NODE)h=f=dg(document,"yt-formatted-string","paper-input-input",b);if(h)lH(f,0).select();else{f=sS(b)?b:Kg(b,sS);h=sS(c)?c:Kg(c,sS);if(f||h)if(a.isCollapsed()){if(b.nodeType===Node.TEXT_NODE){a=!0;d===b.length&&(a=!1);if("end"===GS||"right"===GS)a=!1;b=b.parentNode;a=[].concat(ha(b.parentNode.childNodes)).indexOf(b)+(a?0:1);lH(b.parentNode, a).select()}}else f?f.previousSibling&&0a.clientHeight)}, onInput_:function(){this.inputEventSupported_=!0;this.handleInputEvent_()}, onKeyUp_:function(){this.inputEventSupported_||this.handleInputEvent_()}, updateCharCount_:function(){this.charCount_=this.getTextLength();this.aboveCharLimit_=!!this.charLimit_&&this.charCount_>this.charLimit_}, onPaste_:function(a){this.isEmojiButtonDisplayed&&(a.preventDefault(),a.stopImmediatePropagation(),a=a.clipboardData.getData("text/plain"),this.insertText_(a,!1,!1))}, insertText_:function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;this.maybeUpdateTextDirection_();if(this.isEmojiButtonDisplayed&&a){var d=this.getInputRange_().cloneRange();this.emojiManager&&d&&(b&&this.emojiInput.offsetStartOfRangeBy(d,a.length),this.insertTextWithEmojis_(d,a,c),e5a(this.getEditableTextArea_().lastChild)||(d=this.getInputRange_().cloneRange()),d&&(this.emojiInput.updateSuggestions(d,a),this.updateSuggestionOffset_(d)))}}, setSubmitButton_:function(){if(this.data){var a=this.data&&"BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===this.data.purpose,b=this.data&&this.data.editableText&&"BACKSTAGE_POST_DIALOG_PURPOSE_CREATE"!==this.data.purpose;if(a||b){var c=this.getTextAreaValue().trim();b=c===this.previousText_;c=!c||this.aboveCharLimit_;a&&this.data&&this.data.backstageAttachment&&(this.data.backstageAttachment.backstageImageRenderer||this.data.backstageAttachment.postMultiImageRenderer)&&(c=this.aboveCharLimit_);this.submitButtonDisabled= b||c||!this.getTextLength();a&&N("enable_post_scheduling")&&(this.submitButtonDisabled=b&&!this.scheduledPublishTimeSec_||c)}else this.submitButtonDisabled=!this.isValidInput_()}}, onSubmitButtonEnable_:function(){this.setSubmitButton_()}, onSubmitButtonDisable_:function(){this.submitButtonDisabled=!0}, getSimpleString:nL,computeCreationBoxClass_:function(a){return a?"focused":"not-focused"}, computeFooterMessageClass_:function(a,b){return b?"footer-error-message":"footer-alert-message"}, computeFooterMessage_:function(a,b){return b?b:a}, computeFooterMessageHidden_:function(a,b){return!b&&!a}, computePlaceholderText_:function(a,b,c){if("video"!==c&&"image"!==c||!a.prefilledPlaceholderText){if("poll"===b)return this.getSimpleString(a.pollPostPlaceholderText);if("image"===b)return this.getSimpleString(a.imagePostPlaceholderText)}else return this.getSimpleString(a.prefilledPlaceholderText);return void 0===a?"":this.getSimpleString(a.placeholderText)}, computeHideAttachmentButtons_:function(a,b,c){return void 0===a?!1:"none"!==b||"none"!==c||!a.videoLinkButton&&!a.pollButton&&!a.imageButton}, computeHideDismissableAttachment_:function(a){return"image"!==a&&"video"!==a}, computeHasVideo_:function(a){return"video"===a}, computeHasImage_:function(a){return"image"===a}, computeHasPoll_:function(a){return"poll"===a}, computeHasPollRendererInEditDialog_:function(a,b){return"BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===a&&!!b}, computePrefilledContent_:function(a){if(this.isValidPrefilledAttachment_(a.purpose,a.prefilledImageData,a.backstageAttachment))return a.backstageAttachment}, computeEditAttachment_:function(a){if(void 0===this.computePrefilledContent_(a))return a.backstageAttachment}, computeAuthorThumbnailDimension_:function(a,b){return a&&!b?24:40}, computeImageUploadEndpoint_:function(a){return this.get("imageButton.buttonRenderer.navigationEndpoint.backstageImageUploadEndpoint",a)}, computeEditableText_:function(a){return this.getSimpleString(a)}, computeIsBackstageComment_:function(a){return!(!a||"COMMENT_DIALOG_AVATAR_SIZE_TYPE_BACKSTAGE_COMMENT"!==a)}, computeServiceEndpoint_:function(a){return this.get("submitButton.buttonRenderer.serviceEndpoint",a)||this.get("replyButton.buttonRenderer.serviceEndpoint",a)||this.get("postButton.buttonRenderer.serviceEndpoint",a)}, computeSubmitButton_:function(a,b){a=this.get("submitButton.buttonRenderer",a)||this.get("replyButton.buttonRenderer",a)||this.get("postButton.buttonRenderer",a);b&&(a=b);a&&(a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0,a.isDisabled=this.submitButtonDisabled);return a}, computeIsEmojiButtonDisplayed_:function(a){return a.emojiButton&&a.emojiPicker&&a.emojiPicker.emojiPickerRenderer&&a.emojiPicker.emojiPickerRenderer.categories?a.emojiPicker.emojiPickerRenderer.categories.find(function(b){return b.emojiPickerCategoryRenderer?b.emojiPickerCategoryRenderer.emojiIds&&0=a)this.scheduledPublishTimeSec_=void 0;else if("BACKSTAGE_POST_DIALOG_PURPOSE_EDIT"===this.data.purpose){var b=parseInt(this.get("schedulingDateTimePicker.dateTimePickerRenderer.defaultTimeSec",this.data),10);this.scheduledPublishTimeSec_=isNaN(b)||b!==a?a:void 0}else this.scheduledPublishTimeSec_=a;this.setSubmitButton_()}}});var B5a;var C5a;var HS=function(){var a=O.apply(this,arguments)||this;a.hasCreatorReply=!1;a.buttonTooltipPosition="bottom";a.replyDialog=null;return a}; p(HS,O);e=HS.prototype;e.configureRendererStamper=function(){return{"data.creatorHeart":{id:"creator-heart",mapping:{creatorHeartRenderer:{component:"ytd-creator-heart-renderer"}}},replyButtonBeginning:{id:"reply-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}},replyButtonEnd:{id:"reply-button-end",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{forceIconButton:!0}}}},"data.shareButton":{id:"share-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.dataChanged=function(){this.replyDialog&&Polymer.dom(this.replyDialogElement).removeChild(this.replyDialog);this.replyDialog=null}; e.computeShowVoteCountBeginning=function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"!==a.style&&!!b&&"0"!==this.ytRendererBehavior.getSimpleString(b)}; e.computeShowVoteCountEnd=function(a,b){return void 0===a||void 0===b?!0:"COMMENT_ACTION_BUTTON_STYLE_TYPE_DESKTOP_TOOLBAR"===a.style&&!!b&&"0"!==this.ytRendererBehavior.getSimpleString(b)}; e.hideReplyDialog=function(){this.replyDialogElement.hidden=!0}; e.reply=function(){this.replyButtonElement.firstElementChild?this.replyButtonElement.firstElementChild.firstElementChild.click():this.replyButtonEndElement.firstElementChild&&this.replyButtonEndElement.firstElementChild.firstElementChild.click()}; e.showReplyDialog=function(a){a&&(this.replyDialog||(this.replyDialog=document.createElement("ytd-comment-reply-dialog-renderer"),this.replyDialog.id="replybox"),this.replyDialog.isAttached||Polymer.dom(this.replyDialogElement).appendChild(this.replyDialog),this.replyDialog.data=a,this.replyDialogElement.hidden=!1,this.replyDialog.openDialog())}; e.onYtCommentboxDismiss=function(){this.hideReplyDialog()}; e.onYtNavigate=function(a){(a=this.get("createCommentReplyDialogEndpoint.dialog.commentReplyDialogRenderer",a.detail.endpoint))&&this.showReplyDialog(a)}; e.onYtServiceRequestSent=function(a,b){a.stopPropagation();if(b.actions)for(a=0;a
\n \n \n \n \n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B5a){var d=document.createElement("template");d.innerHTML=""; B5a=d}d=B5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);C5a=a}a=C5a;return a}}}); var IS=HS;IS.prototype.onYtServiceRequestSent=IS.prototype.onYtServiceRequestSent;IS.prototype.onYtNavigate=IS.prototype.onYtNavigate;IS.prototype.onYtCommentboxDismiss=IS.prototype.onYtCommentboxDismiss;w([P(X.YtRendererBehavior),x("design:type",Object)],IS.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],IS.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],IS.prototype,"data",void 0); w([R(),x("design:type",Object)],IS.prototype,"voteCount",void 0);w([R(),x("design:type",Object)],IS.prototype,"replyThumbnail",void 0);w([R(),x("design:type",Object)],IS.prototype,"hasCreatorReply",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],IS.prototype,"enableCreationBox",void 0);w([R({computed:"computeActionButtonStyle(data)",reflectToAttribute:!0}),x("design:type",String)],IS.prototype,"actionButtonsStyle",void 0); w([R({computed:"computeReplyButtonBeginning(data)"}),x("design:type",Object)],IS.prototype,"replyButtonBeginning",void 0);w([R({computed:"computeReplyButtonEnd(data)"}),x("design:type",Object)],IS.prototype,"replyButtonEnd",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],IS.prototype,"useCommentIcon",void 0);w([R({observer:"onButtonTooltipPositionChanged"}),x("design:type",Object)],IS.prototype,"buttonTooltipPosition",void 0); w([CE("ytd-button-renderer"),x("design:type",Object)],IS.prototype,"ytdReplyButtonRenderer",void 0);w([CE("#like-button"),x("design:type",SP)],IS.prototype,"ytdLikeToggleButtonRenderer",void 0);w([CE("#dislike-button"),x("design:type",SP)],IS.prototype,"ytdDislikeToggleButtonRenderer",void 0);w([CE("#reply-dialog"),x("design:type",HTMLElement)],IS.prototype,"replyDialogElement",void 0);w([CE("#reply-button"),x("design:type",HTMLElement)],IS.prototype,"replyButtonElement",void 0); w([CE("#reply-button-end"),x("design:type",HTMLElement)],IS.prototype,"replyButtonEndElement",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],IS.prototype,"onYtCommentboxDismiss",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],IS.prototype,"onYtNavigate",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],IS.prototype,"onYtServiceRequestSent",null);IS=w([V({is:"ytd-comment-action-buttons-renderer"})],IS);var D5a;var E5a;var JS=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;return a}; p(JS,O);e=JS.prototype;e.dataChanged=function(){this.isOpen=!1}; e.onTap=function(){this.data&&(this.data.navigationEndpoint?this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}):this.openDialog())}; e.focus=function(){this.commentbox.focus()}; e.onYtCommentboxDismiss=function(){this.isOpen=!1}; e.openDialog=function(){this.isOpen=!0;this.commentbox.focus()}; g.Object.defineProperties(JS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===E5a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D5a){var d=document.createElement("template");d.innerHTML=""; D5a=d}d=D5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E5a=a}a=E5a;return a}}}); var KS=JS;KS.prototype.onYtCommentboxDismiss=KS.prototype.onYtCommentboxDismiss;KS.prototype.dataChanged=KS.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],KS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],KS.prototype,"data",void 0);w([R(),x("design:type",Object)],KS.prototype,"isOpen",void 0);w([CE("#commentbox"),x("design:type",Object)],KS.prototype,"commentbox",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],KS.prototype,"dataChanged",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],KS.prototype,"onYtCommentboxDismiss",null);KS=w([V({is:"ytd-comment-reply-dialog-renderer"})],KS);var F5a;var G5a;var LS=function(){return O.apply(this,arguments)||this}; p(LS,O);LS.prototype.onYtButtonTap=function(){if(this.data.isEnabled){var a=this.data.isHearted;this.toggle();this.ytRendererBehavior.markDirty();(a=this.getEndpoint(a))&&this.actionSenderBehavior.sendServiceRequestAction([a])}}; LS.prototype.toggle=function(a){this.set("data.isHearted",void 0!==a?a:!this.data.isHearted)}; LS.prototype.getEndpoint=function(a){var b,c,d=null===(b=this.data)||void 0===b?void 0:b.heartEndpoint,f=null===(c=this.data)||void 0===c?void 0:c.unheartEndpoint;if(d&&f)return a?f:d}; LS.prototype.computeButtonAccessibility=function(a,b){var c,d,f,h,l=null===(d=null===(c=null===a||void 0===a?void 0:a.heartedAccessibility)||void 0===c?void 0:c.accessibilityData)||void 0===d?void 0:d.label;a=null===(h=null===(f=null===a||void 0===a?void 0:a.unheartedAccessibility)||void 0===f?void 0:f.accessibilityData)||void 0===h?void 0:h.label;return b?l:a}; g.Object.defineProperties(LS.prototype,{heartTooltip:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.data.isHearted?this.data.heartedTooltip:this.data.unheartedTooltip}}}); g.Object.defineProperties(LS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G5a){var a=document.createElement("template");a.innerHTML="\n \n \n\n[[heartTooltip]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F5a){var d=document.createElement("template");d.innerHTML=""; F5a=d}d=F5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G5a=a}a=G5a;return a}}}); var MS=LS;MS.prototype.onYtButtonTap=MS.prototype.onYtButtonTap;w([P(X.YtRendererBehavior),x("design:type",Object)],MS.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],MS.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],MS.prototype,"data",void 0);w([BE("data.isHearted"),x("design:type",Object),x("design:paramtypes",[])],MS.prototype,"heartTooltip",null); w([R({computed:"computeButtonAccessibility(data,data.isHearted)"}),x("design:type",String)],MS.prototype,"buttonAccessibility",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],MS.prototype,"onYtButtonTap",null);MS=w([V({is:"ytd-creator-heart-renderer"})],MS);var H5a;var I5a;var NS=function(){return O.apply(this,arguments)||this}; p(NS,O);NS.prototype.focus=function(){this.$.commentbox.focus()}; g.Object.defineProperties(NS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I5a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H5a){var d=document.createElement("template");d.innerHTML="";H5a=d}d=H5a;c.call(b,d.content.cloneNode(!0), a.content.firstChild);I5a=a}a=I5a;return a}}}); var OS=NS;w([P(X.YtRendererBehavior),x("design:type",Object)],OS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],OS.prototype,"data",void 0);w([R(),x("design:type",Object)],OS.prototype,"zeroStepFooterText",void 0);OS=w([V({is:"ytd-comment-dialog-renderer"})],OS);var J5a;var K5a;var PS=function(){return O.apply(this,arguments)||this}; p(PS,O); PS.prototype.configureRendererStamper=function(){return{"data.approveButton":{id:"approve-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.removeButton":{id:"remove-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.reportButton":{id:"report-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}},"data.banButton":{id:"ban-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}}; g.Object.defineProperties(PS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===K5a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J5a){var d=document.createElement("template");d.innerHTML=""; J5a=d}d=J5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K5a=a}a=K5a;return a}}}); var QS=PS;w([P(X.YtRendererBehavior),x("design:type",Object)],QS.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],QS.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],QS.prototype,"data",void 0);QS=w([V({is:"ytd-comment-moderation-buttons-renderer"})],QS);var L5a;var M5a;var RS=function(){var a=O.apply(this,arguments)||this;a.isReply=!1;a.isCreatorReply=!1;a.editDialog=null;a.isLoading=!1;a.repliesVisible=!1;a.linkedBadgeEl=null;a.shouldShowReadMoreInitially=!1;a.THREAD_MARGIN_INCREMENT=40;a.MIN_RENDERER_WIDTH=428;a.spinnerEl=null;a.parentOffsetWidth=0;a.attachedResolver=Ui();a.isCollapsibleThreadingExperiment=N("default_collapse_reply_threads");return a}; p(RS,O);e=RS.prototype; e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.pinnedCommentBadge":{id:"pinned-comment-badge",mapping:{pinnedCommentBadgeRenderer:"ytd-pinned-comment-badge-renderer"}},"data.sponsorCommentBadge":{id:"sponsor-comment-badge",mapping:{sponsorCommentBadgeRenderer:"ytd-sponsor-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge", mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},editDialog:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer",commentDialogRenderer:"ytd-comment-dialog-renderer",commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"}},"data.moderationButtons":{id:"moderation-buttons",mapping:{commentModerationButtonsRenderer:{component:"ytd-comment-moderation-buttons-renderer"}}}}}; e.contentTextChanged=function(){this.expander.reset()}; e.attached=function(){this.attachedResolver.resolve();this.parentNode&&(this.parentOffsetWidth=this.parentNode.offsetWidth,this.data&&this.updateNestingLevel(this.data.threadNestingLevel))}; e.detached=function(){this.isCreatorReply=!1}; e.dataChanged=function(a){var b=this;if(a&&(N5a(function(){b.ytRendererBehavior.markDirty()}),this.isLoading=!1,this.editDialog=null,this.linkedBadgeEl&&(this.linkedCommentBadge.removeChild(this.linkedBadgeEl),this.linkedBadgeEl=null),a.hiddenByDefault&&(this.hidden=!0),this.repliesVisible=3>a.threadNestingLevel,a.actions))for(var c=0,d=a.actions.length;c\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L5a){var d=document.createElement("template");d.innerHTML=""; L5a=d}d=L5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);M5a=a}a=M5a;return a}}}); var SS=RS;SS.prototype.onYtExpanderMoreTapped=SS.prototype.onYtExpanderMoreTapped;SS.prototype.onWindowResize=SS.prototype.onWindowResize;SS.prototype.updateNestingLevel=SS.prototype.updateNestingLevel;SS.prototype.onYtServiceRequestCompleted=SS.prototype.onYtServiceRequestCompleted;SS.prototype.onYtServiceRequestSent=SS.prototype.onYtServiceRequestSent;SS.prototype.onYtCommentboxDismiss=SS.prototype.onYtCommentboxDismiss;SS.prototype.onYtNavigate=SS.prototype.onYtNavigate; SS.prototype.linkedCommentBadgeChanged=SS.prototype.linkedCommentBadgeChanged;SS.prototype.dataChanged=SS.prototype.dataChanged;SS.prototype.contentTextChanged=SS.prototype.contentTextChanged;w([P(Z),x("design:type",Object)],SS.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],SS.prototype,"componentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],SS.prototype,"ytRendererBehavior",void 0); w([P(XO),x("design:type",Object)],SS.prototype,"ytVisibilityBehavior",void 0);w([P(Polymer.IronResizableBehavior),x("design:type",Object)],SS.prototype,"ironResizableBehavior",void 0);w([R(),x("design:type",Object)],SS.prototype,"data",void 0);w([R({computed:"computeCommentStyle(data)",reflectToAttribute:!0}),x("design:type",String)],SS.prototype,"commentStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],SS.prototype,"isReply",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],SS.prototype,"isCreatorReply",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],SS.prototype,"voteCount",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],SS.prototype,"replyThumbnail",null);w([R(),x("design:type",Object)],SS.prototype,"editDialog",void 0);w([BE("data, data.containsCreatorReply"),x("design:type",Boolean),x("design:paramtypes",[])],SS.prototype,"hasCreatorReply",null); w([R({observer:"isLoadingChanged"}),x("design:type",Object)],SS.prototype,"isLoading",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],SS.prototype,"noActions",void 0);w([R(),x("design:type",Object)],SS.prototype,"repliesVisible",void 0);w([R(),x("design:type",Object)],SS.prototype,"linkedBadgeEl",void 0);w([R(),x("design:type",Object)],SS.prototype,"shouldShowReadMoreInitially",void 0); w([BE("repliesVisible"),x("design:type",Boolean),x("design:paramtypes",[])],SS.prototype,"hideViewThreadedRepliesButton",null);w([BE("repliesVisible"),x("design:type",Boolean),x("design:paramtypes",[])],SS.prototype,"hideHideThreadedRepliesButton",null);w([CE("ytd-expander"),x("design:type",Object)],SS.prototype,"expander",void 0);w([CE("#linked-comment-badge"),x("design:type",HTMLElement)],SS.prototype,"linkedCommentBadge",void 0); w([CE("#body"),x("design:type",HTMLElement)],SS.prototype,"body",void 0);w([CE("#edit-dialog"),x("design:type",HTMLElement)],SS.prototype,"editDialogContainer",void 0);w([U("data.contentText"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],SS.prototype,"contentTextChanged",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],SS.prototype,"dataChanged",null); w([U("data.linkedCommentBadge"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],SS.prototype,"linkedCommentBadgeChanged",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],SS.prototype,"onYtNavigate",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],SS.prototype,"onYtCommentboxDismiss",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],SS.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],SS.prototype,"onYtServiceRequestCompleted",null); w([U("data.threadNestingLevel"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],SS.prototype,"updateNestingLevel",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],SS.prototype,"onWindowResize",null);w([S("yt-expander-more-tapped"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],SS.prototype,"onYtExpanderMoreTapped",null);SS=w([V({is:"ytd-comment-renderer"})],SS); var N5a=function(a){Fk.addJob(function(){requestAnimationFrame(a)},8)};var O5a;var P5a;var TS=function(){return O.apply(this,arguments)||this}; p(TS,O);g.Object.defineProperties(TS.prototype,{icon:{configurable:!0,enumerable:!0,get:function(){var a,b,c=null===(b=null===(a=this.data)||void 0===a?void 0:a.icon)||void 0===b?void 0:b.iconType;return c?"yt-icons:"+c.toLowerCase():null}}}); g.Object.defineProperties(TS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P5a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O5a){var d=document.createElement("template");d.innerHTML=""; O5a=d}d=O5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P5a=a}a=P5a;return a}}}); var US=TS;w([P(X.YtRendererBehavior),x("design:type",Object)],US.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],US.prototype,"data",void 0);w([R(),BE("data.icon"),x("design:type",Object),x("design:paramtypes",[])],US.prototype,"icon",null);US=w([V({is:"ytd-pinned-comment-badge-renderer"})],US);var Q5a;var R5a;var VS=function(){var a=O.apply(this,arguments)||this;a.hostAttributes={role:"img"};return a}; p(VS,O);VS.prototype.configureRendererStamper=function(){return{"data.icon":{id:"icon",mapping:{iconType:{component:"yt-icon",properties:{icon:"[[data.icon.iconType]]",sharedTooltipText:"[[data.tooltip]]"}}}},data:{id:"custom-badge",mapping:{customBadge:{component:"yt-img-shadow",properties:{thumbnail:"[[data.customBadge]]",sharedTooltipText:"[[data.tooltip]]"}}}}}}; VS.prototype.attached=function(){this.hasAttribute("role")||this.setAttribute("role","img")}; VS.prototype.colorChanged=function(a){var b;if(a=null===(b=null===a||void 0===a?void 0:a.basicColorPaletteData)||void 0===b?void 0:b.foregroundBodyColor)this.rgbBadgeColor=PN(a);this.$.icon.style.color=this.rgbBadgeColor}; VS.prototype.tooltipChanged=function(a){null!=a?this.setAttribute("aria-label",a):this.removeAttribute("aria-label")}; g.Object.defineProperties(VS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R5a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q5a){var d=document.createElement("template");d.innerHTML=""; Q5a=d}d=Q5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R5a=a}a=R5a;return a}}}); var WS=VS;WS.prototype.tooltipChanged=WS.prototype.tooltipChanged;WS.prototype.colorChanged=WS.prototype.colorChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],WS.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],WS.prototype,"ytRendererstamperBehavior",void 0);w([P(U0a),x("design:type",Object)],WS.prototype,"ytSharedTooltipBehavior",void 0);w([R(),x("design:type",Object)],WS.prototype,"data",void 0); w([R({value:"#4285F4"}),x("design:type",String)],WS.prototype,"rgbBadgeColor",void 0);w([U("data.color"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],WS.prototype,"colorChanged",null);w([U("data.tooltip"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],WS.prototype,"tooltipChanged",null);WS=w([V({is:"ytd-sponsor-comment-badge-renderer"})],WS);var S5a;var T5a;var XS=function(){return O.apply(this,arguments)||this}; p(XS,O);XS.prototype.iconColorChanged=function(){var a,b,c,d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.iconColor)||void 0===b?void 0:b.basicColorPaletteData)||void 0===c?void 0:c.foregroundBodyColor;d&&(this.rgbIconColor=PN(d));this.$.icon.style.color=this.rgbIconColor}; g.Object.defineProperties(XS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===T5a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S5a){var d=document.createElement("template");d.innerHTML=""; S5a=d}d=S5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);T5a=a}a=T5a;return a}}}); var YS=XS;YS.prototype.iconColorChanged=YS.prototype.iconColorChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],YS.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],YS.prototype,"data",void 0);w([R({value:"#4285F4"}),x("design:type",String)],YS.prototype,"rgbIconColor",void 0);w([U("data.iconColor"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],YS.prototype,"iconColorChanged",null); YS=w([V({is:"ytd-sponsors-only-badge-renderer"})],YS);var U5a;var V5a;Polymer({is:"ytd-comment-replies-renderer",_template:function(){if(void 0!==V5a)return V5a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U5a){var d=document.createElement("template");d.innerHTML=""; U5a=d}d=U5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return V5a=a}, behaviors:[NQ,X.YtRendererBehavior,Z],properties:{data:{type:Object,observer:"dataChanged_"},hasContinuation_:{type:Boolean,computed:"computeHasContinuation_(data.continuations)"},isLoading_:{type:Boolean,observer:"isLoadingChanged_"},isShowRepliesVisible:{type:Boolean,value:!0,observer:"isShowMoreChanged_"},useNewFormatting:{type:Boolean,value:!1},allRepliesVisible:{type:Boolean,value:!0},domRepeatInitialCount:{type:Number,value:10}},attached:function(){this.isShowRepliesVisible=!0}, created:function(){this.spinnerEl_=null;this.replyPageSize_=50;this.domRepeatInitialCount=10}, listeners:{"yt-retrieve-location":"onRetrieveLocation_","yt-expander-more-tapped":"triggerFirstContinuation_","yt-rendererstamper-finished":"onRenderStamperFinished_"},stampDom:{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",params:{showButton:!0,showIcon:!0}}}},"data.teaserContents":{id:"teaser-replies",mapping:{commentRenderer:{component:"ytd-comment-renderer",params:{isReply:!0}}}}},dataChanged_:function(){var a=this.$["expander-contents"]; a&&(a.hidden=!0);this.isLoading_=!1}, onLoadedRepliesDomChange_:function(){this.domRepeatInitialCount=this.root.querySelectorAll("ytd-comment-renderer").length;this.fakeContinuation_&&(this.allRepliesVisible=void 0===this.root.querySelector("ytd-comment-renderer[hidden]"))}, nextContinuation:{continuationType:"commentRepliesContinuation",usePost:!0},computeHasContinuation_:function(a){return!!a}, get fakeContinuation_(){return this.get("data.fakeContinuation.nextContinuationData")},onRetrieveLocation_:function(a,b){b.locationRetrieved("/comment_service_ajax?action_get_comment_replies=1&pbj=1",void 0);a.stopPropagation()}, triggerFirstContinuation_:function(){if(!this.data.contents){var a=this.$$("yt-next-continuation");a&&a.trigger()}}, isLoadingChanged_:function(a){a&&!this.spinnerEl_&&(this.spinnerEl_=document.createElement("paper-spinner-lite"),Polymer.dom(this.$$("#expander-contents")).appendChild(this.spinnerEl_));this.spinnerEl_&&(this.spinnerEl_.active=a);a?this.$["loaded-replies"].classList.add("reloading"):this.$["loaded-replies"].classList.remove("reloading")}, handleIsShowMoreTap_:function(){this.isShowRepliesVisible=!1;this.triggerFirstContinuation_();var a=this.data.viewReplies.buttonRenderer;a&&this.logExplicitClick(a)}, handleIsShowLessTap_:function(){this.isShowRepliesVisible=!0;var a=this.data.hideReplies.buttonRenderer;a&&this.logExplicitClick(a)}, isShowMoreChanged_:function(a){this.$["expander-contents"].hidden=a}, handleContinuationTap_:function(){if(this.fakeContinuation_){this.logExplicitClick(this.fakeContinuation_);var a=[].concat(ha(this.root.querySelectorAll("ytd-comment-renderer:not([hidden])")));a=a[a.length-1];for(var b=a.nextElementSibling;b&&!(b.tagName==a.tagName&&b.data.threadNestingLevel<=a.data.threadNestingLevel);)b=b.nextElementSibling;for(var c=0;b&&c=b.data.threadNestingLevel&&(b.hidden=!1,c+=1),b=b.nextElementSibling;this.allRepliesVisible=!b}}});var W5a;var X5a;Polymer({is:"yt-next-continuation",_template:function(){if(void 0!==X5a)return X5a;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W5a){var d=document.createElement("template");d.innerHTML=""; W5a=d}d=W5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return X5a=a}, behaviors:[XO,X.YtRendererBehavior],properties:{data:{type:Object,observer:"observeData_"},showButton:{type:Boolean,value:!1,observer:"showButtonChanged_"},showIcon:{type:Boolean,value:!1},label:{type:Object,computed:"computeLabel_(data, showButton)"},showMoreText_:{type:Object,value:kL(YK("SHOW_MORE",void 0,"Show More"))},spinnerActive_:{type:Boolean,value:!1},hasBeenTriggered_:{type:Boolean,value:!1}},observeVisibleOption:null,observeHiddenOption:null,observePrescanOption:"observe_once",created:function(){this.triggered_= !1}, attached:function(){this.maybeTriggerAutoload()}, detached:function(){this.hasBeenTriggered_=!1}, onPrescanVisible:function(){this.onShow()}, onShow:function(){this.showButton||this.trigger()}, trigger:function(){this.data&&this.data.continuation&&(this.spinnerActive_=!0,this.showButton=!1,this.triggered_||(this.fire("yt-load-next-continuation",this.getContinuationUrl.bind(this)),this.hasBeenTriggered_=this.triggered_=!0))}, triggerIfNotPreviouslyTriggered:function(){this.hasBeenTriggered_||this.trigger()}, maybeTriggerAutoload:function(){this.data&&this.isAttached&&this.data.autoloadEnabled&&this.data.autoloadImmediately&&this.trigger()}, computeLabel_:function(a,b){return void 0===a?null:a.label||!b?a.label:this.showMoreText_}, observeData_:function(){this.spinnerActive_=this.triggered_=!1;this.invalidate(!1);this.maybeTriggerAutoload()}, getContinuationUrl:function(a){var b={ctoken:this.data.continuation,continuation:this.data.continuation};this.data.clickTrackingParams&&(b.itct=this.data.clickTrackingParams);return Id(a,b)}, showButtonChanged_:function(){this.invalidate(!1)}});var Y5a;var Z5a;TO("itemSectionRenderer","commentThreadRenderer","ytd-comment-thread-renderer");var ZS=function(){return O.apply(this,arguments)||this}; p(ZS,O);ZS.prototype.configureRendererStamper=function(){return{"data.replies":{id:"replies",mapping:{commentRepliesRenderer:{component:"ytd-comment-replies-renderer",noInjection:!0}}}}}; g.Object.defineProperties(ZS,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Z5a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y5a){var d=document.createElement("template");d.innerHTML=""; Y5a=d}d=Y5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z5a=a}a=Z5a;return a}}}); var $S=ZS;w([P(X.YtRendererBehavior),x("design:type",Object)],$S.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],$S.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],$S.prototype,"data",void 0);$S=w([V({is:"ytd-comment-thread-renderer"})],$S);var $5a;var a6a;var b6a={"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isBackstageVideo:!0}},backstageImageRenderer:{component:"ytd-backstage-image-renderer", properties:{surface:"[[data.surface]]"}},postMultiImageRenderer:{component:"ytd-post-multi-image-renderer",properties:{surface:"[[data.surface]]"}},playlistRenderer:{component:"ytd-playlist-renderer",params:{isBackstagePlaylist:!0}}}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}}},aT=function(){var a=O.apply(this,arguments)||this;a.hasInlineCommentSection=!1;a.editDialog_=null;a.isLoading_=!1;a.spinnerEl=null;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"}; return a}; p(aT,O);e=aT.prototype;e.configureRendererStamper=function(){return b6a}; e.getPublishTimeStampString=function(a,b){b=new Date(1E3*(Number(b)-60*(new Date().getTimezoneOffset()-new Date(1E3*Number(b)).getTimezoneOffset())));b=new wH(10).format(b);if(a&&a.runs&&a.runs.length)for(var c=0;c\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$5a){var d=document.createElement("template");d.innerHTML=""; $5a=d}d=$5a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a6a=a}a=a6a;return a}}}); var bT=aT;bT.prototype.computeVoteCount_=bT.prototype.computeVoteCount_;bT.prototype.onYtServiceRequestCompleted=bT.prototype.onYtServiceRequestCompleted;bT.prototype.onYtServiceRequestSent=bT.prototype.onYtServiceRequestSent;bT.prototype.onYtCommentPollRevert=bT.prototype.onYtCommentPollRevert;bT.prototype.onYtCommentboxDismiss=bT.prototype.onYtCommentboxDismiss;bT.prototype.onYtNavigate=bT.prototype.onYtNavigate;bT.prototype.dataChanged_=bT.prototype.dataChanged_; bT.prototype.contentTextChanged_=bT.prototype.contentTextChanged_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],bT.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],bT.prototype,"rendererBehavior",void 0);w([P(Z),x("design:type",Object)],bT.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],bT.prototype,"data",void 0);w([R(),x("design:type",Boolean)],bT.prototype,"hasInlineCommentSection",void 0); w([R({computed:"computeVoteCount_(data)"}),x("design:type",Object)],bT.prototype,"voteCount_",void 0);w([R(),x("design:type",Object)],bT.prototype,"editDialog_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Boolean)],bT.prototype,"isLoading_",void 0);w([U("data.contentText"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],bT.prototype,"contentTextChanged_",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],bT.prototype,"dataChanged_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],bT.prototype,"onYtNavigate",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],bT.prototype,"onYtCommentboxDismiss",null); w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],bT.prototype,"onYtCommentPollRevert",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],bT.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],bT.prototype,"onYtServiceRequestCompleted",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],bT.prototype,"computeVoteCount_",null);w([BE("data.backstageAttachment"),x("design:type",Boolean),x("design:paramtypes",[])],bT.prototype,"hasPoll_",null);bT=w([V({is:"ytd-backstage-post-renderer"})],bT);var c6a;var d6a;var cT=function(){return O.apply(this,arguments)||this}; p(cT,O);cT.prototype.configureRendererStamper=function(){return{"data.images":{id:"items",mapping:{backstageImageRenderer:{component:"ytd-backstage-image-renderer",properties:{surface:"[[surface]]"}}}}}}; g.Object.defineProperties(cT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d6a){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c6a){var d=document.createElement("template");d.innerHTML=""; c6a=d}d=c6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d6a=a}a=d6a;return a}}}); var dT=cT;w([P(X.YtRendererBehavior),x("design:type",Object)],dT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],dT.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ.YtdHorizontalListBehavior),x("design:type",Object)],dT.prototype,"ytdHorizontalListBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],dT.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],dT.prototype,"data",void 0); w([R({value:"$.items.children"}),x("design:type",String)],dT.prototype,"itemsPath",void 0);w([R({value:1}),x("design:type",Number)],dT.prototype,"initialCount",void 0);w([R(),x("design:type",String)],dT.prototype,"surface",void 0);dT=w([V({is:"ytd-post-multi-image-renderer"})],dT);var e6a;var f6a;TO("itemSectionRenderer","backstagePostThreadRenderer","ytd-backstage-post-thread-renderer");var eT=function(){var a=O.apply(this,arguments)||this;a.enableBordersOnCommunity=N("enable_borders_on_community");a.enableImprovedCommunityTab=N("enable_post_renderer_for_kevlar_community_tab");a.handleOpenPostCommentDialogActionAfterStamp_=!1;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"};return a}; p(eT,O);e=eT.prototype; e.configureRendererStamper=function(){return{"data.post":{id:"post",mapping:{backstagePostRenderer:{component:"ytd-backstage-post-renderer",properties:{hasInlineCommentSection:"[[hasInlineCommentSection]]"}},postRenderer:"ytd-post-renderer",sharedPostRenderer:"ytd-shared-post-renderer"}},"data.comments":{id:"comments",mapping:{backstageCommentsRenderer:"ytd-backstage-comments-renderer"}},"data.moderationPanel":{id:"moderation-panel",mapping:{commentModerationPanelRenderer:"ytd-comment-moderation-panel-renderer"}},"data.commentDialog":{id:"comment-dialog", mapping:{commentReplyDialogRenderer:"ytd-comment-reply-dialog-renderer"},events:!0}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.onStampFinished_=function(){this.handleOpenPostCommentDialogActionAfterStamp_&&this.handleSignalActionOpenPostCommentDialogAction_()}; e.handleSignalActionOpenPostCommentDialogAction_=function(){var a=this.$$("ytd-comment-reply-dialog-renderer");a?a.openDialog():this.handleOpenPostCommentDialogActionAfterStamp_=!0}; e.onYtCommentModerationPanelEmpty_=function(){this.set("data.moderationPanel",{})}; e.computeHasInlineCommentSection_=function(a){return!!a}; g.Object.defineProperties(eT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f6a){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e6a){var d=document.createElement("template");d.innerHTML=""; e6a=d}d=e6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f6a=a}a=f6a;return a}}}); var fT=eT;fT.prototype.onYtCommentModerationPanelEmpty_=fT.prototype.onYtCommentModerationPanelEmpty_;fT.prototype.onStampFinished_=fT.prototype.onStampFinished_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],fT.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],fT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],fT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],fT.prototype,"data",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],fT.prototype,"enableBordersOnCommunity",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],fT.prototype,"enableImprovedCommunityTab",void 0);w([R({computed:"computeHasInlineCommentSection_(data.comments)"}),x("design:type",Boolean)],fT.prototype,"hasInlineCommentSection",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],fT.prototype,"onStampFinished_",null); w([S("ytd-comment-moderation-panel-empty"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],fT.prototype,"onYtCommentModerationPanelEmpty_",null);fT=w([V({is:"ytd-backstage-post-thread-renderer"})],fT);var g6a;var h6a;var gT=function(){var a=O.apply(this,arguments)||this;a.editDialog_=null;a.isLoading_=!1;a.isRichGrid_=!1;a.isRichGridRepost_=!1;a.reduceSidePaddings_=N("reduce_side_paddings_in_shelf");a.spinnerEl_=null;return a}; p(gT,O);e=gT.prototype; e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.authorCommentBadge":{id:"author-comment-badge",mapping:{authorCommentBadgeRenderer:"ytd-author-comment-badge-renderer"}},"data.sponsorsOnlyBadge":{id:"sponsors-only-badge",mapping:{sponsorsOnlyBadgeRenderer:"ytd-sponsors-only-badge-renderer"}},"data.backstageAttachment":{id:"content-attachment",mapping:{videoRenderer:{component:"ytd-video-renderer",properties:{isPostCompactVideo:"[[usesCompactLockup_]]", isRichGridVideoPost:"[[isRichGrid_]]"}},backstageImageRenderer:{component:"ytd-backstage-image-renderer",properties:{surface:"[[data.surface]]"}},playlistRenderer:{component:"ytd-playlist-renderer",properties:{isPostCompactPlaylist:"[[usesCompactLockup_]]"}}}},"data.voteButton":{id:"vote-button",mapping:{buttonRenderer:"ytd-button-renderer"}},editDialog_:{id:"edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer", notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.contentTextChanged_=function(){this.$.expander.reset()}; e.dataChanged_=function(a){var b=this;this.isLoading_=!1;this.editDialog_=null;for(var c=0,d=a.actions&&a.actions.length;c\n
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g6a){var d=document.createElement("template");d.innerHTML=""; g6a=d}d=g6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h6a=a}a=h6a;return a}}}); var hT=gT;hT.prototype.onYtServiceRequestCompleted_=hT.prototype.onYtServiceRequestCompleted_;hT.prototype.onYtServiceRequestSent_=hT.prototype.onYtServiceRequestSent_;hT.prototype.onYtCommentPollRevert_=hT.prototype.onYtCommentPollRevert_;hT.prototype.onYtCommentboxDismiss_=hT.prototype.onYtCommentboxDismiss_;hT.prototype.onYtNavigate_=hT.prototype.onYtNavigate_;hT.prototype.contentTextChanged_=hT.prototype.contentTextChanged_; w([P(cQ),x("design:type",Object)],hT.prototype,"ytdDismissableItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],hT.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],hT.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],hT.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],hT.prototype,"data",void 0); w([R({computed:"computeVoteCount_(data)"}),x("design:type",Object)],hT.prototype,"voteCount_",void 0);w([R(),x("design:type",Object)],hT.prototype,"editDialog_",void 0);w([R({observer:"isLoadingChanged_"}),x("design:type",Object)],hT.prototype,"isLoading_",void 0);w([R({computed:"computeHasPoll_(data)"}),x("design:type",Boolean)],hT.prototype,"hasPoll_",void 0);w([R({computed:"computePollStatus_(data.pollStatus)"}),x("design:type",Object)],hT.prototype,"pollStatus_",void 0); w([R({computed:"computeSurfaceType_(data.surface)",reflectToAttribute:!0}),x("design:type",String)],hT.prototype,"surface_",void 0);w([R({computed:"computeUsesCompactLockup_(data.surface)",reflectToAttribute:!0}),x("design:type",Boolean)],hT.prototype,"usesCompactLockup_",void 0);w([R({computed:"computeShowWithoutToolbar_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],hT.prototype,"showWithoutToolbar_",void 0); w([R({computed:"computePostAttachment_(data)",reflectToAttribute:!0}),x("design:type",String)],hT.prototype,"attachment",void 0);w([R({reflectToAttribute:!0,value:N("enable_taller_posts_on_desktop")}),x("design:type",Boolean)],hT.prototype,"enableTallerHeight_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hT.prototype,"isRichGrid_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hT.prototype,"isRichGridRepost_",void 0); w([R({reflectToAttribute:!0,value:N("use_better_post_dismissals")}),x("design:type",Boolean)],hT.prototype,"useBetterPostDismissals_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],hT.prototype,"reduceSidePaddings_",void 0);w([U("data.contentText"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hT.prototype,"contentTextChanged_",null); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],hT.prototype,"onYtNavigate_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],hT.prototype,"onYtCommentboxDismiss_",null);w([S("yt-comment-poll-revert"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],hT.prototype,"onYtCommentPollRevert_",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],hT.prototype,"onYtServiceRequestSent_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],hT.prototype,"onYtServiceRequestCompleted_",null);hT=w([V({is:"ytd-post-renderer"})],hT);var i6a;var j6a;var iT=function(){var a=O.apply(this,arguments)||this;a.editDialog_=null;a.showExpandButton_=!1;a.isRichGrid_=!1;return a}; p(iT,O);e=iT.prototype;e.configureRendererStamper=function(){return{"data.actionMenu":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.originalPost":{id:"original-post",mapping:{backstagePostRenderer:"ytd-backstage-post-renderer",postRenderer:{component:"ytd-post-renderer",properties:{isRichGridRepost_:"[[isRichGrid_]]"}}}},editDialog_:{id:"repost-edit-dialog",mapping:{backstagePostDialogRenderer:"ytd-backstage-post-dialog-renderer"}}}}; e.dataChanged_=function(){this.editDialog_=null;this.showExpandButton_=this.computeShowExpandButton_(this.data)}; e.computeShowExpandButton_=function(a){if(this.usesCompactLockup_||a&&a.showFullContentText)return!1;a=this.$["repost-content-text"];return a.scrollHeight>a.clientHeight}; e.computeUsesCompactLockup_=function(a){return!!a.condensedContent}; e.computeShowFullContentText_=function(a){return!a}; e.onYtNavigate_=function(a){a=this.get("updateCommentDialogEndpoint",a.detail.endpoint);this.openEditDialog_(a)}; e.onYtCommentboxDismiss_=function(){this.editDialog_=null}; e.openEditDialog_=function(a){a&&a.dialog&&(this.editDialog_=a.dialog,a=this.$["repost-edit-dialog"].firstElementChild)&&(a.focus(),a.openDialog&&a.openDialog())}; e.onTap_=function(a){if(this.data){var b=null;this.usesCompactLockup_&&!NR(Polymer.dom(a).path||[],this,["YT-IMG-SHADOW"])?b=this.get("navigationEndpoint",this.data):a.target===this.$.more&&(b=this.get("navigationEndpoint",a.target.data));b&&this.fire("yt-navigate",{endpoint:b})}}; g.Object.defineProperties(iT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j6a){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i6a){var d=document.createElement("template");d.innerHTML=""; i6a=d}d=i6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j6a=a}a=j6a;return a}}}); var jT=iT;jT.prototype.onYtCommentboxDismiss_=jT.prototype.onYtCommentboxDismiss_;jT.prototype.onYtNavigate_=jT.prototype.onYtNavigate_;w([P(X.YtRendererBehavior),x("design:type",Object)],jT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],jT.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],jT.prototype,"data",void 0);w([R(),x("design:type",Object)],jT.prototype,"editDialog_",void 0); w([R({computed:"computeUsesCompactLockup_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],jT.prototype,"usesCompactLockup_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],jT.prototype,"showExpandButton_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],jT.prototype,"isRichGrid_",void 0);w([R({computed:"computeShowFullContentText_(data.showFullContentText)",reflectToAttribute:!0}),x("design:type",Boolean)],jT.prototype,"showFullContentText_",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],jT.prototype,"onYtNavigate_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],jT.prototype,"onYtCommentboxDismiss_",null);jT=w([V({is:"ytd-shared-post-renderer"})],jT);var k6a;var l6a;var kT=function(){var a=O.apply(this,arguments)||this;a.hasSpam_=!1;a.showButton_=!0;a.actionMap={"yt-approve-comment-action":"approveCommentAction_","yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-load-next-continuation":"onLoadNextContinuation_"};a.nextContinuation={contentsArray:"data.contents",continuationType:"commentModerationPanelContinuation",requestPath:"/comment_service_ajax?action_get_comment_replies=1&pbj=1", usePost:!0};return a}; p(kT,O);e=kT.prototype;e.configureRendererStamper=function(){return{"data.continuations":{id:"continuation",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}}},"data.contents":{id:"held-comments",mapping:{commentRenderer:{component:"ytd-comment-renderer"}}},"data.likelySpamContents":{id:"likely-spam-comments",mapping:{commentRenderer:{component:"ytd-comment-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.$["moderation-contents"].addEventListener("scroll",this.onPanelScroll_.bind(this))}; e.dataChanged_=function(){this.$.expander.collapsed=!0}; e.computeSettingsButton_=function(a){return(a=a&&a.expander&&a.expander.commentModerationPanelExpanderRenderer&&a.expander.commentModerationPanelExpanderRenderer.settingsButton)?a.buttonRenderer:void 0}; e.onPanelScroll_=function(){var a=this;this.debounce("onPanelScroll_",function(){a.toggleClass("scrolling",0==a.$["moderation-contents"].scrollTop,Polymer.dom(a.$.expander).children[1].offsetParent)},50)}; e.onNextContinuationDataUpdated_=function(a,b){a=b.continuationData.response;!a.continuationContents.commentModerationPanelContinuation.contents&&a.continuationContents.commentModerationPanelContinuation.likelySpamContents&&(this.data.spamHeaderText=a.continuationContents.commentModerationPanelContinuation.spamHeaderText,this.set("data.likelySpamContents",a.continuationContents.commentModerationPanelContinuation.likelySpamContents),this.nextContinuation={contentsArray:"data.likelySpamContents",continuationType:"commentModerationPanelContinuation", responseContentsKey:"likelySpamContents",usePost:!0},this.hasSpam_=!0)}; e.computeHasContinuation_=function(a){return!!a}; e.hideSpamDivider_=function(a){return!a||a&&0==this.data.contents.length}; e.computeSpamHeaderText_=function(a,b){return a?b:kL("")}; e.triggerContinuation_=function(){this.querySelector("yt-next-continuation").trigger();this.showButton_=!1}; e.approveCommentAction_=function(a){(a=this.get("approveCommentAction.commentId",a))&&this.remove_(a)}; e.banAuthorAction_=function(a){(a=this.get("banAuthorAction.commentId",a))&&this.remove_(a)}; e.removeCommentAction_=function(a){(a=this.get("removeCommentAction.commentId",a))&&this.remove_(a)}; e.hideReportedCommentAction_=function(a){(a=this.get("hideReportedCommentAction.commentId",a))&&this.remove_(a)}; e.remove_=function(a){var b=this.commentIdToHeldCommentsIndex_(a);a=this.commentIdToLikelySpamCommentsIndex_(a);0<=b?this.splice("data.contents",b,1):0<=a&&this.splice("data.likelySpamContents",a,1);this.data.contents&&0!=this.data.contents.length||this.data.likelySpamContents&&0!=this.data.likelySpamContents.length||this.fire("ytd-comment-moderation-panel-empty")}; e.commentIdToHeldCommentsIndex_=function(a){var b;if(null===(b=this.data)||void 0===b||!b.contents)return-1;for(var c=0;c\n
\n \n [[getSimpleString(data.expander.commentModerationPanelExpanderRenderer.text)]]\n \n
\n \n \n \n
\n
\n
\n \n [[getSimpleString(data.expander.commentModerationPanelExpanderRenderer.text)]]\n \n
\n \n \n \n
\n
\n
\n
\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k6a){var d=document.createElement("template");d.innerHTML=""; k6a=d}d=k6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l6a=a}a=l6a;return a}}}); var lT=kT;lT.prototype.onNextContinuationDataUpdated_=lT.prototype.onNextContinuationDataUpdated_;w([P(Z),x("design:type",Object)],lT.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],lT.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],lT.prototype,"ytRendererBehavior",void 0);w([P(NQ),x("design:type",Object)],lT.prototype,"ytNextContinuationBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],lT.prototype,"data",void 0);w([R({computed:"computeSettingsButton_(data)"}),x("design:type",Object)],lT.prototype,"settingsButton",void 0);w([R(),x("design:type",Object)],lT.prototype,"hasSpam_",void 0);w([R({computed:"computeHasContinuation_(data.continuations)"}),x("design:type",Boolean)],lT.prototype,"hasContinuation_",void 0);w([R(),x("design:type",Object)],lT.prototype,"showButton_",void 0); w([S("yt-next-continuation-data-updated"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],lT.prototype,"onNextContinuationDataUpdated_",null);lT=w([V({is:"ytd-comment-moderation-panel-renderer"})],lT);var m6a;var n6a;var mT=function(){return O.apply(this,arguments)||this}; p(mT,O);mT.prototype.configureRendererStamper=function(){return{"data.actionMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; g.Object.defineProperties(mT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===n6a){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===m6a){var d=document.createElement("template");d.innerHTML=""; m6a=d}d=m6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);n6a=a}a=n6a;return a}}}); var nT=mT;w([P(X.YtRendererBehavior),x("design:type",Object)],nT.prototype,"rendererBehavior",void 0);w([P(cQ),x("design:type",Object)],nT.prototype,"dismissableItemBehavior",void 0);w([P(Z),x("design:type",Object)],nT.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],nT.prototype,"data",void 0);nT=w([V({is:"ytd-comment-history-entry-renderer"})],nT);var o6a;var p6a;TO("multiPageMenuSectionItems","continuationItemRenderer","ytd-continuation-item-renderer");var oT=function(){var a=O.apply(this,arguments)||this;a.isOverridable=!1;a.spinnerActive=!1;a.showButton=!1;a.actionMap={"yt-continuation-override-action":"overrideContinuation"};return a}; p(oT,O);e=oT.prototype;e.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.ghostCards":{id:"ghost-cards",mapping:{ghostGridRenderer:"ytd-ghost-grid-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.observeData=function(){this.spinnerActive=!1;this.ytRendererBehavior.invalidate(!1)}; e.onShow=function(){this.showButton||(this.spinnerActive=!0,this.data&&"CONTINUATION_TRIGGER_ON_ITEM_SHOWN"===this.data.trigger&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint]))}; e.overrideContinuation=function(){this.isOverridable&&(this.spinnerActive=!0,this.ytActionSenderBehavior.sendServiceRequestAction([this.data.continuationEndpoint]))}; e.showButtonChanged=function(){this.showButton&&(this.spinnerActive=!1);this.ytRendererBehavior.invalidate(!1)}; g.Object.defineProperties(oT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===p6a){var a=document.createElement("template");a.innerHTML="
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o6a){var d=document.createElement("template");d.innerHTML=""; o6a=d}d=o6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p6a=a}a=p6a;return a}}}); var pT=oT;w([P(Z),x("design:type",Object)],pT.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],pT.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],pT.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],pT.prototype,"ytRendererBehavior",void 0);w([P(XO),x("design:type",Object)],pT.prototype,"ytVisibilityBehavior",void 0); w([R({observer:"observeData"}),x("design:type",Object)],pT.prototype,"data",void 0);w([R(),x("design:type",Object)],pT.prototype,"isOverridable",void 0);w([R(),x("design:type",Object)],pT.prototype,"spinnerActive",void 0);w([R({observer:"showButtonChanged"}),x("design:type",Object)],pT.prototype,"showButton",void 0);pT=w([V({is:"ytd-continuation-item-renderer"})],pT);function qT(a){return a.ui.richGridMiniMode} function q6a(a){return a.ui.richGridItemsPerRow} ;var r6a;var s6a;var rT=function(){return O.apply(this,arguments)||this}; p(rT,O);g.Object.defineProperties(rT.prototype,{cardItems:{configurable:!0,enumerable:!0,get:function(){var a,b=[];if((null===(a=this.data)||void 0===a?0:a.rows)&&this.itemsPerRow)for(var c=this.data.rows*this.itemsPerRow,d=0;d
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r6a){var d=document.createElement("template");d.innerHTML=""; r6a=d}d=r6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s6a=a}a=s6a;return a}}}); var sT=rT;w([P(CQ),x("design:type",Object)],sT.prototype,"ytdReduxBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],sT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],sT.prototype,"data",void 0);w([R({reflectToAttribute:!0,selector:q6a,value:3}),x("design:type",Number)],sT.prototype,"itemsPerRow",void 0);w([R({reflectToAttribute:!0,selector:qT}),x("design:type",Boolean)],sT.prototype,"miniMode",void 0); w([BE("data"),x("design:type",Array),x("design:paramtypes",[])],sT.prototype,"cardItems",null);sT=w([V({is:"ytd-ghost-grid-renderer"})],sT);var t6a;var u6a;var v6a;TO("multiPageMenuSectionItems","toggleThemeCompactLinkRenderer","ytd-toggle-theme-compact-link-renderer");var tT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-toggle-dark-theme-on":"handleSignalActionToggleDarkThemeOn","yt-signal-action-toggle-dark-theme-off":"handleSignalActionToggleDarkThemeOff","yt-signal-action-toggle-dark-theme-device":"handleSignalActionToggleDarkThemeDevice"};return a}; p(tT,O);e=tT.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.data&&(this.label=this.data.label?this.data.label:"USER_INTERFACE_THEME_DARK"===iJ()?this.data.toggledOnTitle:this.data.toggledOffTitle)}; e.onThemeSelected=function(a,b){var c=a||b?a:kJ(),d=(c&&"USER_INTERFACE_THEME_DARK"!==iJ()||!c&&"USER_INTERFACE_THEME_LIGHT"!==iJ())&&!tLa(Bd(window.location.href));fJ(0,165,a);fJ(0,174,b);this.prefs.save();d&&this.actionSenderBehavior.sendAction("yt-dark-mode-toggled-action",[c]);this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"])}; e.onTap=function(){this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; e.handleSignalActionToggleDarkThemeOn=function(){this.onThemeSelected(!0,!1)}; e.handleSignalActionToggleDarkThemeOff=function(){this.onThemeSelected(!1,!0)}; e.handleSignalActionToggleDarkThemeDevice=function(){this.onThemeSelected(!1,!1)}; g.Object.defineProperties(tT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v6a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
[[getSimpleString(label)]]
\n\n"; var b=a.content,c=b.insertBefore;if(void 0===u6a){var d=document.createElement("template");d.innerHTML="";u6a=d}d=u6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(HJa().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===t6a&&(d=document.createElement("template"),d.innerHTML="", t6a=d);d=t6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);v6a=a}a=v6a;return a}}}); var uT=tT;uT.prototype.onTap=uT.prototype.onTap;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],uT.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],uT.prototype,"ytRendererBehavior",void 0);w([P(Polymer.PaperItemBehavior),x("design:type",Object)],uT.prototype,"paperItemBehaviors",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],uT.prototype,"actionSenderBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],uT.prototype,"data",void 0);w([R({value:function(){return eJ.getInstance()}}), x("design:type",eJ)],uT.prototype,"prefs",void 0);w([R(),x("design:type",Object)],uT.prototype,"label",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uT.prototype,"onTap",null);uT=w([V({is:"ytd-toggle-theme-compact-link-renderer"})],uT);var w6a;var x6a;TO("itemSectionRenderer","notificationRenderer","ytd-notification-renderer");TO("multiPageMenuSectionItems","notificationRenderer","ytd-notification-renderer");var vT=function(){return O.apply(this,arguments)||this}; p(vT,O);e=vT.prototype;e.configureRendererStamper=function(){return{"data.contextualMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.highPriorityNotificationActionButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onKeyUp=function(a){if(13===a.keyCode)this.onTap()}; e.onTap=function(){this.actionSenderBehavior.sendServiceRequestAction([this.data.recordClickEndpoint]);var a=this.data.navigationEndpoint;a&&a.getCommentsFromInboxCommand&&this.actionSenderBehavior.sendServiceRequestAction([a])}; e.readChanged=function(a){this.toggleClass("unread",!a)}; e.dataChanged=function(a){a&&this.toggleClass("high-priority-notification",a.highPriorityNotification)}; e.computeThumbnailSize=function(a){return a?32:48}; e.getEndpointURL=function(a){return a&&!a.getCommentsFromInboxCommand?this.componentBehavior.computeHref_(a):null}; e.getEndpointData=function(a){return a&&!a.getCommentsFromInboxCommand?a:null}; g.Object.defineProperties(vT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x6a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n \n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w6a){var d=document.createElement("template");d.innerHTML=""; w6a=d}d=w6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x6a=a}a=x6a;return a}}}); var wT=vT;wT.prototype.computeThumbnailSize=wT.prototype.computeThumbnailSize;wT.prototype.readChanged=wT.prototype.readChanged;wT.prototype.onKeyUp=wT.prototype.onKeyUp;w([P(X.YtRendererBehavior),x("design:type",Object)],wT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],wT.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],wT.prototype,"componentBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],wT.prototype,"actionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],wT.prototype,"data",void 0);w([R({computed:"computeThumbnailSize(data.highPriorityNotification)"}),x("design:type",Number)],wT.prototype,"thumbnailSize",void 0);w([S("keyup"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],wT.prototype,"onKeyUp",null); w([U("data.read"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],wT.prototype,"readChanged",null);w([U("data.highPriorityNotification"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],wT.prototype,"computeThumbnailSize",null);wT=w([V({is:"ytd-notification-renderer"})],wT);var y6a;var z6a;var xT=function(){var a=O.apply(this,arguments)||this;a.responsive=N("kevlar_playlist_responsive");return a}; p(xT,O);xT.prototype.configureRendererStamper=function(){return{"data.collection":{id:"dropdown",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer"}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; xT.prototype.computeActionButtonClass=function(a){return!a.actionButtons||1>=a.actionButtons.length?"single-button":a.description?"vertical-buttons":"horizontal-buttons"}; g.Object.defineProperties(xT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z6a){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y6a){var d=document.createElement("template");d.innerHTML=""; y6a=d}d=y6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z6a=a}a=z6a;return a}}}); var yT=xT;w([P(X.YtRendererBehavior),x("design:type",Object)],yT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],yT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],yT.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],yT.prototype,"responsive",void 0);yT=w([V({is:"ytd-playlist-show-metadata-renderer"})],yT);var A6a;var B6a;TO("itemSectionRenderer","purchaseItemRenderer","ytd-purchase-item-renderer");var C6a=function(){return O.apply(this,arguments)||this}; p(C6a,O); g.Object.defineProperties(C6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B6a){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A6a){var d=document.createElement("template");d.innerHTML=""; A6a=d}d=A6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B6a=a}a=B6a;return a}}}); var zT=C6a;w([P(X.YtRendererBehavior),x("design:type",Object)],zT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],zT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],zT.prototype,"data",void 0);zT=w([V({is:"ytd-purchase-item-renderer"})],zT);var D6a;var E6a;var F6a={properties:{data:Object,layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layoutStyle)",reflectToAttribute:!0},role:{type:String,computed:"computeRole_(data.layoutStyle)",reflectToAttribute:!0}},created:function(){this.LAYOUT_STYLE_PREFIX_="SIMPLE_TEXT_LAYOUT_STYLE_"}, computeLayoutStyle_:function(a){if(a)return a.replace(this.LAYOUT_STYLE_PREFIX_,"").replace(/_/g,"-").toLowerCase()}, computeRole_:function(a){if("SIMPLE_TEXT_LAYOUT_STYLE_PAID_SUBSCRIPTION_TITLE"===a)return"heading"}};TO("itemSectionRenderer","simpleTextSectionRenderer","ytd-simple-text-section-renderer");var AT=function(){return O.apply(this,arguments)||this}; p(AT,O);AT.prototype.onYtNavigate=function(a){var b=this.openPopupBehavior.getNavigationEndpointPopupAction(a.detail.endpoint);b&&(a.stopPropagation(),this.openPopupBehavior.openPopup(b))}; g.Object.defineProperties(AT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===E6a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D6a){var d=document.createElement("template");d.innerHTML=""; D6a=d}d=D6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);E6a=a}a=E6a;return a}}}); var BT=AT;BT.prototype.onYtNavigate=BT.prototype.onYtNavigate;w([P(F6a),x("design:type",Object)],BT.prototype,"ytSimpleTextSectionBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],BT.prototype,"ytRendererBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],BT.prototype,"openPopupBehavior",void 0);w([R(),x("design:type",Object)],BT.prototype,"data",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],BT.prototype,"onYtNavigate",null);BT=w([V({is:"ytd-simple-text-section-renderer"})],BT);var G6a;var H6a;TO("itemSectionRenderer","unlimitedPageFeatureInfoRenderer","ytd-unlimited-page-feature-info-renderer");var I6a=function(){return O.apply(this,arguments)||this}; p(I6a,O); g.Object.defineProperties(I6a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===H6a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===G6a){var d=document.createElement("template");d.innerHTML=""; G6a=d}d=G6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);H6a=a}a=H6a;return a}}}); var CT=I6a;w([P(X.YtRendererBehavior),x("design:type",Object)],CT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],CT.prototype,"data",void 0);CT=w([V({is:"ytd-unlimited-page-feature-info-renderer"})],CT);var J6a;var K6a;TO("itemSectionRenderer","redeemCodeRenderer","ytd-redeem-code-renderer");var DT=function(){var a=O.apply(this,arguments)||this;a.MIN_CODE_LENGTH=12;a.MAX_CODE_LENGTH=24;a.actionMap={"yt-invoke-instrument-manager-action":"onInvokeInstrumentManagerAction_"};return a}; p(DT,O);e=DT.prototype;e.configureRendererStamper=function(){return{postRedemptionRenderer:{id:"success-page",mapping:{ypcPostRedemptionRenderer:"ytd-ypc-post-redemption-renderer"}}}}; e.created=function(){this.riskService_=new yWa;this.loadPaymentThenable_=tWa()}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.$.code.addEventListener("keypress",this.onCodeInputKeypress_.bind(this))}; e.dataChanged_=function(a){var b=this;this.redeemButtonDisabled=!0;this.observer_=new MutationObserver(function(c){c.forEach(function(d){"attributes"==d.type&&"dark"==d.attributeName&&b.updateBackground_(a)})}); this.observer_.observe(document.documentElement,{attributes:!0});this.updateBackground_(a)}; e.updateBackground_=function(a){document.documentElement.hasAttribute("dark")?this.style["background-image"]="none":(a=this.computeImageUrl_(a.thumbnail),this.style["background-image"]="url("+a+")")}; e.computeRedeemButton_=function(a){if(a=this.get("redeemButton.buttonRenderer",a))a=Polymer.Base.mixin({},a),a.serviceEndpoint=void 0;return a}; e.onRedeemButtonTap_=function(a){a.stopPropagation();lWa();this.redeemCode_()}; e.redeemCode_=function(){var a=this;this.isLoading=!0;var b=this.riskService_.init();Xi(Ti([b,this.loadPaymentThenable_]).then(function(){var c=a.data.redeemButton.buttonRenderer.serviceEndpoint,d=AWa(),f=payments.business.integration.ClientTokenFactory.createClientToken(c.ypcRedeemCodeEndpoint.countryCode,d);d={c:a.$.code.value.trim(),rd:window.btoa(d),ctk:f};a.ytActionSenderBehavior.sendServiceRequestAction([c,d])},function(){a.showGenericError_(); $N("YPC_ERROR_REASON_RISK_LIB_LOAD_FAILURE")}),function(){ud(Error("failure in redeem code execution."))})}; e.onYtServiceRequestCompleted_=function(a){a.stopPropagation();this.isLoading=!1;this.errorMessage_=this.get("detail.data.errorMessage",a);this.postRedemptionRenderer=this.get("detail.data.renderer",a);if(a=this.get("detail.data.redirectEndpoint",a))this.isLoading=!0,this.fire("yt-navigate",{endpoint:a});this.errorMessage_?$N("YPC_ERROR_REASON_REDEEM_INNERTUBE_FAILURE"):(this.postRedemptionRenderer||a)&&XN("ypcRedeemFlowSucceeded")}; e.onYtServiceRequestError_=function(a){a.stopPropagation();this.isLoading=!1;if(a=this.get("detail.error.message",a))this.errorMessage_=kL(a);$N("YPC_ERROR_REASON_YPC_REDEEM_CODE_RPC_FAILURE")}; e.onInvokeInstrumentManagerActionCompleted_=function(a){a.stopPropagation();this.redeemCode_()}; e.onInvokeInstrumentManagerActionError_=function(a){a.stopPropagation();this.isLoading=!1;switch(this.get("detail.error.errorCode",a)){case"instrumentManagerLoadError":this.showGenericError_();$N("YPC_ERROR_REASON_INST_MANAGER_LOAD_FAILURE");break;case"instrumentManagerCallbackError":this.showGenericError_();$N("YPC_ERROR_REASON_INST_MANAGER_CALLBACK_FAILURE");break;case"instrumentManagerCancelled":XN("ypcRedeemFlowCancelled");}}; e.onInput_=function(){var a=this;this.debounce("onInput_",function(){var b=a.$.code.value.trim();a.redeemButtonDisabled=b.lengtha.MAX_CODE_LENGTH},200)}; e.onCodeInputKeypress_=function(a){13!=a.keyCode||this.redeemButtonDisabled||this.isLoading||(lWa(),this.redeemCode_())}; e.computeImageUrl_=function(a){return a?wO(a.thumbnails,600):null}; e.showGenericError_=function(){this.isLoading=!1;this.errorMessage_=this.get("errorMessage",this.data)}; g.Object.defineProperties(DT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===K6a){var a=document.createElement("template");a.innerHTML="\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J6a){var d=document.createElement("template");d.innerHTML=""; J6a=d}d=J6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K6a=a}a=K6a;return a}}}); var ET=DT;ET.prototype.onInvokeInstrumentManagerActionError_=ET.prototype.onInvokeInstrumentManagerActionError_;ET.prototype.onInvokeInstrumentManagerActionCompleted_=ET.prototype.onInvokeInstrumentManagerActionCompleted_;ET.prototype.onYtServiceRequestError_=ET.prototype.onYtServiceRequestError_;ET.prototype.onYtServiceRequestCompleted_=ET.prototype.onYtServiceRequestCompleted_;w([P(X.YtRendererBehavior),x("design:type",Object)],ET.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],ET.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],ET.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],ET.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],ET.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],ET.prototype,"isLoading",void 0); w([R(),x("design:type",Boolean)],ET.prototype,"redeemButtonDisabled",void 0);w([R(),x("design:type",Object)],ET.prototype,"errorMessage_",void 0);w([R(),x("design:type",Object)],ET.prototype,"postRedemptionRenderer",void 0);w([R(),x("design:type",Object)],ET.prototype,"observer_",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ET.prototype,"onYtServiceRequestCompleted_",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ET.prototype,"onYtServiceRequestError_",null);w([S("yt-invoke-instrument-manager-action-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ET.prototype,"onInvokeInstrumentManagerActionCompleted_",null); w([S("yt-invoke-instrument-manager-action-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],ET.prototype,"onInvokeInstrumentManagerActionError_",null);ET=w([V({is:"ytd-redeem-code-renderer"})],ET);var L6a;var M6a;var FT=function(){return O.apply(this,arguments)||this}; p(FT,O);FT.prototype.dataChanged=function(){if(this.data){var a=this.get("background.thumbnailLandscapePortraitRenderer.portrait.thumbnails",this.data);a&&(a=wO(a,screen.width),this.style.backgroundImage="url("+a+")")}}; g.Object.defineProperties(FT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===M6a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
[[getSimpleString(data.title)]]
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L6a){var d=document.createElement("template");d.innerHTML=""; L6a=d}d=L6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);M6a=a}a=M6a;return a}}}); var GT=FT;GT.prototype.dataChanged=GT.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],GT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],GT.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],GT.prototype,"dataChanged",null);GT=w([V({is:"ytd-post-redemption-section-renderer"})],GT);var N6a;var O6a;var HT=function(){return O.apply(this,arguments)||this}; p(HT,O);HT.prototype.configureRendererStamper=function(){return{"data.sections":{id:"contents",mapping:{postRedemptionSectionRenderer:{component:"ytd-post-redemption-section-renderer",noInjection:!0}}}}}; g.Object.defineProperties(HT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O6a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.storeValueBalance)]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N6a){var d=document.createElement("template");d.innerHTML=""; N6a=d}d=N6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O6a=a}a=O6a;return a}}}); var IT=HT;w([P(X.YtRendererBehavior),x("design:type",Object)],IT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],IT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],IT.prototype,"data",void 0);IT=w([V({is:"ytd-ypc-post-redemption-renderer"})],IT);var P6a;var Q6a;var R6a={EMPTY_SEARCH:"promo-full-height",HASHTAG_LANDING_PAGE_EMPTY:"hashtag-landing-page",HASHTAG_LANDING_PAGE_EMPTY_DARK_MODE:"hashtag-landing-page",HASHTAG_LANDING_PAGE_ERROR:"hashtag-landing-page",HASHTAG_LANDING_PAGE_ERROR_DARK_MODE:"hashtag-landing-page",OFFLINE_NO_CONTENT:"offline-no-content"},JT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-show-invite-url-action":"handleConnectionInviteShown_"};return a}; p(JT,O);e=JT.prototype;e.configureRendererStamper=function(){return{"data.ctaButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer",reloadPageButtonRenderer:"ytd-reload-page-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeRendererStyle_=function(a){return a.style?a.style.value.split("TYPE_")[1].replace(/_/g,"-").toLowerCase():a.icon?"":"no-icon"}; e.getIconName_=function(a){a=this.get("icon.iconType",a);var b=R6a[a];b||(b="yt-icons");return[b,a].join(":")}; e.handleConnectionInviteShown_=function(a){if(a=this.get("showInviteUrlAction.inviteUrlRenderer.copyConnectionInviteUrlRenderer",a)){Polymer.dom(this.$.button).firstElementChild.hidden=!0;var b=Polymer.dom(this.$.dynamicContent),c=document.createElement("ytd-copy-connection-invite-url-renderer");c.data=a;b.appendChild(c)}}; g.Object.defineProperties(JT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Q6a){var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.title)]]
\n \n
\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P6a){var d=document.createElement("template");d.innerHTML=""; P6a=d}d=P6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q6a=a}a=Q6a;return a}}}); var KT=JT;w([P(Z),x("design:type",Object)],KT.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],KT.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],KT.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],KT.prototype,"data",void 0);w([R({computed:"computeRendererStyle_(data)",reflectToAttribute:!0}),x("design:type",String)],KT.prototype,"rendererStyle",void 0); w([R({computed:"getIconName_(data)",reflectToAttribute:!0}),x("design:type",String)],KT.prototype,"iconName",void 0);KT=w([V({is:"ytd-background-promo-renderer"})],KT);var S6a;var LT=function(){return O.apply(this,arguments)||this}; p(LT,O);LT.prototype.attached=function(){this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true");this.networkStatusManager||(this.networkStatusManager=new Km,this.networkStatusManager.listen("publicytnetworkstatus-online",this.onlineHandler.bind(this)))}; LT.prototype.detached=function(){this.networkStatusManager&&(this.networkStatusManager.unlisten("publicytnetworkstatus-online",this.onlineHandler.bind(this)),delete this.networkStatusManager)}; LT.prototype.onlineHandler=function(){this.actionSenderBehavior.sendAction("yt-signal-action-soft-reload-page")}; g.Object.defineProperties(LT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S6a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);S6a=a}a=S6a;return a}}}); var MT=LT;w([P(X.YtRendererBehavior),x("design:type",Object)],MT.prototype,"ytRendererBehavior",void 0);w([P(RO.YtButtonBehavior),x("design:type",Object)],MT.prototype,"ytButtonBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],MT.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],MT.prototype,"data",void 0);MT=w([V({is:"ytd-reload-page-button-renderer"})],MT);var T6a;var U6a;TO("itemSectionRenderer","channelAboutFullMetadataRenderer","ytd-channel-about-metadata-renderer");var NT=function(){var a=O.apply(this,arguments)||this;a.businessEmailDisplayState="HIDE_SECTION";return a}; p(NT,O);e=NT.prototype;e.configureRendererStamper=function(){return{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.data&&(this.data.businessEmailButton||this.data.signInForBusinessEmail)?this.data.signInForBusinessEmail?this.businessEmailDisplayState="SIGN_IN_REQUIRED":(this.businessEmailDisplayState="REVEAL_BUTTON",this.data.businessEmail&&(this.businessEmail=this.data.businessEmail)):this.businessEmailDisplayState="HIDE_SECTION"}; e.detached=function(){this.businessEmail=void 0;this.businessEmailDisplayState="HIDE_SECTION"}; e.onBusinessEmailClick=function(){this.data&&(this.data.bypassBusinessEmailCaptcha?this.businessEmailDisplayState="BUSINESS_EMAIL":(WI("https://www.google.com/recaptcha/api.js"),this.businessEmailDisplayState="CAPTCHA"))}; e.onYtServiceRequestCompleted=function(a){var b;if(null===(b=a.detail.data)||void 0===b?0:b.businessEmail)this.businessEmail=a.detail.data.businessEmail,this.businessEmailDisplayState="BUSINESS_EMAIL"}; e.computeEmailHref=function(a){return"mailto:"+a}; e.computeSafeUrl=function(a){if(a)return ac(a)}; e.onBusinessEmailCaptchaSubmit=function(){var a;if(null!==(a=this.data)&&void 0!==a&&a.onBusinessEmailRevealClickCommand){var b=this.captchaTextarea.value;b&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onBusinessEmailRevealClickCommand,{recaptcha_response_token:b,channel_id:this.data.channelId}])}}; e.recaptchaSiteKey=function(){return"6Lf39AMTAAAAALPbLZdcrWDa8Ygmgk_fmGmrlRog"}; g.Object.defineProperties(NT.prototype,{hideDetailsSection:{configurable:!0,enumerable:!0,get:function(){return!this.data||!this.data.country&&!this.data.businessEmailButton}}}); g.Object.defineProperties(NT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===U6a){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T6a){var d=document.createElement("template");d.innerHTML=""; T6a=d}d=T6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);U6a=a}a=U6a;return a}}}); var OT=NT;OT.prototype.onYtServiceRequestCompleted=OT.prototype.onYtServiceRequestCompleted;w([P(kO.YtComponentBehavior),x("design:type",Object)],OT.prototype,"ytComponentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],OT.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],OT.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],OT.prototype,"ytRendererstamperBehavior",void 0); w([CE("#g-recaptcha-response"),x("design:type",HTMLTextAreaElement)],OT.prototype,"captchaTextarea",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],OT.prototype,"data",void 0);w([R(),x("design:type",String)],OT.prototype,"businessEmailDisplayState",void 0);w([R(),x("design:type",String)],OT.prototype,"businessEmail",void 0);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],OT.prototype,"hideDetailsSection",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],OT.prototype,"onYtServiceRequestCompleted",null);OT=w([V({is:"ytd-channel-about-metadata-renderer"})],OT);var V6a;var W6a;TO("itemSectionRenderer","channelFeaturedContentRenderer","ytd-channel-featured-content-renderer");var PT=function(){return O.apply(this,arguments)||this}; p(PT,O);PT.prototype.configureRendererStamper=function(){return{"data.items":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; g.Object.defineProperties(PT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W6a){var a=document.createElement("template");a.innerHTML="
\n

\n \n

\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V6a){var d=document.createElement("template");d.innerHTML=""; V6a=d}d=V6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W6a=a}a=W6a;return a}}}); var QT=PT;w([P(X.YtRendererBehavior),x("design:type",Object)],QT.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],QT.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],QT.prototype,"data",void 0);QT=w([V({is:"ytd-channel-featured-content-renderer"})],QT);var X6a;var Y6a;TO("itemSectionRenderer","channelRenderer","ytd-channel-renderer");var RT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(RT,O);e=RT.prototype;e.attached=function(){this.isDarkTheme=document.documentElement.hasAttribute("dark")}; e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.computeHideDot=function(a){return!(a&&a.subscriberCountText&&a.videoCountText)}; e.backgroundColorChanged=function(){if(void 0!==this.data){var a=this.data.backgroundColor;this.isDarkTheme&&(a=this.data.backgroundColorDarkTheme);this.style.backgroundColor=null!=a?PN(a):"transparent"}}; e.onDarkModeToggledAction=function(a){this.isDarkTheme=a}; e.onTap=function(a){var b,c,d=(null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint)||(null===(c=this.data)||void 0===c?void 0:c.serviceEndpoint);d&&d.ypcGetOffersEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([d]),a.preventDefault())}; e.computeChannelEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:a}; e.computeHrefEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:this.componentBehavior.computeHref_(a)}; e.computeChannelRendererStyle=function(a){return a}; g.Object.defineProperties(RT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y6a){var a=document.createElement("template");a.innerHTML=""; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X6a){var d=document.createElement("template");d.innerHTML=""; X6a=d}d=X6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y6a=a}a=Y6a;return a}}}); var ST=RT;ST.prototype.backgroundColorChanged=ST.prototype.backgroundColorChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],ST.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],ST.prototype,"ytRendererstamperBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],ST.prototype,"ytdOpenPopupBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],ST.prototype,"ytActionSenderBehavior",void 0); w([P(kO.YtComponentBehavior),x("design:type",Object)],ST.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],ST.prototype,"data",void 0);w([R(),x("design:type",Boolean)],ST.prototype,"isDarkTheme",void 0);w([R({computed:"computeChannelRendererStyle(data.channelRendererStyle)",reflectToAttribute:!0}),x("design:type",String)],ST.prototype,"channelRendererStyle",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],ST.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],ST.prototype,"prominentThumbStyle",void 0);w([U("data","isDarkTheme"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],ST.prototype,"backgroundColorChanged",null);ST=w([V({is:"ytd-channel-renderer"})],ST);var Z6a;var $6a;var TT=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-menu-service-item-selected-action":"handleBellMenuOpenSelectedAction_"};return a}; p(TT,O);e=TT.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("button-renderer")||this.setAttribute("button-renderer","true")}; e.currentStateData_=function(a){var b=a||this.data;return b&&b.states&&null!=b.currentStateId?b.states.find(function(c){return c.stateId==b.currentStateId})||null:null}; e.currentStateRendererData_=function(a){return(a=this.currentStateData_(a))&&a.state&&a.state.buttonRenderer?a.state.buttonRenderer:null}; e.stateChanged_=function(){this&&this.data&&(this.ytRenderButtonBehavior._setEndpoint(null),this.ytRenderButtonBehavior._setServiceEndpoint(this.computeServiceEndpoint_(this.data)),this.ytRenderButtonBehavior._setButtonIcon(this.computeButtonIcon_(this.data)),this.ytRenderButtonBehavior._setButtonText(null),this.ytRenderButtonBehavior._setButtonAccessibility(this.computeAccessibility_(this.data)),this.ytRenderButtonBehavior._setButtonClass(this.computeButtonClass_(this.data)),this.ytRenderButtonBehavior.updateRenderedElements())}; e.computeButtonIcon_=function(a){var b;a=this.currentStateRendererData_(a);return(null===(b=null===a||void 0===a?void 0:a.icon)||void 0===b?0:b.iconType)?a.icon.iconType.toLowerCase():null}; e.computeAccessibility_=function(a){return(a=this.currentStateRendererData_(a))&&a.accessibilityData?a.accessibilityData.accessibilityData||null:null}; e.computeButtonClass_=function(a){var b=this.currentStateRendererData_(a);if(!b)return"";a="";var c=b.style;c&&(a+=c.toLowerCase().replace(/_/g,"-")+" ");(b=b.size)&&(a+=b.toLowerCase().replace(/_/g,"-")+" ");return a.trim()}; e.computeServiceEndpoint_=function(a){if(!a)return null;var b=a&&a.serviceEndpoint,c=this.get("command.commandMetadata.webCommandMetadata.sendPost",a);return b?b:c&&a.command?a.command:null}; e.computeBellMenuItemParams_=function(a){return a&&a.command&&a.command.commandExecutorCommand?(a=a.command.commandExecutorCommand.commands)&&0!=a.length&&a[0].openPopupAction&&a[0].openPopupAction.popup&&a[0].openPopupAction.popup.menuPopupRenderer&&a[0].openPopupAction.popup.menuPopupRenderer.items?a[0].openPopupAction.popup.menuPopupRenderer.items.map(function(b){return b.menuServiceItemRenderer.trackingParams}):null:null}; e.handleBellMenuOpenSelectedAction_=function(a){var b=a.trackingParams;this.data&&b&&this.computeBellMenuItemParams_(this.data)&&this.computeBellMenuItemParams_(this.data).includes(b)&&this.ytRenderButtonBehavior._setButtonIcon(a.icon.iconType.toLowerCase())}; e.onYtServiceRequestCompleted_=function(a,b){(a=this.get("data.newNotificationButton.subscriptionNotificationToggleButtonRenderer",b))&&this.set("data",a)}; e.onYtServiceRequestError_=function(){this.ytRenderButtonBehavior._setButtonIcon(this.computeButtonIcon_(this.data))}; e.resetState=function(){this.set("data.currentStateId",3)}; e.onYtButtonTapHandler=function(){if(this.data){var a=this.currentStateRendererData_(this.data);a&&this.ytRendererBehavior.logExplicitClick(a)}}; g.Object.defineProperties(TT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$6a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z6a){var d=document.createElement("template");d.innerHTML=""; Z6a=d}d=Z6a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$6a=a}a=$6a;return a}}}); var UT=TT;UT.prototype.onYtServiceRequestError_=UT.prototype.onYtServiceRequestError_;UT.prototype.onYtServiceRequestCompleted_=UT.prototype.onYtServiceRequestCompleted_;UT.prototype.stateChanged_=UT.prototype.stateChanged_;w([P(X.YtRendererBehavior),x("design:type",Object)],UT.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],UT.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],UT.prototype,"ytActionSenderBehavior",void 0);w([P(bYa),x("design:type",Object)],UT.prototype,"ytRenderButtonBehavior",void 0);w([R(),x("design:type",Object)],UT.prototype,"data",void 0);w([U("data","data.currentStateId"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UT.prototype,"stateChanged_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],UT.prototype,"onYtServiceRequestCompleted_",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],UT.prototype,"onYtServiceRequestError_",null);UT=w([V({is:"ytd-subscription-notification-toggle-button-renderer"})],UT);var a7a;var b7a;var VT=function(){var a=O.apply(this,arguments)||this;a.keyboardFocused=!1;a.actionMap={"yt-player-subscribe":"onPlayerSubscribe_","yt-player-unsubscribe":"onPlayerUnsubscribe_","yt-update-subscribe-button-action":"handleUpdateSubscribeButtonAction_"};return a}; p(VT,O);e=VT.prototype;e.configureRendererStamper=function(){return{"data.notificationPreferenceToggleButton":{id:"notification-preference-toggle-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.notificationPreferenceButton":{id:"notification-preference-button",mapping:{subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.keyboardFocused=!1}; e.computeDisplayText_=function(a,b){if(this.data)return a?b.subscribedButtonText:b.unsubscribedButtonText}; e.onSubscribeButtonFocusin_=function(){if(this.useKeyboardFocused){var a=this.ytComponentBehavior.getInterfaceForTs("yt-hotkey-manager");a&&(this.keyboardFocused=a.isKeyBoardInUse())}}; e.onSubscribeButtonFocusout_=function(){this.keyboardFocused=!1}; e.onSubscribeButtonTap_=function(a){var b,c,d,f,h;if(N("kevlar_subscribe_endpoints_killswitch"))(null===(b=this.data)||void 0===b?0:b.serviceEndpoints)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.subscribed?this.data.serviceEndpoints[1]:this.data.serviceEndpoints[0]]);else{if(this.subscribed){if(null===(c=this.data)||void 0===c?0:c.serviceEndpoints)var l=this.data.serviceEndpoints[1];else{if(null===(d=this.data)||void 0===d?0:d.onUnsubscribeEndpoints)l=this.data.onUnsubscribeEndpoints[0]}}else if(null===( f=this.data)||void 0===f?0:f.serviceEndpoints)l=this.data.serviceEndpoints[0];else if(null===(h=this.data)||void 0===h?0:h.onSubscribeEndpoints)l=this.data.onSubscribeEndpoints[0];l&&this.ytActionSenderBehavior.sendServiceRequestAction([l])}a.preventDefault()}; e.onYtServiceRequestSent_=function(a,b){(this.get("endpoint.subscribeEndpoint",b)||this.get("endpoint.unsubscribeEndpoint",b))&&this.updateSubscriptionState_(!this.subscribed)}; e.onYtServiceRequestCompleted_=function(a,b){a=this.get("newNotificationButton.subscriptionNotificationToggleButtonRenderer",b.data);b=this.$$("ytd-subscription-notification-toggle-button-renderer");a&&b&&b.set("data",a)}; e.observedSubscribed_=function(){this.updateStyles()}; e.computeAccessibility_=function(a,b){b=b?this.get("unsubscribeAccessibility.accessibilityData.label",a):this.get("subscribeAccessibility.accessibilityData.label",a);return a&&a.longSubscriberCountText?b+" "+nL(a.longSubscriberCountText):b}; e.onPlayerSubscribe_=function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!0)}; e.onPlayerUnsubscribe_=function(a){this.isCompactRed_()||a!=this.data.channelId||this.updateSubscriptionState_(!1)}; e.handleUpdateSubscribeButtonAction_=function(a){(a=a.updateSubscribeButtonAction)&&a.channelId==this.data.channelId&&this.updateSubscriptionState_(!!a.subscribed)}; e.computeButtonStyle_=function(a){return this.get("style.styleType",a)||null}; e.isCompactRed_=function(){return"COMPACT_RED"==this.computeButtonStyle_(this.data)}; e.computeSubscribed_=function(){return this.subscriptionStateEntity?!!this.subscriptionStateEntity.subscribed:!(!this.data||!this.data.subscribed)}; e.updateSubscriptionState_=function(a){var b;if(a!==this.subscribed){this.set("data.subscribed",a);var c=null===(b=this.data)||void 0===b?void 0:b.subscribedEntityKey;c&&this.ytdReduxBehavior.dispatch(LL("subscriptionStateEntity",c,{key:c,subscribed:a}));this.isCompactRed_()||this.fire("yt-subscription-changed",a);a||(this.ytActionSenderBehavior.sendAction("yt-unsubscribe-action"),this.resetNotificationBellState_())}}; e.resetNotificationBellState_=function(){var a=this.$$("ytd-subscription-notification-toggle-button-renderer");this.get("notificationPreferenceButton.subscriptionNotificationToggleButtonRenderer",this.data)&&a&&a.resetState()}; g.Object.defineProperties(VT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b7a){var a=document.createElement("template");a.innerHTML="\n \n \n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a7a){var d=document.createElement("template");d.innerHTML=""; a7a=d}d=a7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b7a=a}a=b7a;return a}}}); var WT=VT;WT.prototype.observedSubscribed_=WT.prototype.observedSubscribed_;WT.prototype.onYtServiceRequestCompleted_=WT.prototype.onYtServiceRequestCompleted_;WT.prototype.onYtServiceRequestSent_=WT.prototype.onYtServiceRequestSent_;w([P(kO.YtComponentBehavior),x("design:type",Object)],WT.prototype,"ytComponentBehavior",void 0);w([P(Z),x("design:type",Object)],WT.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],WT.prototype,"ytRendererBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],WT.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],WT.prototype,"ytActionSenderBehavior",void 0);w([P(DQ.YtdReduxBehavior),x("design:type",Object)],WT.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],WT.prototype,"data",void 0);w([R({selectorArgs:["data.subscribedEntityKey"],selector:function(a,b){return ML(a.entities,"subscriptionStateEntity",b)}}), x("design:type",Object)],WT.prototype,"subscriptionStateEntity",void 0);w([R({computed:"computeSubscribed_(data.subscribed, subscriptionStateEntity)"}),x("design:type",Boolean)],WT.prototype,"subscribed",void 0);w([R({readOnly:!0,computed:"computeAccessibility_(data, subscribed)"}),x("design:type",String)],WT.prototype,"buttonAccessibility",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],WT.prototype,"branded",void 0);w([R(),x("design:type",Boolean)],WT.prototype,"buttonRaised",void 0); w([R({reflectToAttribute:!0,computed:"computeButtonStyle_(data)"}),x("design:type",Object)],WT.prototype,"buttonStyle",void 0);w([R({value:function(){return!!this.getInterfaceForTs("yt-hotkey-manager")&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0}),x("design:type",Boolean)],WT.prototype,"useKeyboardFocused",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WT.prototype,"keyboardFocused",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],WT.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],WT.prototype,"onYtServiceRequestCompleted_",null);w([U("subscribed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WT.prototype,"observedSubscribed_",null);WT=w([V({is:"ytd-subscribe-button-renderer"})],WT);var c7a;var d7a;TO("itemSectionRenderer","radioRenderer","ytd-radio-renderer");var XT=function(){var a=O.apply(this,arguments)||this;a.displayItemCount=2;return a}; p(XT,O);XT.prototype.computeFirstVideos=function(a,b){return a&&b?a.slice(0,b):[]}; XT.prototype.computeThumbnailWidth=function(a,b){return a?"BIG1"===b?340:"BIG2"===b?320:"MEDIUM1"===b?300:"MEDIUM2"===b?280:360:246}; XT.prototype.computeThumbnailHeight=function(a){return a?240:138}; g.Object.defineProperties(XT,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===d7a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c7a){var d=document.createElement("template");d.innerHTML=""; c7a=d}d=c7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);d7a=a}a=d7a;return a}}}); var ZT=XT;w([P(X.YtRendererBehavior),x("design:type",Object)],ZT.prototype,"ytRendererBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],ZT.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],ZT.prototype,"data",void 0);w([R(),x("design:type",Object)],ZT.prototype,"displayItemCount",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],ZT.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],ZT.prototype,"prominentThumbStyle",void 0);ZT=w([V({is:"ytd-radio-renderer"})],ZT);var e7a;var f7a;TO("itemSectionRenderer","showRenderer","ytd-show-renderer");var $T=function(){return O.apply(this,arguments)||this}; p($T,O);$T.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; g.Object.defineProperties($T,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f7a){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e7a){var d=document.createElement("template");d.innerHTML=""; e7a=d}d=e7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f7a=a}a=f7a;return a}}}); var aU=$T;w([P(X.YtRendererBehavior),x("design:type",Object)],aU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],aU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],aU.prototype,"data",void 0);aU=w([V({is:"ytd-show-renderer"})],aU);var g7a;var h7a;TO("itemSectionRenderer","clarificationRenderer","ytd-clarification-renderer");var bU=function(){return O.apply(this,arguments)||this}; p(bU,O);e=bU.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.dataChanged=function(a){this.imageWidth=this.imageHeight=24;"CLARIFICATION_RENDERER_STYLE_MEDIUM"===a.style?this.imageWidth=this.imageHeight=80:!a.style&&a.image&&a.image.thumbnails.length&&(a=a.image.thumbnails[0],this.imageWidth=a.width||0,this.imageHeight=a.height||0)}; e.computeSource=function(a){return a.secondarySource?nL(a.secondarySource):nL(a.source)}; e.computeClarifyStyle=function(a){return a?a.replace("CLARIFICATION_RENDERER_STYLE_","").toLowerCase():""}; e.isLargeStyle=function(a){return"CLARIFICATION_RENDERER_STYLE_LARGE"===a}; e.computeBackgroundStyle=function(a){return a?a.replace("CLARIFICATION_RENDERER_BACKGROUND_","").toLowerCase():""}; e.computeHasActionButton=function(a){return!!a.actionButton}; e.computeIsResourceMissing=function(a){return!1===a.ctaHasBottomSection?!0:a&&a.source&&nL(a.source)?!1:!0}; e.computeSecondaryEndpoint=function(a){return a.secondaryEndpoint||a.endpoint}; g.Object.defineProperties(bU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h7a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g7a){var d=document.createElement("template");d.innerHTML=""; g7a=d}d=g7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h7a=a}a=h7a;return a}}}); var cU=bU;w([P(X.YtRendererBehavior),x("design:type",Object)],cU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],cU.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],cU.prototype,"data",void 0);w([R(),x("design:type",Number)],cU.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],cU.prototype,"imageHeight",void 0); w([R({computed:"computeSecondaryEndpoint(data)"}),x("design:type",Object)],cU.prototype,"secondaryEndpoint",void 0);w([R({reflectToAttribute:!0,computed:"computeHasActionButton(data)"}),x("design:type",Boolean)],cU.prototype,"hasActionButton",void 0);w([R({reflectToAttribute:!0,computed:"computeIsResourceMissing(data)"}),x("design:type",Boolean)],cU.prototype,"missingSource",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],cU.prototype,"icon",void 0); w([R({computed:"computeIcon_(data.secondaryIcon)"}),x("design:type",String)],cU.prototype,"secondaryIcon",void 0);w([R({reflectToAttribute:!0,computed:"computeClarifyStyle(data.style)"}),x("design:type",String)],cU.prototype,"clarifyStyle",void 0);w([R({reflectToAttribute:!0,computed:"computeBackgroundStyle(data.background)"}),x("design:type",String)],cU.prototype,"backgroundStyle",void 0);cU=w([V({is:"ytd-clarification-renderer"})],cU);var i7a;var j7a;TO("multiPageMenuSectionItems","compactLinkRenderer","ytd-compact-link-renderer");var dU=function(){return O.apply(this,arguments)||this}; p(dU,O);e=dU.prototype;e.computeHasPrimaryIcon=function(a){return!(!a.icon&&!a.thumbnail)}; e.computeHasSecondary=function(a){return!(!a.secondaryIcon&&!a.secondaryNotificationText)}; e.computeCompactLinkStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.isActiveEndpoint=function(a){return(a=this.get("commandMetadata.webCommandMetadata.url",a))?"/account_transfer_channel"!==Bd(window.location.href)&&"/gaia_link"!==Bd(window.location.href)&&"/channel_switcher"!==Bd(window.location.href)||"/account"!==a?Bd(window.location.href)===a:!0:!1}; e.onTap=function(){var a;(null===(a=this.data)||void 0===a?0:a.serviceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; g.Object.defineProperties(dU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===j7a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===i7a){var d=document.createElement("template");d.innerHTML=""; i7a=d}d=i7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);j7a=a}a=j7a;return a}}}); var eU=dU;eU.prototype.onTap=eU.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],eU.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],eU.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],eU.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isActiveEndpoint(data.navigationEndpoint)"}),x("design:type",Boolean)],eU.prototype,"active",void 0); w([R({reflectToAttribute:!0,computed:"computeCompactLinkStyle(data.style)"}),x("design:type",String)],eU.prototype,"compactLinkStyle",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",Object)],eU.prototype,"icon",void 0);w([R({computed:"computeIcon_(data.secondaryIcon)"}),x("design:type",Object)],eU.prototype,"secondaryIcon",void 0);w([R({computed:"computeHasSecondary(data)",reflectToAttribute:!0}),x("design:type",Boolean)],eU.prototype,"hasSecondary",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],eU.prototype,"onTap",null);eU=w([V({is:"ytd-compact-link-renderer"})],eU);var k7a;var l7a;TO("itemSectionRenderer","emergencyOneboxRenderer","ytd-emergency-onebox-renderer");var m7a=function(){return O.apply(this,arguments)||this}; p(m7a,O); g.Object.defineProperties(m7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===l7a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k7a){var d=document.createElement("template");d.innerHTML=""; k7a=d}d=k7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);l7a=a}a=l7a;return a}}}); var fU=m7a;w([P(X.YtRendererBehavior),x("design:type",Object)],fU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],fU.prototype,"data",void 0);fU=w([V({is:"ytd-emergency-onebox-renderer"})],fU);var n7a;var o7a;var gU=function(){return O.apply(this,arguments)||this}; p(gU,O);gU.prototype.computeIcon=function(a){return a?"yt-icons:"+a.toLowerCase():null}; g.Object.defineProperties(gU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===o7a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n7a){var d=document.createElement("template");d.innerHTML=""; n7a=d}d=n7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o7a=a}a=o7a;return a}}}); var hU=gU;w([P(X.YtRendererBehavior),x("design:type",Object)],hU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],hU.prototype,"data",void 0);hU=w([V({is:"ytd-single-action-emergency-support-renderer"})],hU);var p7a;var q7a;TO("itemSectionRenderer","exploratoryResultsRenderer","ytd-exploratory-results-renderer");var iU=function(){return O.apply(this,arguments)||this}; p(iU,O);iU.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; g.Object.defineProperties(iU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===q7a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p7a){var d=document.createElement("template");d.innerHTML=""; p7a=d}d=p7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q7a=a}a=q7a;return a}}}); var jU=iU;w([P(X.YtRendererBehavior),x("design:type",Object)],jU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],jU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],jU.prototype,"data",void 0);jU=w([V({is:"ytd-exploratory-results-renderer"})],jU);var r7a;var s7a;TO("itemSectionRenderer","feedEntryRenderer","ytd-feed-entry-renderer");var kU=function(){return O.apply(this,arguments)||this}; p(kU,O);kU.prototype.configureRendererStamper=function(){return{"data.item":{id:"contents",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; g.Object.defineProperties(kU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===s7a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r7a){var d=document.createElement("template");d.innerHTML=""; r7a=d}d=r7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);s7a=a}a=s7a;return a}}}); var lU=kU;w([P(X.YtRendererBehavior),x("design:type",Object)],lU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],lU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],lU.prototype,"data",void 0);lU=w([V({is:"ytd-feed-entry-renderer"})],lU);var t7a;var u7a;TO("itemSectionRenderer","feedbackElicitationSingleQuestionRenderer","ytd-feedback-elicitation-single-question-renderer");var mU=function(){var a=O.apply(this,arguments)||this;a.messageData=null;return a}; p(mU,O);e=mU.prototype;e.onServiceRequestCompleted=function(a,b){a=b.actions||[];b=0;for(var c=a.length;b\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t7a){var d=document.createElement("template");d.innerHTML=""; t7a=d}d=t7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);u7a=a}a=u7a;return a}}}); var nU=mU;nU.prototype.onServiceRequestCompleted=nU.prototype.onServiceRequestCompleted;w([P(W.YtActionSenderBehavior),x("design:type",Object)],nU.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],nU.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],nU.prototype,"data",void 0);w([R(),x("design:type",Object)],nU.prototype,"messageData",void 0); w([R({observer:"onSelectedResponseIndexChange"}),x("design:type",Number)],nU.prototype,"selectedResponseIndex",void 0);w([CE("#submit-button"),x("design:type",HTMLButtonElement)],nU.prototype,"submitButton",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],nU.prototype,"onServiceRequestCompleted",null);nU=w([V({is:"ytd-feedback-elicitation-single-question-renderer"})],nU);var v7a;var w7a;var x7a=function(){return O.apply(this,arguments)||this}; p(x7a,O); g.Object.defineProperties(x7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===w7a){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v7a){var d=document.createElement("template");d.innerHTML=""; v7a=d}d=v7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);w7a=a}a=w7a;return a}}}); var oU=x7a;w([R(),x("design:type",Object)],oU.prototype,"data",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],oU.prototype,"componentBehavior",void 0);oU=w([V({is:"ytd-game-details-renderer"})],oU);var y7a;var z7a;var pU=function(){return O.apply(this,arguments)||this}; p(pU,O);pU.prototype.configureRendererStamper=function(){return{"data.game":{id:"game",mapping:{gameDetailsRenderer:"ytd-game-details-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; g.Object.defineProperties(pU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===z7a){var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y7a){var d=document.createElement("template");d.innerHTML=""; y7a=d}d=y7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z7a=a}a=z7a;return a}}}); var qU=pU;w([P(X.YtRendererBehavior),x("design:type",Object)],qU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],qU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],qU.prototype,"data",void 0);qU=w([V({is:"ytd-game-card-renderer"})],qU);var A7a;var B7a;var rU=function(){return O.apply(this,arguments)||this}; p(rU,O);rU.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; g.Object.defineProperties(rU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===B7a){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===A7a){var d=document.createElement("template");d.innerHTML=""; A7a=d}d=A7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);B7a=a}a=B7a;return a}}}); var sU=rU;w([P(X.YtRendererBehavior),x("design:type",Object)],sU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],sU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],sU.prototype,"data",void 0);sU=w([V({is:"ytd-grid-channel-renderer"})],sU);var C7a;var D7a;var E7a=function(){return O.apply(this,arguments)||this}; p(E7a,O); g.Object.defineProperties(E7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===D7a){var a=document.createElement("template");a.innerHTML="\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n
\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===C7a){var d=document.createElement("template");d.innerHTML=""; C7a=d}d=C7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);D7a=a}a=D7a;return a}}}); var tU=E7a;w([P(X.YtRendererBehavior),x("design:type",Object)],tU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],tU.prototype,"data",void 0);tU=w([V({is:"ytd-grid-movie-playlist-renderer"})],tU);var F7a;var G7a;var H7a=function(){return O.apply(this,arguments)||this}; p(H7a,O); g.Object.defineProperties(H7a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===G7a){var a=document.createElement("template");a.innerHTML="\n\n

\n [[getSimpleString(data.title)]]\n

\n\n\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F7a){var d=document.createElement("template");d.innerHTML=""; F7a=d}d=F7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);G7a=a}a=G7a;return a}}}); var uU=H7a;w([P(X.YtRendererBehavior),x("design:type",Object)],uU.prototype,"ytRendererBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],uU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],uU.prototype,"data",void 0);uU=w([V({is:"ytd-grid-playlist-renderer"})],uU);var I7a;var J7a;var vU=function(){return O.apply(this,arguments)||this}; p(vU,O);vU.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&EN?void 0:0,waitForSignal:"eocs"},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; g.Object.defineProperties(vU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===J7a){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===I7a){var d=document.createElement("template");d.innerHTML=""; I7a=d}d=I7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);J7a=a}a=J7a;return a}}}); var wU=vU;w([P(X.YtRendererBehavior),x("design:type",Object)],wU.prototype,"ytRendererBehavior",void 0);w([P(cQ),x("design:type",Object)],wU.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],wU.prototype,"ytdLockupBehavior",void 0);w([P(Z),x("design:type",Object)],wU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],wU.prototype,"data",void 0);wU=w([V({is:"ytd-grid-radio-renderer"})],wU);var K7a;var L7a;var M7a=function(){var a=zE.apply(this,arguments)||this;a.continuationActionMap={"yt-append-continuation-items-action":"handleAppendContinuationItemsAction","yt-reload-continuation-items-command":"handleReloadContinuationItemsCommand","yt-show-reload-ui-command":"handleShowReloadUiCommand"};return a}; p(M7a,zE);e=M7a.prototype;e.configureContinuationPathMap=function(){return{}}; e.beforeRegister=function(){this.continuationPathMap=this.configureContinuationPathMap()}; e.attached=function(){this.actionHandlerBehavior.registerActionMap(this.continuationActionMap)}; e.detached=function(){this.actionHandlerBehavior.unregisterActionMap(this.continuationActionMap)}; e.observeData=function(){this.data&&(this.continuationIsReloading=!1)}; e.handleAppendContinuationItemsAction=function(a){var b=a.appendContinuationItemsAction;if(this.data&&this.data.targetId&&b&&this.continuationPathMap&&b.targetId===this.data.targetId&&b.continuationItems){var c=NQa(a);if((a=c&&this.continuationPathMap[c])&&c){c=this.get(a,this.data);var d;a:{for(d=0;d\n
\n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===K7a){var d=document.createElement("template");d.innerHTML=""; K7a=d}d=K7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);L7a=a}a=L7a;return a}}}); var BU=AU;BU.prototype.fillRestIfNotCollapsible=BU.prototype.fillRestIfNotCollapsible;BU.prototype.initCollapsed=BU.prototype.initCollapsed;BU.prototype.onIronResize=BU.prototype.onIronResize;BU.prototype.persistentGuideChanged=BU.prototype.persistentGuideChanged;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],BU.prototype,"ironResizableBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],BU.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],BU.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],BU.prototype,"actionSenderBehavior",void 0);w([P(HQ),x("design:type",Object)],BU.prototype,"ytLazyListBehavior",void 0);w([P(NQ),x("design:type",Object)],BU.prototype,"ytNextContinuationBehavior",void 0);w([P(v2a.YtdPosterHoverAnimationBehavior),x("design:type",Object)],BU.prototype,"ytdPosterHoverAnimationBehavior",void 0); w([P(xQ),x("design:type",Object)],BU.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(zU.YtContinuationHandlerBehavior),x("design:type",Object)],BU.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],BU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],BU.prototype,"collapsed",void 0);w([R(),x("design:type",Number)],BU.prototype,"initialCount",void 0); w([R({computed:"computeShowMoreButton(data.showMoreText)"}),x("design:type",Object)],BU.prototype,"showMoreButton",void 0);w([R({computed:"computeIsCollapsible(data)"}),x("design:type",Boolean)],BU.prototype,"isCollapsible",void 0);w([CE("#items"),x("design:type",HTMLElement)],BU.prototype,"items",void 0);w([U("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BU.prototype,"persistentGuideChanged",null); w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BU.prototype,"onIronResize",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BU.prototype,"initCollapsed",null);w([U("canShowMore"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],BU.prototype,"fillRestIfNotCollapsible",null);BU=w([V({is:"ytd-grid-renderer"})],BU);var N7a;var O7a;var CU=function(){return O.apply(this,arguments)||this}; p(CU,O);CU.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; g.Object.defineProperties(CU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O7a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N7a){var d=document.createElement("template");d.innerHTML=""; N7a=d}d=N7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O7a=a}a=O7a;return a}}}); var DU=CU;w([P(X.YtRendererBehavior),x("design:type",Object)],DU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],DU.prototype,"ytRendererstamperBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],DU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],DU.prototype,"data",void 0);DU=w([V({is:"ytd-grid-show-renderer"})],DU);var P7a;var Q7a;var EU=function(){var a=O.apply(this,arguments)||this;a.isDisabled=!1;return a}; p(EU,O);e=EU.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:N("defer_menus")?0:void 0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{buttonTooltipPosition:"top"}},upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer", notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.getMetadata=function(a){var b=[];if(a.metadataText&&0
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P7a){var d=document.createElement("template");d.innerHTML=""; P7a=d}d=P7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q7a=a}a=Q7a;return a}}}); var FU=EU;w([P(X.YtRendererBehavior),x("design:type",Object)],FU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],FU.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],FU.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],FU.prototype,"ytdLockupBehavior",void 0);w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],FU.prototype,"ytdMouseDownPrefetchableBehavior",void 0); w([R(),x("design:type",Object)],FU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],FU.prototype,"noEndpoints",void 0);w([R({computed:"calculateBylineText(data)"}),x("design:type",Object)],FU.prototype,"bylineText",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],FU.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"calculateIsDisabled(data)"}),x("design:type",Object)],FU.prototype,"isDisabled",void 0);FU=w([V({is:"ytd-grid-video-renderer"})],FU);var R7a;var S7a;var KU=function(){return O.apply(this,arguments)||this}; p(KU,O);g.Object.defineProperties(KU.prototype,{showFromBrandText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.fromBrandText)}}, showFromMerchantText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.fromMerchantText)}}, useNewStyle:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.useNewStyle}}}); g.Object.defineProperties(KU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S7a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n
[[data.title]]
\n
\n [[data.price]]\n \n
\n
\n [[data.variantsDescription]]\n
\n
\n \n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R7a){var d=document.createElement("template");d.innerHTML=""; R7a=d}d=R7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S7a=a}a=S7a;return a}}}); var LU=KU;w([P(X.YtRendererBehavior),x("design:type",Object)],LU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],LU.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],LU.prototype,"showFromBrandText",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],LU.prototype,"showFromMerchantText",null);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Object),x("design:paramtypes",[])],LU.prototype,"useNewStyle",null); LU=w([V({is:"ytd-vertical-product-card-renderer"})],LU);var T7a;var U7a;var MU=function(){return O.apply(this,arguments)||this}; p(MU,O);MU.prototype.configureRendererStamper=function(){return{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; g.Object.defineProperties(MU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===U7a){var a=document.createElement("template");a.innerHTML="\n\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n \n \n
\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T7a){var d=document.createElement("template");d.innerHTML=""; T7a=d}d=T7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);U7a=a}a=U7a;return a}}}); var NU=MU;w([P(X.YtRendererBehavior),x("design:type",Object)],NU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],NU.prototype,"ytRendererstamperBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],NU.prototype,"ytdLockupBehavior",void 0);w([R(),x("design:type",Object)],NU.prototype,"data",void 0);NU=w([V({is:"ytd-grid-movie-renderer"})],NU);var V7a;var W7a;var OU=function(){return O.apply(this,arguments)||this}; p(OU,O);g.Object.defineProperties(OU.prototype,{themeable:{configurable:!0,enumerable:!0,get:function(){return N("desktop_themeable_vulcan")}}}); g.Object.defineProperties(OU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W7a){var a=document.createElement("template");a.innerHTML="\n
\n [[getSimpleString(data.actionMessage)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V7a){var d=document.createElement("template");d.innerHTML=""; V7a=d}d=V7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W7a=a}a=W7a;return a}}}); var PU=OU;w([P(X.YtRendererBehavior),x("design:type",Object)],PU.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],PU.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean),x("design:paramtypes",[])],PU.prototype,"themeable",null);PU=w([V({is:"ytd-details-bar-renderer"})],PU);var X7a;var Y7a;var QU=function(){var a=O.apply(this,arguments)||this;a.themeable_=N("desktop_themeable_vulcan");return a}; p(QU,O);QU.prototype.dataChanged=function(){var a=wO(this.data.foregroundThumbnailDetails.thumbnails,485);this.$.overlay.style["background-image"]="url('"+a+"')"}; QU.prototype.updateHoveringState=function(a){var b=this.$$("#video"),c=Polymer.dom(this.$["video-container"]);if(a&&!b){if(a=document.createElement("yt-video-as-thumbnail-details"),a.setAttribute("id","video"),a.autoplay=!0,a.loop=!0,a.data=this.data.videoThumbnail,c.appendChild(a),c=a.$.placeholder)c.style.height="275px",c.style.top="-2px"}else!a&&b&&c.removeChild(b)}; g.Object.defineProperties(QU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y7a){var a=document.createElement("template");a.innerHTML="
\n
\n
[[getSimpleString(data.title)]]
\n
\n \n
\n
[[getSimpleString(data.description)]]
\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X7a){var d=document.createElement("template");d.innerHTML=""; X7a=d}d=X7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y7a=a}a=Y7a;return a}}}); var RU=QU;RU.prototype.dataChanged=RU.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],RU.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],RU.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],RU.prototype,"data",void 0);w([R(),x("design:type",Object)],RU.prototype,"videoData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],RU.prototype,"themeable_",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RU.prototype,"dataChanged",null);RU=w([V({is:"ytd-poster-details-renderer"})],RU);var Z7a;var $7a;Polymer({is:"yt-video-as-thumbnail-details",_template:function(){if(void 0!==$7a)return $7a;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Z7a){var d=document.createElement("template");d.innerHTML=""; Z7a=d}d=Z7a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $7a=a}, properties:{data:{type:Object,observer:"dataChanged_"},animatePlaceholderOnEntrance:{type:Boolean,reflectToAttribute:!0},autoplay:{type:Boolean,reflectToAttribute:!0},videoThumbnail_:{type:Object,computed:"getVideoThumbnail_(data.videoThumbnails)"},loop:Boolean,isVideoPlaying_:Boolean},attached:function(){this.isVideoPlaying_=!1;this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit");this.listen(this.$.video,"ended","onEnded_");this.listen(this.$.mp4,"error","onError_")}, detached:function(){this.unlisten(this.$.video,"ended","onEnded_");this.unlisten(this.$.mp4,"error","onError_")}, play:function(){if(this.$.mp4.getAttribute("src")&&this.isMp4Supported_()){this.$.video.currentTime=0;this.$.video.load();var a=this.$.video.play();a?a.then(this.handleVideoStartPlaying_.bind(this)).catch(function(){this.fire("yt-video-thumbnail-not-playing")}.bind(this)):this.handleVideoStartPlaying_()}else this.fire("yt-video-thumbnail-not-playing")}, handleVideoStartPlaying_:function(){this.$.video.classList.remove("hideit");this.$.placeholder.classList.add("hideit");this.isVideoPlaying_=!0}, stop:function(){this.isVideoPlaying_&&(this.showPlaceholder_(),this.isVideoPlaying_=!1,this.$.video.pause(),this.$.video.currentTime=0)}, dataChanged_:function(a){a.thumbnailPlaceholder&&(a=wO(a.thumbnailPlaceholder.thumbnails,this.width),this.$.placeholder.style["background-image"]="url("+a+")");this.stop();this.autoplay&&this.play()}, showPlaceholder_:function(){this.$.video.classList.add("hideit");this.$.placeholder.classList.remove("hideit")}, onEnded_:function(){this.stop();this.fire("yt-video-thumbnail-ended");this.loop&&this.play()}, onError_:function(){this.fire("yt-video-thumbnail-error")}, isMp4Supported_:function(){return!(!this.$.video.canPlayType||!this.$.video.canPlayType("video/mp4").replace(/no/,""))}, getVideoThumbnail_:function(a){if(a&&a.length)return a[0]}});var a8a;var b8a;var SU=function(){var a=O.apply(this,arguments)||this;a.state="steady-state";a.isHovering=!1;a.isPrevHovering=!1;a.themeable_=N("desktop_themeable_vulcan");a.mouseEnterDelay_=0;return a}; p(SU,O);e=SU.prototype;e.ready=function(){var a=this.$.view;a.addEventListener("mouseenter",this.onMouseEnter_.bind(this));a.addEventListener("mouseleave",this.onMouseLeave_.bind(this))}; e.onMouseEnter_=function(){var a=this;this.mouseEnterDelay_=setTimeout(function(){a.isPosterDetailsAvailable_()&&a.fire("poster-renderer-hover")},500)}; e.onMouseLeave_=function(a){this.mouseEnterDelay_&&clearTimeout(this.mouseEnterDelay_);this.isPosterDetailsAvailable_()&&this.fire("poster-renderer-leave",{mouseEvent:a})}; e.isPosterDetailsAvailable_=function(){return!!(this.data&&this.data.posterDetails&&this.data.posterDetails.posterDetailsRenderer)}; e.updateTransform=function(a){null==a?(this.style.transform="",this.$.view.style.transform=""):(this.style.transform=ZVa(new VN(a.translateX,a.translateY,1,1)),this.$.view.style.transform=this.isHovering?ZVa(new VN(-137.5,0,a.scaleX/XVa,a.scaleY)):"")}; e.isPosterDetailHidden_=function(a,b){return!a&&!b}; e.updatePosterDetails_=function(){var a=this.isPrevHovering;this.$.hover.updateHoveringState(this.isHovering||a)}; g.Object.defineProperties(SU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===b8a){var a=document.createElement("template");a.innerHTML="\n\n\n \n \n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===a8a){var d=document.createElement("template");d.innerHTML=""; a8a=d}d=a8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);b8a=a}a=b8a;return a}}}); var TU=SU;TU.prototype.updatePosterDetails_=TU.prototype.updatePosterDetails_;w([P(X.YtRendererBehavior),x("design:type",Object)],TU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],TU.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],TU.prototype,"state",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],TU.prototype,"isHovering",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],TU.prototype,"isPrevHovering",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],TU.prototype,"themeable_",void 0);w([U("isHovering","isPrevHovering"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],TU.prototype,"updatePosterDetails_",null);TU=w([V({is:"ytd-poster-renderer"})],TU);var c8a;var d8a;Polymer({is:"yt-music-pass-small-feature-info-renderer",_template:function(){if(void 0!==d8a)return d8a;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===c8a){var d=document.createElement("template");d.innerHTML=""; c8a=d}d=c8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return d8a=a}, behaviors:[X.YtRendererBehavior],attached:function(){this.parentNode.style.justifyContent="center"}, properties:{data:Object}});var e8a;var f8a;var UU=function(){return O.apply(this,arguments)||this}; p(UU,O);UU.prototype.computeThumbnailWidth=function(a){return a?602:428}; g.Object.defineProperties(UU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===f8a){var a=document.createElement("template");a.innerHTML="\n\n\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===e8a){var d=document.createElement("template");d.innerHTML=""; e8a=d}d=e8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);f8a=a}a=f8a;return a}}}); var VU=UU;w([P(X.YtRendererBehavior),x("design:type",Object)],VU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],VU.prototype,"data",void 0);w([R(),x("design:type",Boolean)],VU.prototype,"wide",void 0);VU=w([V({is:"ytd-newspaper-hero-video-renderer"})],VU);var g8a;var h8a;var i8a=function(){return O.apply(this,arguments)||this}; p(i8a,O); g.Object.defineProperties(i8a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===h8a){var a=document.createElement("template");a.innerHTML="\n\n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===g8a){var d=document.createElement("template");d.innerHTML=""; g8a=d}d=g8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);h8a=a}a=h8a;return a}}}); var WU=i8a;w([P(X.YtRendererBehavior),x("design:type",Object)],WU.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],WU.prototype,"data",void 0);WU=w([V({is:"ytd-newspaper-mini-video-renderer"})],WU);var j8a;var k8a;TO("itemSectionRenderer","newspaperRenderer","ytd-newspaper-renderer");var XU=function(){return O.apply(this,arguments)||this}; p(XU,O);XU.prototype.configureRendererStamper=function(){return{"data.primaryContents":{id:"primary-contents",mapping:{newspaperHeroVideoRenderer:"ytd-newspaper-hero-video-renderer"}},"data.secondaryContents":{id:"secondary-contents",mapping:{newspaperMiniVideoRenderer:"ytd-newspaper-mini-video-renderer"}}}}; g.Object.defineProperties(XU,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===k8a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j8a){var d=document.createElement("template");d.innerHTML=""; j8a=d}d=j8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);k8a=a}a=k8a;return a}}}); var YU=XU;w([P(Z),x("design:type",Object)],YU.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],YU.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],YU.prototype,"data",void 0);YU=w([V({is:"ytd-newspaper-renderer"})],YU);var l8a;var m8a;var n8a={};n8a.YtReorderableBehavior={_noAccessors:!0,properties:{scrollMargin:{type:Number,value:100}},created:function(){this.dragScrollSupport_=this.dragListGroup_=null;this.boundOnDraggerCreated_=this.onDraggerCreated_.bind(this);this.boundOnDragStart_=this.onDragStart_.bind(this);this.boundOnDrop_=this.onDrop_.bind(this);this.scrollElement_=document.documentElement;this.boundOnReorderableScroll_=this.onReorderableScroll_.bind(this)}, detached:function(){this.disposeDragDrop()}, disposeDragDrop:function(){this.dragListGroup_&&(zi(this.dragListGroup_,uGa,this.boundOnDragStart_),zi(this.dragListGroup_,yGa,this.boundOnDragStart_),this.dragListGroup_.dispose(),this.dragListGroup_=null);this.disposeDragScroll_();this.scrollElement_.removeEventListener("scroll",this.boundOnReorderableScroll_)}, disposeDragScroll_:function(){this.dragScrollSupport_&&(Qg(this.dragScrollSupport_),this.dragScrollSupport_=null)}, startDragDrop:function(a,b,c){c=void 0===c?"":c;this.disposeDragDrop();b&&(this.scrollElement_=b);this.dragListGroup_=new oH;this.dragListGroup_.setHysteresis(2);AGa(this.dragListGroup_,a);this.dragListGroup_.draggerElClasses_=Qb("dragging").split(" ");c&&BGa(this.dragListGroup_,function(d){return eg(c,d)||d}); vi(this.dragListGroup_,sGa,this.boundOnDraggerCreated_);vi(this.dragListGroup_,uGa,this.boundOnDragStart_);vi(this.dragListGroup_,yGa,this.boundOnDrop_);this.dragListGroup_.init();this.scrollElement_.addEventListener("scroll",this.boundOnReorderableScroll_,{passive:!0})}, onDraggerCreated_:function(a){var b=a.dragger;b.scrollTarget_=this.scrollElement_;a=a.draggerEl;b&&a.menuOpened&&(b.enabled_=!1)}, onDragStart_:function(a){var b=a.draggerEl;a=a.currDragItem;var c=Object.assign({},a.data);c.trackingParams=void 0;b.data=c;b.style.width=a.clientWidth+"px";b.style.zIndex=2026;b.onDrag&&b.onDrag();(a=document.querySelector("ytd-app"))&&a.appendChild(b);this.dragScrollSupport_=new qH(this.scrollElement_,this.scrollMargin);this.dragScrollSupport_.horizontalScrolling_=!1;b=this.dragScrollSupport_;b.constrainScroll_=!!b.margin_&&!0}, onDrop_:function(a){this.handleDrop(a);this.disposeDragScroll_()}, onReorderableScroll_:function(){if(this.dragListGroup_){var a=this.dragListGroup_;EGa(a,a.currDragItem_)}}, handleDrop:function(){}};TO("itemSectionRenderer","playlistVideoListRenderer","ytd-playlist-video-list-renderer");var ZU=function(){var a=O.apply(this,arguments)||this;a.isSegment=!1;a.actionMap={"yt-playlist-remove-videos-action":"handlePlaylistRemoveVideosAction_","yt-update-playlist-action":"handleUpdatePlaylistAction_"};a.nextContinuation={continuationType:"playlistVideoListContinuation"};return a}; p(ZU,O);e=ZU.prototype; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{playlistVideoRenderer:{component:"ytd-playlist-video-renderer",properties:{isEditable:"[[isEditable_]]",canReorder:"[[canReorder_]]"}},continuationItemRenderer:"ytd-continuation-item-renderer"},events:!0},"data.continuations":{id:"continuations",mapping:{nextContinuationData:"yt-next-continuation"}},"data.sortFilterMenu":{id:"sort-filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{closeOnActivate:"true"}}}}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged_=function(){this.ytReorderableBehavior.disposeDragDrop()}; e.onRendererstamperFinished_=function(){this.isEditable_&&this.canReorder_&&(N("kevlar_playlist_drag_handles")?this.ytReorderableBehavior.startDragDrop(this.$.contents,document.documentElement,"playlist-drag-handle"):this.ytReorderableBehavior.startDragDrop(this.$.contents,document.documentElement))}; e.onPlaylistReloading_=function(){this.isReloading_=!0}; e.computeContentsClass_=function(a){return a?"reloading":""}; e.computeIsSortable_=function(a,b){return a&&0\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l8a){var d=document.createElement("template");d.innerHTML=""; l8a=d}d=l8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);m8a=a}a=m8a;return a}}}); var $U=ZU;$U.prototype.onPlaylistReloading_=$U.prototype.onPlaylistReloading_;$U.prototype.onRendererstamperFinished_=$U.prototype.onRendererstamperFinished_;w([P(X.YtRendererBehavior),x("design:type",Object)],$U.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],$U.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],$U.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],$U.prototype,"ytActionSenderBehavior",void 0);w([P(NQ),x("design:type",Object)],$U.prototype,"ytNextContinuationBehavior",void 0);w([P(n8a.YtReorderableBehavior),x("design:type",Object)],$U.prototype,"ytReorderableBehavior",void 0);w([P(zU.YtContinuationHandlerBehavior),x("design:type",Object)],$U.prototype,"ytContinuationHandlerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],$U.prototype,"data",void 0); w([R(),x("design:type",Boolean)],$U.prototype,"isReloading_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],$U.prototype,"isSegment",void 0);w([R({computed:"computeIsSortable_(data.canReorder, data.contents.length)"}),x("design:type",Boolean)],$U.prototype,"isSortable_",void 0);w([R({computed:"computeIsEditable_(data.isEditable)"}),x("design:type",Boolean)],$U.prototype,"isEditable_",void 0); w([R({computed:"computeCanReorder_(data.canReorder)"}),x("design:type",Boolean)],$U.prototype,"canReorder_",void 0);w([R({value:101}),x("design:type",Number)],$U.prototype,"scrollMargin",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$U.prototype,"onRendererstamperFinished_",null); w([S("yt-playlist-reloading"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$U.prototype,"onPlaylistReloading_",null);$U=w([V({is:"ytd-playlist-video-list-renderer"})],$U);var o8a;var p8a;var aV=function(){var a=O.apply(this,arguments)||this;a.responsive=N("kevlar_playlist_responsive");return a}; p(aV,O);e=aV.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.canReorderChanged=function(a){this.persistentDragHandle=N("kevlar_playlist_drag_handles")&&a}; e.onDrag=function(){if(this.thumbnail){var a=this.thumbnail.$$("yt-img-shadow");a&&a.onShow()}}; e.onMenuOverlayChanged=function(a,b){this.menuOpened=b}; e.onHandleMouseenter=function(){this.handleIsHovered=!0}; e.onHandleMouseleave=function(){this.handleIsHovered=!1}; e.onContentsTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!NR(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})}; g.Object.defineProperties(aV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===p8a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n \n \n
\n \n \n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===o8a){var d=document.createElement("template");d.innerHTML=""; o8a=d}d=o8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);p8a=a}a=p8a;return a}}}); var bV=aV;bV.prototype.onMenuOverlayChanged=bV.prototype.onMenuOverlayChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],bV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],bV.prototype,"ytRendererstamperBehavior",void 0);w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],bV.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],bV.prototype,"ytdLockupBehavior",void 0); w([P(cQ),x("design:type",Object)],bV.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],bV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],bV.prototype,"responsive",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],bV.prototype,"isEditable",void 0);w([R({observer:"canReorderChanged",reflectToAttribute:!0}),x("design:type",Boolean)],bV.prototype,"canReorder",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],bV.prototype,"menuOpened",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],bV.prototype,"handleIsHovered",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],bV.prototype,"persistentDragHandle",void 0);w([CE("#thumbnail"),x("design:type",O)],bV.prototype,"thumbnail",void 0); w([S("yt-menu-overlay-changed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Boolean]),x("design:returntype",void 0)],bV.prototype,"onMenuOverlayChanged",null);bV=w([V({is:"ytd-playlist-video-renderer"})],bV);var q8a;var r8a;TO("itemSectionRenderer","searchHistoryQueryRenderer","ytd-search-history-query-renderer");var cV=function(){return O.apply(this,arguments)||this}; p(cV,O);cV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; cV.prototype.dataChanged=function(){this.isHistory=-1!==window.location.pathname.indexOf("/feed/history")}; g.Object.defineProperties(cV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===r8a){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===q8a){var d=document.createElement("template");d.innerHTML=""; q8a=d}d=q8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);r8a=a}a=r8a;return a}}}); var dV=cV;w([P(X.YtRendererBehavior),x("design:type",Object)],dV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],dV.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],dV.prototype,"ytdDismissableItemBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],dV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],dV.prototype,"isHistory",void 0);dV=w([V({is:"ytd-search-history-query-renderer"})],dV);var s8a;var t8a;var eV,fV=function(){return O.apply(this,arguments)||this}; p(fV,O);fV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; fV.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&jLa(this.data.navigationEndpoint,this.data.adPlaybackContextParams)}; fV.prototype.dataChanged=function(){this.data&&(this.data.impressionUrls&&!this.data.impressionsFired&&(Yn(this.data.impressionUrls),this.data.impressionsFired=!0),this.data.adBadge||this.set("data.adBadge",eV.DEFAULT_AD_BADGE_RENDERER),this.data.activeView&&UP(this.ytdActiveViewBehavior,this.data.activeView,16))}; fV.prototype.computeThumbnailWidth=function(a,b){return a?"BIG1"===b?340:"BIG2"===b?320:"MEDIUM1"===b?300:"MEDIUM2"===b?280:360:246}; g.Object.defineProperties(fV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===t8a){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===s8a){var d=document.createElement("template");d.innerHTML=""; s8a=d}d=s8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);t8a=a}a=t8a;return a}}}); var gV=eV=fV;eV.prototype.dataChanged=eV.prototype.dataChanged;eV.prototype.onTap=eV.prototype.onTap;gV.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Z),x("design:type",Object)],gV.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],gV.prototype,"ytRendererBehavior",void 0);w([P(VP),x("design:type",Object)],gV.prototype,"ytdActiveViewBehavior",void 0); w([R(),x("design:type",Object)],gV.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],gV.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],gV.prototype,"prominentThumbStyle",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],gV.prototype,"onTap",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],gV.prototype,"dataChanged",null);gV=eV=w([V({is:"ytd-promoted-video-renderer"})],gV);var u8a;var v8a;TO("itemSectionRenderer","searchPyvRenderer","ytd-search-pyv-renderer");var hV=function(){return O.apply(this,arguments)||this}; p(hV,O);hV.prototype.configureRendererStamper=function(){return{"data.ads":{id:"contents",mapping:{promotedVideoRenderer:"ytd-promoted-video-renderer"}}}}; g.Object.defineProperties(hV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===v8a){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===u8a){var d=document.createElement("template");d.innerHTML="";u8a=d}d=u8a;c.call(b,d.content.cloneNode(!0), a.content.firstChild);v8a=a}a=v8a;return a}}}); var iV=hV;w([P(X.YtRendererBehavior),x("design:type",Object)],iV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],iV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],iV.prototype,"data",void 0);iV=w([V({is:"ytd-search-pyv-renderer"})],iV);var w8a;var x8a;var jV=function(){var a=O.apply(this,arguments)||this;a.thumbnailHeight=118;a.buttonClasses_=["arrow"];a.POST_HEIGHT_=200;a.POST_TALL_HEIGHT_=218;return a}; p(jV,O); jV.prototype.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{compactStationRenderer:"ytd-compact-station-renderer",gridChannelRenderer:"ytd-grid-channel-renderer",gridMoviePlaylistRenderer:"ytd-grid-movie-playlist-renderer",gridMovieRenderer:"ytd-grid-movie-renderer",gridPlaylistRenderer:"ytd-grid-playlist-renderer",gridRadioRenderer:"ytd-grid-radio-renderer",gridShowRenderer:"ytd-grid-show-renderer",gridVideoRenderer:"ytd-grid-video-renderer",merchShelfItemRenderer:"ytd-merch-shelf-item-renderer",shoppingCompanionCarouselItemRenderer:"ytd-shopping-companion-item-renderer", displayAdRenderer:"ytd-display-ad-renderer",commentRenderer:"ytd-comment-renderer",compactChannelRecommendationCardRenderer:"ytd-compact-channel-recommendation-card-renderer",postRenderer:"ytd-post-renderer",sharedPostRenderer:"ytd-shared-post-renderer",primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",verticalProductCardRenderer:"ytd-vertical-product-card-renderer"}},"data.previousButton":{id:"left-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}, classListBinding:"[[buttonClasses_]]"}},initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},classListBinding:"[[buttonClasses_]]"}}}}}; jV.prototype.dataChanged_=function(){this.ytdHorizontalListBehavior.reset();this.data&&this.data.items&&this.data.items.some(function(a){return!!a.postRenderer})&&(this.thumbnailHeight=N("enable_taller_posts_on_desktop")?this.POST_TALL_HEIGHT_:this.POST_HEIGHT_,this.ytdHorizontalListBehavior.useFloorScrolling=!0)}; jV.prototype.onThumbnailHeightChanged_=function(a){this.updateStyles({"--ytd-thumbnail-height":a+"px"})}; jV.prototype.computeInitialCountNumber_=function(a){if(!a)return 6;var b=a.items.some(function(c){return!!c.topicRecommendationsChipRenderer}); a=a.items.some(function(c){return!!c.displayAdRenderer}); return b?9:N("desktop_search_prominent_thumbs")&&a?8:6}; g.Object.defineProperties(jV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===x8a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===w8a){var d=document.createElement("template");d.innerHTML=""; w8a=d}d=w8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);x8a=a}a=x8a;return a}}}); var kV=jV;w([P(X.YtRendererBehavior),x("design:type",Object)],kV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],kV.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ.YtdHorizontalListBehavior),x("design:type",Object)],kV.prototype,"ytdHorizontalListBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],kV.prototype,"data",void 0);w([R({observer:"onThumbnailHeightChanged_"}),x("design:type",Object)],kV.prototype,"thumbnailHeight",void 0); w([R(),x("design:type",Array)],kV.prototype,"buttonClasses_",void 0);w([R({computed:"computeInitialCountNumber_(data)"}),x("design:type",Number)],kV.prototype,"initialCount",void 0);kV=w([V({is:"yt-horizontal-list-renderer"})],kV);var y8a;var z8a;var A8a={YtSparklesClickLocationBehavior:{clickTargetMap:null,containerId:null,handleClick:function(a,b){var c=this.getClickTarget_(b);if(c&&this.isClickAllowed_(c)){b.preventDefault();a=(0,y.unsafeClone)(a);var d=this.getContainerBoundingRect();b=this.getRelativeClickXy_(b,d);c={NX:b[0],NY:b[1],NB:c.code};N("enable_dim_macro_on_web")&&(c.DIM=Math.round(d.width)+"x"+Math.round(d.height));this.expandEndpointUrlMacros_(a,c);this.fire("yt-navigate",{endpoint:a})}}, getClickTarget_:function(a){if(!this.clickTargetMap)return null;a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b===this.$.menu)break;if(b=this.clickTargetMap.get(b.id))return b}return null}, getRelativeClickXy_:function(a,b){var c=Math.round(a.detail.x-b.left);a=Math.round(a.detail.y-b.top);return 0>c||0>a?[null,null]:[c,a]}, getContainerBoundingRect:function(){return this.$[this.containerId].getBoundingClientRect()}, expandEndpointUrlMacros_:function(a,b){for(var c=k(a.loggingUrls||[]),d=c.next();!d.done;d=c.next())d=d.value,d.baseUrl&&(d.baseUrl=pw(d.baseUrl,b));a.urlEndpoint&&a.urlEndpoint.url&&(a.urlEndpoint.url=pw(a.urlEndpoint.url,b));a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.url&&(a.commandMetadata.webCommandMetadata.url=pw(a.commandMetadata.webCommandMetadata.url,b))}, configureClickTargets:function(a,b,c){this.containerId=a;this.clickTargetMap=new Map;a=k(b);for(b=a.next();!b.done;b=a.next())if(b=b.value,b.location){var d=c.get(b.location);d&&(this.toggleClass("yt-simple-endpoint",this.isClickAllowed_(b),this.$[d]),this.clickTargetMap.set(d,b))}}, isClickAllowed_:function(a){return"PROMOTED_SPARKLES_CLICK_BEHAVIOR_TYPE_OPEN_AD"===a.behaviorType}}};var lV,mV=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-mute-ad-action":"handleMuteAd"};return a}; p(mV,O);e=mV.prototype; e.configureRendererStamper=function(){return{"data.badge":{id:"badge",mapping:{metadataBadgeRenderer:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.badge]]"}}}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.image":{id:"media",mapping:{thumbnail:{component:"yt-img-shadow",properties:{thumbnail:"[[data.image.thumbnail]]",width:"[[mediaThumbnailWidth]]"}}}},"data.mediaBadge":{id:"media-badge",mapping:{metadataBadgeRenderer:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.mediaBadge]]"}}}}, "data.mediaHoverOverlay":{id:"media-hover-overlay",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.ctaButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.dataChanged=function(){this.clickCommand=this.get("data.clickCommand.commandExecutorCommand.commands.0");this.clickCommand||(this.clickCommand=this.get("data.clickCommand"));this.clickCommand&&(this.updateMediaBackgroundImage(),this.ytSparklesClickLocationBehavior.configureClickTargets("root",lV.DEFAULT_CLICK_LOCATION_BEHAVIOR,lV.CLICK_LOCATION_ID_MAP))}; e.onTap=function(a){this.clickCommand&&this.ytSparklesClickLocationBehavior.handleClick(this.clickCommand,a)}; e.updateMediaBackgroundImage=function(){var a=this.get("data.image.thumbnail.thumbnails");a&&(a=wO(a,0))&&this.updateStyles({"--ytd-display-ad-media-background-image":"url("+a+")"})}; e.impressionLog=function(){if((!this.data||!this.data.impressionsFired)&&this.data&&this.data.impressionEndpoints){for(var a=0;a
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===y8a){var d=document.createElement("template");d.innerHTML=""; y8a=d}d=y8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);z8a=a}a=z8a;return a}}}); var nV=lV=mV;lV.prototype.onTap=lV.prototype.onTap;lV.prototype.dataChanged=lV.prototype.dataChanged;nV.VERTICAL_CAROUSEL_ITEM_IMAGE_WIDTH=135;nV.CLICK_LOCATION_ID_MAP=new Map([["PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND","root"]]);nV.DEFAULT_CLICK_LOCATION_BEHAVIOR=[{location:"PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND",code:2,behaviorType:"PROMOTED_SPARKLES_CLICK_BEHAVIOR_TYPE_OPEN_AD"}];w([P(X.YtRendererBehavior),x("design:type",Object)],nV.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],nV.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],nV.prototype,"ytdDismissableItemBehavior",void 0);w([P(CQ),x("design:type",Object)],nV.prototype,"ytdReduxBehavior",void 0);w([P(A8a.YtSparklesClickLocationBehavior),x("design:type",Object)],nV.prototype,"ytSparklesClickLocationBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],nV.prototype,"actionHandlerBehavior",void 0); w([R(),x("design:type",Object)],nV.prototype,"data",void 0);w([R(),x("design:type",Object)],nV.prototype,"clickCommand",void 0);w([R({reflectToAttribute:!0,selector:qT}),x("design:type",Boolean)],nV.prototype,"miniMode",void 0);w([R({reflectToAttribute:!0}),BE("data.layout"),x("design:type",String),x("design:paramtypes",[])],nV.prototype,"layout",null);w([BE("data.layout"),x("design:type",Object),x("design:paramtypes",[])],nV.prototype,"mediaThumbnailWidth",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nV.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],nV.prototype,"onTap",null);nV=lV=w([V({is:"ytd-display-ad-renderer"})],nV);var B8a;var C8a;var D8a=function(){return O.apply(this,arguments)||this}; p(D8a,O); g.Object.defineProperties(D8a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===C8a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B8a){var d=document.createElement("template");d.innerHTML=""; B8a=d}d=B8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);C8a=a}a=C8a;return a}}}); var oV=D8a;w([P(X.YtRendererBehavior),x("design:type",Object)],oV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],oV.prototype,"data",void 0);oV=w([V({is:"ytd-compact-station-renderer"})],oV);var E8a;var F8a;var G8a=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;return a}; p(G8a,O); g.Object.defineProperties(G8a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===F8a){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===E8a){var d=document.createElement("template");d.innerHTML=""; E8a=d}d=E8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);F8a=a}a=F8a;return a}}}); var pV=G8a;w([P(X.YtRendererBehavior),x("design:type",Object)],pV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],pV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],pV.prototype,"isPrimetimeRedesign",void 0);pV=w([V({is:"ytd-panel-show-style-metadata-renderer"})],pV);var H8a;var I8a;var qV=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;return a}; p(qV,O);e=qV.prototype;e.onDataChange=function(){this.isPrimetimeRedesign=!!this.data&&!!this.data.buttonText}; e.configureRendererStamper=function(){return{"data.metadata":{id:"panel-metadata",mapping:{panelShowStyleMetadataRenderer:{component:"ytd-panel-show-style-metadata-renderer",properties:{isPrimetimeRedesign:"[[isPrimetimeRedesign]]"}}}}}}; e.computeThumbnail=function(a){if(a)return a.smallFormFactorBackgroundThumbnail||a.largeFormFactorBackgroundThumbnail}; e.computeThumbnailWidth=function(a){return a?9999:321}; e.shouldHideActionButton=function(a,b){return!(b&&a&&a.buttonText)}; g.Object.defineProperties(qV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I8a){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H8a){var d=document.createElement("template");d.innerHTML=""; H8a=d}d=H8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I8a=a}a=I8a;return a}}}); var rV=qV;rV.prototype.onDataChange=rV.prototype.onDataChange;w([P(X.YtRendererBehavior),x("design:type",Object)],rV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],rV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],rV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],rV.prototype,"isPrimetimeRedesign",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],rV.prototype,"onDataChange",null);rV=w([V({is:"ytd-primetime-promo-panel-renderer"})],rV);var J8a;var K8a;var sV={};sV.YtMacroReplacementBehavior=[W.YtActionSenderBehavior,{sendServiceRequestAction:function(a){if(a&&1==a.length&&Array.isArray(a[0].loggingUrls)){a=y.unsafeClone(a[0]);var b=this.macros||{},c=this.getAdModuleClient_();if(!c)return Qi();a.loggingUrls.forEach(function(d){if(d.baseUrl){var f=d.baseUrl;var h=b;h=void 0===h?{}:h;f=c.getOptions().includes("replaceUrlMacros")?E2a(c,"replaceUrlMacros",{url:f,additionalMapping:h}):f;d.baseUrl=f}},this); a=[a]}return W.YtActionSenderBehavior.sendServiceRequestAction.call(this,a)}, getAdModuleClient_:function(){var a=KM(this);return a?(a=a.getPlayer())?new LQ(a):null:null}}];var tV=function(){return O.apply(this,arguments)||this}; p(tV,O);tV.prototype.getMacros=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}; tV.prototype.onTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint})}; g.Object.defineProperties(tV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===K8a){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n [[getSimpleString(data.headline)]]\n [[getSimpleString(data.priceText)]]\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J8a){var d=document.createElement("template");d.innerHTML=""; J8a=d}d=J8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K8a=a}a=K8a;return a}}}); var uV=tV;w([P(X.YtRendererBehavior),x("design:type",Object)],uV.prototype,"ytRendererBehavior",void 0);w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],uV.prototype,"ytMacroReplacementBehavior",void 0);w([R(),x("design:type",Object)],uV.prototype,"data",void 0);w([R({computed:"getMacros(data)"}),x("design:type",Object)],uV.prototype,"macros",void 0);uV=w([V({is:"ytd-shopping-companion-item-renderer"})],uV);var L8a;var M8a;var vV=function(){return O.apply(this,arguments)||this}; p(vV,O);vV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:N("defer_menus")?0:void 0,waitForSignal:"eocs"}}}; vV.prototype.dataChanged=function(a){a=this.get("colorExtractionPalette.section1Color",a);a=PN(a);this.updateStyles({"--ytd-channel-recommendation-card-avatar-overlay-color":a})}; vV.prototype.computeCardStyle=function(a){return this.get("style.value",a)||null}; g.Object.defineProperties(vV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===M8a){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n \n \n \n
\n
\n [[getSimpleString(data.channelTitle)]]\n
\n
\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L8a){var d=document.createElement("template");d.innerHTML=""; L8a=d}d=L8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);M8a=a}a=M8a;return a}}}); var wV=vV;w([P(X.YtRendererBehavior),x("design:type",Object)],wV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],wV.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],wV.prototype,"ytdDismissableItemBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],wV.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeCardStyle(data)"}),x("design:type",String)],wV.prototype,"cardStyle",void 0); wV=w([V({is:"ytd-compact-channel-recommendation-card-renderer"})],wV);var N8a;var O8a;var xV=function(){return O.apply(this,arguments)||this}; p(xV,O);xV.prototype.dataChanged=function(){this.isNoPriceFormat=this.isUsFormat=this.isEuFormat=!1;this.data.price?"REGIONAL_FORMAT_EU"===this.data.regionFormat?this.isEuFormat=!0:this.isUsFormat=!0:this.isNoPriceFormat=!0}; xV.prototype.computeAriaLabel=function(){return this.data&&this.data.accessibilityTitle?this.data.accessibilityTitle:this.data.title+", "+this.data.price+", "+this.data.additionalFeesText+", "+this.data.vendorName}; g.Object.defineProperties(xV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===O8a){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n
\n
[[data.title]]
\n \n \n \n \n
[[data.description]]
\n
\n
\n
\n
[[data.buttonText]]
\n \n \n
\n
\n\n
\n \n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===N8a){var d=document.createElement("template");d.innerHTML=""; N8a=d}d=N8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);O8a=a}a=O8a;return a}}}); var yV=xV;yV.prototype.dataChanged=yV.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],yV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],yV.prototype,"data",void 0);w([R(),x("design:type",Boolean)],yV.prototype,"isEuFormat",void 0);w([R(),x("design:type",Boolean)],yV.prototype,"isUsFormat",void 0);w([R(),x("design:type",Boolean)],yV.prototype,"isNoPriceFormat",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],yV.prototype,"dataChanged",null);yV=w([V({is:"ytd-merch-shelf-item-renderer"})],yV);var P8a;var Q8a;var zV=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p(zV,O);e=zV.prototype;e.attached=function(){this.requestElementsPerRow()}; e.configureRendererStamper=function(){return{"data.actionButton":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.dataChanged=function(){this.hideThumbnail=!1;this.requestElementsPerRow()}; e.computeViewStyle=function(a){return a.style?a.style:"COMPACT_PROMOTED_ITEM_STYLE_UNSPECIFIED"}; e.onUpdateElementsPerRowAction=function(a){this.hideThumbnail="COMPACT_PROMOTED_ITEM_STYLE_RICH_GRID"===this.viewStyle&&1===a}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; g.Object.defineProperties(zV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Q8a){var a=document.createElement("template");a.innerHTML="
\n\n
\n
\n

\n \n

\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===P8a){var d=document.createElement("template");d.innerHTML=""; P8a=d}d=P8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Q8a=a}a=Q8a;return a}}}); var AV=zV;AV.prototype.dataChanged=AV.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],AV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],AV.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],AV.prototype,"ytdDismissableItemBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],AV.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],AV.prototype,"data",void 0); w([R({value:!1}),x("design:type",Boolean)],AV.prototype,"hideThumbnail",void 0);w([R({reflectToAttribute:!0,computed:"computeViewStyle(data)"}),x("design:type",String)],AV.prototype,"viewStyle",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],AV.prototype,"dataChanged",null);AV=w([V({is:"ytd-compact-promoted-item-renderer"})],AV);var R8a;var S8a;var BV=function(){return O.apply(this,arguments)||this}; p(BV,O);BV.prototype.configureRendererStamper=function(){return{shownItems:{id:"grid-container",mapping:{channelRenderer:"ytd-channel-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:"ytd-video-renderer"}}}}; BV.prototype.fillRestIfNoShowMore=function(a,b){!a.showMoreText&&b&&this.ytLazyListBehavior.fillRemainingListItems()}; BV.prototype.onShowMoreClick=function(){this.ytLazyListBehavior.fillRemainingListItems()}; BV.prototype.computeViewAllHidden=function(a,b){return a||!b.viewAllEndpoint}; g.Object.defineProperties(BV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===S8a){var a=document.createElement("template");a.innerHTML="
\n\n \n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===R8a){var d=document.createElement("template");d.innerHTML=""; R8a=d}d=R8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);S8a=a}a=S8a;return a}}}); var CV=BV;CV.prototype.fillRestIfNoShowMore=CV.prototype.fillRestIfNoShowMore;w([P(X.YtRendererBehavior),x("design:type",Object)],CV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],CV.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ),x("design:type",Object)],CV.prototype,"ytLazyListBehavior",void 0);w([R(),x("design:type",Object)],CV.prototype,"data",void 0); w([U("data","canShowMore"),x("design:type",Function),x("design:paramtypes",[Object,Boolean]),x("design:returntype",void 0)],CV.prototype,"fillRestIfNoShowMore",null);CV=w([V({is:"ytd-expanded-shelf-contents-renderer"})],CV);var T8a;var U8a;TO("itemSectionRenderer","shelfRenderer","ytd-shelf-renderer");var DV=function(){return O.apply(this,arguments)||this}; p(DV,O);e=DV.prototype; e.configureRendererStamper=function(){return{"data.content":{id:"contents",mapping:{gridRenderer:"ytd-grid-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:118}},horizontalMovieListRenderer:{component:"yt-horizontal-list-renderer",params:{thumbnailHeight:302}},expandedShelfContentsRenderer:"ytd-expanded-shelf-contents-renderer",messageRenderer:{component:"ytd-message-renderer",params:{shelf:!0}},verticalListRenderer:{component:"ytd-vertical-list-renderer",properties:{isSearch:"[[isSearch]]"}}}}, "data.playAllButton":{id:"play-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"}}}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},dismissedRenderer:{id:"dismissed", mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.computeThumbnailStyle=function(a){return a||""}; e.computePlaceAnnotationUnderTitle=function(a){return"CHANNEL_THUMBNAIL_STYLE_BOXART"===a.thumbnailStyle}; e.onDataChange=function(a){a&&a.content&&a.content.horizontalListRenderer&&!a.content.horizontalListRenderer.items&&(a.content.horizontalListRenderer=void 0)}; e.onLockupRequested=function(a){if(this.data&&this.data.content&&this.data.content.gridRenderer&&this.data.content.gridRenderer.items&&a.detail&&a.detail.videoIds){for(var b=this.data.content.gridRenderer.items,c=new Set,d=k(a.detail.videoIds),f=d.next();!f.done;f=d.next())c.add(f.value);a.detail.returnValue=b.filter(function(h){return h.gridVideoRenderer&&h.gridVideoRenderer.videoId&&c.has(h.gridVideoRenderer.videoId)}).map(function(h){return h.gridVideoRenderer})}}; g.Object.defineProperties(DV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===U8a){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===T8a){var d=document.createElement("template");d.innerHTML=""; T8a=d}d=T8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);U8a=a}a=U8a;return a}}}); var EV=DV;EV.prototype.onLockupRequested=EV.prototype.onLockupRequested;EV.prototype.onDataChange=EV.prototype.onDataChange;w([P(Z),x("design:type",Object)],EV.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],EV.prototype,"ytdDismissableItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],EV.prototype,"ytRendererBehavior",void 0);w([P(Polymer.IronResizableBehavior),x("design:type",Object)],EV.prototype,"ironResizableBehavior",void 0); w([R(),x("design:type",Object)],EV.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],EV.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_fluid_dismiss")}}), x("design:type",Boolean)],EV.prototype,"enableFluidDismiss",void 0);w([R({reflectToAttribute:!0,computed:"computeThumbnailStyle(data.thumbnailStyle)"}),x("design:type",String)],EV.prototype,"thumbnailStyle",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],EV.prototype,"onDataChange",null); w([S("yt-lockup-requested"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],EV.prototype,"onLockupRequested",null);EV=w([V({is:"ytd-shelf-renderer"})],EV);var V8a;var W8a;var FV=function(){return O.apply(this,arguments)||this}; p(FV,O);e=FV.prototype;e.configureRendererStamper=function(){return{visibleItems:{id:"items",mapping:{channelRenderer:"ytd-channel-renderer",playlistRenderer:"ytd-playlist-renderer",radioRenderer:"ytd-radio-renderer",showRenderer:"ytd-show-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isSearch:"[[isSearch]]"}}}}}}; e.computeVisibleItems=function(a,b){return void 0!==a&&a.items?b?a.items.slice(0,this.data.collapsedItemCount):a.items:[]}; e.computeHideShowMore=function(a,b,c){return a>=b||!c}; e.computeHideShowAll=function(a,b,c){return!(a&&b)||c}; e.onMoreClick=function(){this.collapsed=!1}; g.Object.defineProperties(FV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===W8a){var a=document.createElement("template");a.innerHTML="
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===V8a){var d=document.createElement("template");d.innerHTML=""; V8a=d}d=V8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);W8a=a}a=W8a;return a}}}); var GV=FV;w([P(X.YtRendererBehavior),x("design:type",Object)],GV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],GV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],GV.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],GV.prototype,"isSearch",void 0);w([R({computed:"computeVisibleItems(data,collapsed)"}),x("design:type",Array)],GV.prototype,"visibleItems",void 0); w([R({value:!0}),x("design:type",Boolean)],GV.prototype,"collapsed",void 0);w([R({computed:"computeHideShowMore(data.collapsedItemCount,data.items.length,collapsed)"}),x("design:type",Boolean)],GV.prototype,"hideShowMore",void 0);w([R({computed:"computeHideShowAll(data.expandedStateButtonEndpoint,\n data.expandedStateButtonText,collapsed)",value:!0}),x("design:type",Boolean)],GV.prototype,"hideShowAll",void 0);GV=w([V({is:"ytd-vertical-list-renderer"})],GV);var X8a;var Y8a;var HV=function(){return O.apply(this,arguments)||this}; p(HV,O);HV.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}},"data.exploreButton":{id:"explore-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0},noInjection:!0}}}}}; HV.prototype.onTextWrapperTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!NR(Polymer.dom(a).path||[],this,["A".toString(),"BUTTON".toString()])&&this.fire("yt-navigate",{endpoint:b})}; HV.prototype.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically&&this.ytRendererBehavior.sendServiceRequestAction([a])}; g.Object.defineProperties(HV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Y8a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n
\n \n
\n
\n
\n\n \n\n \n \n\n \n\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===X8a){var d=document.createElement("template");d.innerHTML=""; X8a=d}d=X8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Y8a=a}a=Y8a;return a}}}); var IV=HV;w([P(X.YtRendererBehavior),x("design:type",Object)],IV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],IV.prototype,"ytRendererstamperBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],IV.prototype,"ytdLockupBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],IV.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],IV.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],IV.prototype,"prominentThumbStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],IV.prototype,"leftAligned",void 0);IV=w([V({is:"ytd-movie-renderer"})],IV);var Z8a;var $8a;var a9a=[kO.YtComponentBehavior,{_noAccessors:!0,created:function(){this.loadPlayerCssPromise_=this.loadPlayerJsPromise_=null;this.playerCssTagId_="player-css"}, loadPlayerJs_:function(){Ka("yt.player.Application")?this.loadPlayerJsPromise_=Qi():this.loadPlayerJsPromise_||(this.loadPlayerJsPromise_=new Oi(function(a){var b=ng("SCRIPT");b.addEventListener("load",a);a=ph(A("PLAYER_JS_URL"));yc(b,a);document.querySelector("head").appendChild(b)})); return this.loadPlayerJsPromise_}, loadPlayerCss_:function(){var a=this;if(this.loadPlayerCssPromise_)return this.loadPlayerCssPromise_;document.querySelector("link#"+this.playerCssTagId_)?this.loadPlayerCssPromise_=Qi():this.loadPlayerCssPromise_=new Oi(function(b){var c=A("PLAYER_CSS_URL"),d=document.createElement("link");d.id=a.playerCssTagId_;d.rel="stylesheet";d.addEventListener("load",b);d.href=c;document.querySelector("head").appendChild(d)}); return this.loadPlayerCssPromise_}, loadPlayer:function(){return Ti([this.loadPlayerJs_(),this.loadPlayerCss_()])}, preparePlayer:function(){return this.loadPlayer()}}];var b9a={},JV=(b9a[0]=[],b9a[1]=[],b9a);function c9a(){for(var a=0;a=a.getScrollTop()?Polymer.Gestures.setTouchAction(this,"pan-down"):Polymer.Gestures.setTouchAction(this,"manipulation")}}, onPinchOut_:function(){this.getPlayerPromise().then(function(a){a.isFullscreen()||a.toggleFullscreen()})}, onPinchIn_:function(){this.getPlayerPromise().then(function(a){a.isFullscreen()&&a.toggleFullscreen()})}, getInternalContainer:function(){return this.$.container}, release_:function(){this.player_&&(this.player_.removeEventListener("onReady",this.onPlayerReadyEvent_),this.player_.stopVideo&&this.player_.stopVideo(),this.loadedVideo_=this.playerContainer_=this.player_=null,this.playerResolver_.promise.then(function(b){b.destroy()})); var a=this.playerResolver_;this.playerResolver_=Ui();this.playerResolver_.promise.then(a.resolve);this.fire("yt-player-released")}, shouldSuppressAbandonmentPing_:function(a){var b=this.getInterface(IM);return b.isOnWatch()&&b.getCurrentPage().playlistData&&!a.watchEndpoint?!0:!1}, updatePlayerRelated_:function(a,b){var c=this,d,f,h,l,m,n,r,v,z,C,J,E,T;return Aa(function(la){if(1==la.nextAddress){if(!a.results||!a.results.length)return la.return();if(b)for(f=0,h=b.sets.length;f
\n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content, c=b.insertBefore;if(void 0===Z8a){var d=document.createElement("template");d.innerHTML="";Z8a=d}d=Z8a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$8a=a}a=$8a;return a}}}); var g9a=KV;w([P(f9a),x("design:type",Object)],g9a.prototype,"ytPlayerBehavior",void 0);g9a=w([V({is:"ytd-player"})],g9a);var h9a;var i9a;var j9a=function(){return O.apply(this,arguments)||this}; p(j9a,O); g.Object.defineProperties(j9a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===i9a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n \n \n
\n \n \n \n \n \n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h9a){var d=document.createElement("template");d.innerHTML=""; h9a=d}d=h9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);i9a=a}a=i9a;return a}}}); var LV=j9a;w([R(),x("design:type",Object)],LV.prototype,"data",void 0);w([P(u2a),x("design:type",Object)],LV.prototype,"ytVideoPlayerRendererBehavior",void 0);LV=w([V({is:"ytd-channel-video-player-renderer"})],LV);var k9a;var l9a,MV=function(){if(void 0!==l9a)return l9a;var a=document.createElement("template");a.innerHTML=""; return l9a=a};var m9a;TO("itemSectionRenderer","carouselItemRenderer","ytd-carousel-item-renderer");var NV=function(){var a=O.apply(this,arguments)||this;a.dotMenuVisible_=!1;a.active=!0;return a}; p(NV,O);e=NV.prototype;e.configureRendererStamper=function(){return{currentItem_:{id:"carousel-item",mapping:{defaultPromoPanelRenderer:{component:"ytd-default-promo-panel-renderer",attributes:{autoplay:!0},properties:{disableGridStateAware:"[[disableGridStateAware]]",useBrowseWidth:"[[data.paginationThumbnails]]",layoutStyle:"[[data.layoutStyle]]"}}}}}}; e.created=function(){this.ytdGridStateAwareBehavior.gridStateAwareSizingElementSelector="#pagination-thumbnails"}; e.detached=function(){this.jobId_&&Fk.cancelJob(this.jobId_)}; e.setNextCarouselItem=function(){this.shouldRotate_()&&this.setCarouselItem(this.currentItemIndex_+1)}; e.setCarouselItem=function(a){a>=this.data.carouselItems.length&&this.loopCount_++;this.jobId_&&Fk.cancelJob(this.jobId_);var b=this.getCurrentPanelElement_();b&&b.stopVideo();this.currentItemIndex_=a%this.data.carouselItems.length;this.currentItem_=this.data.carouselItems[this.currentItemIndex_];this.currentItemHasVideo()?(b||(b=this.getCurrentPanelElement_()),b.playVideo()):this.startRotationJob_()}; e.onDataChanged=function(){this.data&&(this.loopCount_=0,void 0!==this.data.autoRotateDurationMs&&(this.rotationTimeout=this.data.autoRotateDurationMs),this.setCarouselItem(0))}; e.getCurrentPanelElement_=function(){return Polymer.dom(this.$["carousel-item"]).querySelector("ytd-default-promo-panel-renderer")}; e.getCurrentPaginationElement_=function(){return Polymer.dom(this.$["pagination-thumbnails"]).querySelector(".ytd-carousel-item-renderer.selected")}; e.getNavigationClass_=function(a,b){return a===b?"selected":""}; e.getNavigationDurationStyle_=function(a){a=this.get("data.carouselItems."+a+".defaultPromoPanelRenderer.minPanelDisplayDurationMs")||0;return ec({"animation-duration":a+"ms"})}; e.onNavigationTap_=function(a){var b=this,c=a.model.index;c!==this.currentItemIndex_&&(this.getCurrentPanelElement_().transitionOut().then(function(){b.setCarouselItem(c)}),this.loopCount_=3)}; e.onVideoThumbnailEnded_=function(){var a=this;if(this.shouldRotate_()){var b=this.getCurrentPaginationElement_();b&&(b.classList.add("finished"),this.getCurrentPanelElement_().transitionOut().then(function(){b.classList.remove("finished");a.setNextCarouselItem()}))}}; e.onVideoThumbnailError_=function(){this.startRotationJob_()}; e.onVideoNotPlaying_=function(){this.startRotationJob_()}; e.currentItemHasVideo=function(){return!!this.get("defaultPromoPanelRenderer.videoThumbnail",this.currentItem_)||!!this.get("defaultPromoPanelRenderer.inlinePlaybackRenderer",this.currentItem_)}; e.startRotationJob_=function(){var a=this;Fk.cancelJob(this.jobId_);this.shouldRotate_()&&this.rotationTimeout&&(this.jobId_=Ck(Fk,function(){a.getCurrentPanelElement_().transitionOut().then(function(){a.setNextCarouselItem()})},this.rotationTimeout))}; e.computeDotMenuVisible_=function(a){return!!a.carouselItems&&1this.loopCount_}; e.activeChanged=function(){this.data&&(this.active?this.setCarouselItem(this.currentItemIndex_):this.currentItem_=void 0)}; g.Object.defineProperties(NV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===m9a){var a=document.createElement("template");a.innerHTML="
\n\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(MV().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===k9a){var d=document.createElement("template");d.innerHTML=""; k9a=d}d=k9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);m9a=a}a=m9a;return a}}}); var OV=NV;OV.prototype.activeChanged=OV.prototype.activeChanged;OV.prototype.onVideoNotPlaying_=OV.prototype.onVideoNotPlaying_;OV.prototype.onVideoThumbnailError_=OV.prototype.onVideoThumbnailError_;OV.prototype.onVideoThumbnailEnded_=OV.prototype.onVideoThumbnailEnded_;OV.prototype.onDataChanged=OV.prototype.onDataChanged;w([P(uQ),x("design:type",Object)],OV.prototype,"ytdGridStateAwareBehavior",void 0);w([P(xQ),x("design:type",Object)],OV.prototype,"ytdGuideStateAwareBehavior",void 0); w([P(Z),x("design:type",Object)],OV.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],OV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],OV.prototype,"data",void 0);w([R(),x("design:type",Object)],OV.prototype,"currentItem_",void 0);w([R(),x("design:type",Number)],OV.prototype,"currentItemIndex_",void 0);w([R(),x("design:type",Number)],OV.prototype,"rotationTimeout",void 0); w([R(),x("design:type",Number)],OV.prototype,"loopCount_",void 0);w([R({computed:"computePaginatorAlignment_(data)",reflectToAttribute:!0}),x("design:type",String)],OV.prototype,"paginatorAlignment",void 0);w([R(),x("design:type",Number)],OV.prototype,"jobId_",void 0);w([R({computed:"computeDotMenuVisible_(data)"}),x("design:type",Object)],OV.prototype,"dotMenuVisible_",void 0);w([R(),x("design:type",Object)],OV.prototype,"active",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OV.prototype,"onDataChanged",null);w([S("yt-video-thumbnail-ended"),S("yt-default-promo-panel-renderer-rotate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OV.prototype,"onVideoThumbnailEnded_",null);w([S("yt-video-thumbnail-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OV.prototype,"onVideoThumbnailError_",null); w([S("yt-video-thumbnail-not-playing"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OV.prototype,"onVideoNotPlaying_",null);w([U("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OV.prototype,"activeChanged",null);OV=w([V({is:"ytd-carousel-item-renderer"})],OV);var n9a;var o9a;var PV=function(){var a=O.apply(this,arguments)||this;a.animationEnabled=N("enable_web_ketchup_hero_animation");a.transitioningOut=!1;a.useBrowseWidth=!1;a.narrow_=!1;a.videoTimeout_=0;a.panelTimeout_=0;a.actionMap={"yt-window-resized":"onWindowResized_"};return a}; p(PV,O);e=PV.prototype;e.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.created=function(){this.ytdGuideStateAwareBehavior.gridStateAwareSizingElementSelector="#content"}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.onWindowResized_()}; e.detached=function(){this.clearTimeouts_()}; e.onWindowResized_=function(){var a;this.narrow_=16*this.clientHeight/9>this.clientWidth;this.$.player&&(null===(a=this.data)||void 0===a?0:a.inlinePlaybackRenderer)&&this.$.player.resize()}; e.computePanelLayout_=function(a){return a&&a.panelLayout||"DEFAULT_PROMO_PANEL_RENDERER_LAYOUT_A"}; e.playVideo=function(){var a,b;this.$.video&&(null===(a=this.data)||void 0===a?0:a.videoThumbnail)&&this.$.video.play();this.$.player&&(null===(b=this.data)||void 0===b?0:b.inlinePlaybackRenderer)&&this.$.player.play()}; e.stopVideo=function(){var a,b;this.$.video&&(null===(a=this.data)||void 0===a?0:a.videoThumbnail)&&this.$.video.stop();this.$.player&&(null===(b=this.data)||void 0===b?0:b.inlinePlaybackRenderer)&&this.$.player.stop()}; e.transitionOut=function(){var a=this;this.transitioningOut=!0;return new Promise(function(b){var c=function(){a.$["action-button"].removeEventListener("animationend",c);Fk.cancelJob(d);b();a.transitioningOut=!1}; var d=Bk(Fk,c,1E3);a.$["action-button"].addEventListener("animationend",c);a.$.player&&(a.$.player.playing=!1)})}; e.computeMetadataOrder_=function(a){return a&&a.metadataOrder&&"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_UNSPECIFIED"!==a.metadataOrder?a.metadataOrder:"DEFAULT_PROMO_PANEL_RENDERER_METADATA_ORDER_TITLE_DESCRIPTION"}; e.dataChanged=function(){this.clearTimeouts_();this.setBackgroundImage_(this.data);this.setScrimLayer_(this.data);this.startPanelTimeout_()}; e.setBackgroundImage_=function(a){(a=this.getBackgroundImageUrl_(a))&&(this.$.hero.style["background-image"]="url("+a+")")}; e.setScrimLayer_=function(a){var b=this.getScrimLayerColorStops_(a);a=((null===a||void 0===a?void 0:a.scrimRotation)||0)+180;"rtl"==A("HTML_DIR",void 0)&&(a=-a);b&&(this.$.scrim.style["background-image"]="linear-gradient("+a+"deg, "+b+")")}; e.getScrimLayerColorStops_=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.scrimColorValues;if(!b)return null;if(1==b.length)return b=QN(b[0]),b+" 0%, "+b+" 100%";if(3==b.length){var c=[0,72,98];return b.map(function(d,f){return QN(d)+" "+c[f]+"%"}).join(",")}return null}; e.getBackgroundImageUrl_=function(a){return a&&a.largeFormFactorBackgroundThumbnail?wO((a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.landscape||a.largeFormFactorBackgroundThumbnail.thumbnailLandscapePortraitRenderer.portrait).thumbnails,screen.width):null}; e.onPlaying_=function(){this.startVideoTimeout_()}; e.onEnded_=function(){this.rotate_()}; e.startPanelTimeout_=function(){var a=this;if(!this.panelTimeout_){var b=this.get("data.minPanelDisplayDurationMs");b&&(this.panelTimeout_=Bk(Fk,function(){return a.rotate_()},b))}}; e.startVideoTimeout_=function(){var a=this;if(!this.videoTimeout_){var b=this.get("data.minVideoPlayDurationMs");b&&(this.videoTimeout_=Bk(Fk,function(){return a.rotate_()},b))}}; e.clearTimeouts_=function(){Fk.cancelJob(this.panelTimeout_);this.panelTimeout_=0;Fk.cancelJob(this.videoTimeout_);this.videoTimeout_=0}; e.rotate_=function(){this.clearTimeouts_();this.fire("yt-default-promo-panel-renderer-rotate")}; g.Object.defineProperties(PV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===o9a){var a=document.createElement("template");a.innerHTML="
\n\n\n\n\n
\n\n
\n \n \n \n

[[getSimpleString(data.title)]]

\n \n
\n
\n
\n"; a.content.insertBefore(MV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n9a){var d=document.createElement("template");d.innerHTML=""; n9a=d}d=n9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);o9a=a}a=o9a;return a}}}); var QV=PV;QV.prototype.onEnded_=QV.prototype.onEnded_;QV.prototype.onPlaying_=QV.prototype.onPlaying_;QV.prototype.dataChanged=QV.prototype.dataChanged;w([P(uQ),x("design:type",Object)],QV.prototype,"ytdGridStateAwareBehavior",void 0);w([P(xQ),x("design:type",Object)],QV.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(R0a.YtBooleanLogicBehavior),x("design:type",Object)],QV.prototype,"ytBooleanLogicBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],QV.prototype,"ytActionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],QV.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],QV.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],QV.prototype,"data",void 0);w([R({computed:"computePanelLayout_(data)",reflectToAttribute:!0}),x("design:type",String)],QV.prototype,"panelLayout",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],QV.prototype,"animationEnabled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],QV.prototype,"transitioningOut",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],QV.prototype,"useBrowseWidth",void 0);w([R({computed:"computeMetadataOrder_(data)"}),x("design:type",Boolean)],QV.prototype,"metadataOrder",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],QV.prototype,"narrow_",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],QV.prototype,"layoutStyle",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QV.prototype,"dataChanged",null);w([S("yt-default-promo-panel-renderer-playing"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QV.prototype,"onPlaying_",null); w([S("yt-default-promo-panel-renderer-ended"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QV.prototype,"onEnded_",null);QV=w([V({is:"ytd-default-promo-panel-renderer"})],QV);var p9a;var q9a;var RV=function(){var a=O.apply(this,arguments)||this;a.playing=!1;a.playerId_="ytd-default-promo-panel-renderer-inline-playback-renderer-"+Sa(a);a.active_=!1;return a}; p(RV,O);e=RV.prototype;e.detached=function(){this.stop()}; e.play=function(){return Za(this,function b(){var c=this,d,f,h,l,m,n,r,v,z,C,J,E;return za(b,function(T){if(1==T.nextAddress){d=c;f=A("FILLER_DATA",{});h=!!f.player;l=A("WEB_PLAYER_CONTEXT_CONFIGS",{});m=!!l.WEB_PLAYER_CONTEXT_CONFIG_ID_KEVLAR_VERTICAL_LANDING_PAGE_PROMO;if(!h&&!m)return T.return();c.active_=!0;n=c.get("data.inlinePlaybackEndpoint.watchEndpoint");r=n.videoId||c.data.videoId;v=n.startTimeSeconds||0;z=n.playerParams||null;m?C={args:{video_id:r,startSeconds:v,player_params:z}}:(C=Object.assign({}, f.player),C.args=Object.assign({},C.args||{},{autoplay:!0,video_id:r,mute:1,mutedautoplay:1,startSeconds:v,controls:0,showinfo:0,iv_load_policy:3,rel:0,el:"profilepage",player_params:z,player_response:void 0}),C.attrs=Object.assign({},C.attrs||{},{id:c.playerId_}));J=c.$.player;J.update(C);return q(T,J.getPlayerPromise(),2)}E=T.yieldResult;E.addEventListener("onStateChange",function(la){return d.onPlayerStateChange_(la)}); ra(T)})})}; e.onPlayerStateChange_=function(a){if(this.active_)switch(this.playing=1===a,a){case 1:this.fire("yt-default-promo-panel-renderer-playing");break;case 0:this.fire("yt-default-promo-panel-renderer-ended");}}; e.stop=function(){this.$.player.stop();this.playing=this.active_=!1}; e.resize=function(){return Za(this,function b(){var c=this,d;return za(b,function(f){if(1==f.nextAddress)return q(f,c.$.player.getPlayerPromise(),2);d=f.yieldResult;d.setSize(NaN,NaN);ra(f)})})}; g.Object.defineProperties(RV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===q9a){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p9a){var d=document.createElement("template");d.innerHTML=""; p9a=d}d=p9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);q9a=a}a=q9a;return a}}}); var SV=RV;w([R(),x("design:type",Object)],SV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],SV.prototype,"playing",void 0);w([R(),x("design:type",Object)],SV.prototype,"playerId_",void 0);SV=w([V({is:"ytd-default-promo-panel-renderer-inline-playback-renderer"})],SV);var r9a;var s9a;var t9a;var u9a;Polymer({is:"yt-search-query-correction",_template:function(){if(void 0!==u9a)return u9a;var a=document.createElement("template");a.innerHTML="\n\n \n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t9a){var d=document.createElement("template");d.innerHTML=""; t9a=d}d=t9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return u9a=a}, behaviors:[kO.YtComponentBehavior],properties:{correctedText:Object,correctedQuery:Object,correctedEndpoint:Object,originalText:Object,originalQuery:{type:Object,value:null},originalEndpoint:{type:Object,value:null},showOriginalQueryWithoutEndpoint:{type:Boolean,value:!1,computed:"computeShowOriginalQueryWithoutEndpoint_(originalQuery, originalEndpoint)"}},computeShowOriginalQueryWithoutEndpoint_:function(a,b){return!(!a||b)}});TO("itemSectionRenderer","didYouMeanRenderer","yt-did-you-mean-renderer"); Polymer({is:"yt-did-you-mean-renderer",_template:function(){if(void 0!==s9a)return s9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r9a){var d=document.createElement("template");d.innerHTML="";r9a=d}d=r9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return s9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var v9a;var w9a;TO("itemSectionRenderer","includingResultsForRenderer","yt-including-results-for-renderer"); Polymer({is:"yt-including-results-for-renderer",_template:function(){if(void 0!==w9a)return w9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v9a){var d=document.createElement("template");d.innerHTML="";v9a=d}d=v9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return w9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var x9a;var y9a;TO("itemSectionRenderer","musicPassFeatureInfoRenderer","yt-music-pass-feature-info-renderer"); Polymer({is:"yt-music-pass-feature-info-renderer",_template:function(){if(void 0!==y9a)return y9a;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x9a){var d=document.createElement("template");d.innerHTML=""; x9a=d}d=x9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return y9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object},observers:["computeUrlImg_(data)"],computeExtraClasses_:function(a,b){var c="";a&&(c+=" "+a.toLowerCase().replace(/_/g,"-"));b&&(c+=" "+b.toLowerCase().replace(/_/g,"-"));return c}, computeUrlImg_:function(a){a.image&&(this.$.container.style.backgroundImage="url("+wO(a.image.thumbnails,Number.MAX_VALUE)+")")}});var z9a;var A9a;TO("itemSectionRenderer","noResultsFoundShowingResultsForRenderer","yt-no-results-found-showing-results-for-renderer"); Polymer({is:"yt-no-results-found-showing-results-for-renderer",_template:function(){if(void 0!==A9a)return A9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z9a){var d=document.createElement("template");d.innerHTML="";z9a=d}d=z9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return A9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var B9a;var C9a;TO("itemSectionRenderer","resultsWithoutQuotesRenderer","yt-results-without-quotes-renderer"); Polymer({is:"yt-results-without-quotes-renderer",_template:function(){if(void 0!==C9a)return C9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B9a){var d=document.createElement("template");d.innerHTML="";B9a=d}d=B9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return C9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var D9a;var E9a;TO("itemSectionRenderer","searchNoResultsRenderer","yt-search-no-results-renderer"); Polymer({is:"yt-search-no-results-renderer",_template:function(){if(void 0!==E9a)return E9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D9a){var d=document.createElement("template");d.innerHTML=""; D9a=d}d=D9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return E9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var F9a;var G9a;TO("itemSectionRenderer","showingResultsForRenderer","yt-showing-results-for-renderer"); Polymer({is:"yt-showing-results-for-renderer",_template:function(){if(void 0!==G9a)return G9a;var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F9a){var d=document.createElement("template");d.innerHTML="";F9a=d}d=F9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return G9a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object}});var TV={}; TV.YtTappableItemBehavior=[W.YtActionSenderBehavior,{properties:{tappableItemBehaviorTapEnabled:{type:Boolean,value:!1,observer:"tappableItemBehaviorOnTapEnabledChanged_"}},observers:["tappableItemBehaviorOnTapChanged_(data.onTap)"],listeners:{"yt-commerce-action-init-done":"tappableItemBehaviorOnServiceRequestFinished_","yt-service-request-error":"tappableItemBehaviorOnServiceRequestFinished_","yt-commerce-action-done":"tappableItemBehaviorOnServiceRequestFinished_"},created:function(){this.tappableItemBehaviorTargetId=""; this.tappableItemBehaviorBoundOnTappableItemKeyDown_=this.tappableItemBehaviorOnTappableItemKeyDown_.bind(this);this.tappableItemBehaviorBoundOnTappableItemTap_=this.tappableItemBehaviorOnTappableItemTap_.bind(this)}, attached:function(){this.tappableItemBehaviorGetTappableTarget_().addEventListener("keydown",this.tappableItemBehaviorBoundOnTappableItemKeyDown_,!0);this.listen(this.tappableItemBehaviorGetTappableTarget_(),"click","tappableItemBehaviorBoundOnTappableItemTap_")}, detached:function(){this.tappableItemBehaviorGetTappableTarget_().removeEventListener("keydown",this.tappableItemBehaviorBoundOnTappableItemKeyDown_,!0);this.unlisten(this.tappableItemBehaviorGetTappableTarget_(),"click","tappableItemBehaviorBoundOnTappableItemTap_")}, tappableItemBehaviorOnTappableItemKeyDown_:function(a){!this.tappableItemBehaviorTapEnabled||13!==a.keyCode&&32!==a.keyCode||a.target!=this.tappableItemBehaviorGetTappableTarget_()||this.tappableItemBehaviorHandleTappableItemTap_()}, tappableItemBehaviorOnTappableItemTap_:function(){this.tappableItemBehaviorTapEnabled&&this.tappableItemBehaviorHandleTappableItemTap_()}, tappableItemBehaviorHandleTappableItemTap_:function(){var a=this.data.onTap;a.ypcGetCartEndpoint?(this.sendServiceRequestAction([a]),this.tappableItemBehaviorTapEnabled=!1):a.ypcOffersEndpoint?this.sendServiceRequestAction([a]):this.sendInnerTubeActions([a],this)}, tappableItemBehaviorOnTapChanged_:function(a){this.tappableItemBehaviorTapEnabled=!!a}, tappableItemBehaviorOnTapEnabledChanged_:function(){var a=this.tappableItemBehaviorGetTappableTarget_();this.tappableItemBehaviorTapEnabled?(a.setAttribute("tabIndex",0),a.setAttribute("role","button")):(a.removeAttribute("tabIndex"),a.removeAttribute("role"))}, tappableItemBehaviorOnServiceRequestFinished_:function(a){a.target==this&&(this.tappableItemBehaviorTapEnabled=!!this.data.onTap)}, tappableItemBehaviorGetTappableTarget_:function(){return this.tappableItemBehaviorTargetId?this.$[this.tappableItemBehaviorTargetId]:this}}];var H9a;var I9a;var UV=function(){return O.apply(this,arguments)||this}; p(UV,O); UV.prototype.configureRendererStamper=function(){return{"data.sectionHeading":{id:"section-heading",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.image":{id:"image",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.title":{id:"title",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.subtitle":{id:"subtitle",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.additionalMetadata":{id:"additional-metadata",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}, "data.activityMetadata":{id:"activity-metadata",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.menu":{id:"menu",mapping:UO("menuRenderer")}}}; UV.prototype.onMenuTap=function(a){a.stopPropagation()}; g.Object.defineProperties(UV.prototype,{ariaLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.accessibilityData&&this.data.accessibilityData.label?this.data.accessibilityData.label:""}}, sectionHeadingVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.sectionHeading)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}, imageVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.image)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}, menuVisible:{configurable:!0,enumerable:!0,get:function(){var a,b;return!((null===(a=this.data)||void 0===a||!a.menu)&&"ACTIVITY_ITEM_LAYOUT_STRETCH"===(null===(b=this.data)||void 0===b?void 0:b.layout))}}}); g.Object.defineProperties(UV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===I9a){var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H9a){var d=document.createElement("template");d.innerHTML=""; H9a=d}d=H9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I9a=a}a=I9a;return a}}}); var VV=UV;w([P(X.YtRendererBehavior),x("design:type",Object)],VV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],VV.prototype,"ytRendererstamperBehavior",void 0);w([P(TV.YtTappableItemBehavior),x("design:type",Object)],VV.prototype,"ytTappableItemBehavior",void 0);w([R(),x("design:type",Object)],VV.prototype,"data",void 0);w([R({reflectToAttribute:!0}),BE("data.accessibilityData"),x("design:type",String),x("design:paramtypes",[])],VV.prototype,"ariaLabel",null); w([BE("data.sectionHeading","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],VV.prototype,"sectionHeadingVisible",null);w([BE("data.image","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],VV.prototype,"imageVisible",null);w([BE("data.menu","data.layout"),x("design:type",Boolean),x("design:paramtypes",[])],VV.prototype,"menuVisible",null);VV=w([V({is:"yt-activity-item-renderer"})],VV);var J9a;var K9a;var WV={},L9a=function(a,b,c){a.removeAttribute("top-"+c);a.removeAttribute("bottom-"+c);a.removeAttribute("left-"+c);a.removeAttribute("right-"+c);b&&(b.top&&a.setAttribute("top-"+c,b.top),b.bottom&&a.setAttribute("bottom-"+c,b.bottom),b.left&&a.setAttribute("left-"+c,b.left),b.right&&a.setAttribute("right-"+c,b.right))}; WV.YtCardItemBoxBehavior=[{observers:["cardItemContainerMarginChanged_(data.containerMargin)","cardItemContainerPaddingChanged_(data.containerPadding)"],created:function(){this.cardItemBoxBehaviorPaddingTargetId=this.cardItemBoxBehaviorPaddingMarginId=""}, cardItemContainerMarginChanged_:function(a){L9a(this.cardItemBoxBehaviorMarginTargetId&&this.$?this.$[this.cardItemBoxBehaviorMarginTargetId]:this,a,"margin")}, cardItemContainerPaddingChanged_:function(a){L9a(this.cardItemBoxBehaviorPaddingTargetId&&this.$?this.$[this.cardItemBoxBehaviorPaddingTargetId]:this,a,"padding")}}];var XV={CARD_ITEM_COLOR_GENERAL_BACKGROUND_A:"var(--yt-spec-general-background-a)",CARD_ITEM_COLOR_GENERAL_BACKGROUND_B:"var(--yt-spec-general-background-b)",CARD_ITEM_COLOR_ERROR_BACKGROUND:"var(--yt-spec-error-background)",CARD_ITEM_COLOR_TEXT_PRIMARY:"var(--yt-spec-text-primary)",CARD_ITEM_COLOR_TEXT_SECONDARY:"var(--yt-spec-text-secondary)",CARD_ITEM_COLOR_CALL_TO_ACTION:"var(--yt-spec-call-to-action)",CARD_ITEM_COLOR_ICON_INACTIVE:"var(--yt-spec-icon-inactive)",CARD_ITEM_COLOR_ICON_DISABLED:"var(--yt-spec-icon-disabled)", CARD_ITEM_COLOR_BRAND_ICON_ACTIVE:"var(--yt-spec-brand-icon-active)",CARD_ITEM_COLOR_BRAND_ICON_INACTIVE:"var(--yt-spec-brand-icon-inactive)",CARD_ITEM_COLOR_10_PERCENT_LAYER:"var(--yt-spec-10-percent-layer)",CARD_ITEM_COLOR_TEXT_PRIMARY_INVERSE:"var(--yt-spec-text-primary-inverse)",CARD_ITEM_COLOR_ICON_ACTIVE_OTHER:"var(--yt-spec-icon-active-other)",CARD_ITEM_COLOR_THEMED_GREEN:"var(--yt-spec-themed-green)"};var M9a;var N9a,O9a=function(){if(void 0!==N9a)return N9a;var a=document.createElement("template");a.innerHTML=""; return N9a=a};var P9a;Polymer({is:"yt-card-item-text-renderer",_template:function(){if(void 0!==P9a)return P9a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(O9a().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===M9a){var d=document.createElement("template");d.innerHTML=""; M9a=d}d=M9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return P9a=a}, behaviors:[X.YtRendererBehavior,WV.YtCardItemBoxBehavior],observers:["textColorChanged_(data.textColor)"],properties:{data:Object},textColorChanged_:function(a){this.style.color=XV[a||"CARD_ITEM_COLOR_TEXT_PRIMARY"]}});Polymer({is:"yt-card-item-text-collection-renderer",_template:function(){if(void 0!==K9a)return K9a;var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J9a){var d=document.createElement("template");d.innerHTML=""; J9a=d}d=J9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return K9a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.textRenderers":{id:"text-renderers",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}}}});var Q9a;var R9a;Polymer({is:"yt-themed-image-renderer",_template:function(){if(void 0!==R9a)return R9a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(O9a().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q9a){var d=document.createElement("template");d.innerHTML=""; Q9a=d}d=Q9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return R9a=a}, behaviors:[X.YtRendererBehavior,Z,WV.YtCardItemBoxBehavior,xO.YtActionHandlerBehavior],properties:{data:Object,fit:{type:Boolean,value:!1},isDarkTheme_:Boolean,themeImage_:{type:Object,computed:"computeThemeImage_(data, isDarkTheme_)"},themeIcon_:{type:Object,computed:"computeThemeIcon_(data)"},isCircular_:{type:Boolean,reflectToAttribute:!0,value:!1}},actionMap:{"yt-dark-mode-toggled-action":"handleDarkModeToggledAction_"},attached:function(){this.isDarkTheme_=document.documentElement.hasAttribute("dark")}, handleDarkModeToggledAction_:function(a){this.isDarkTheme_=a}, computeThemeImage_:function(a,b){if(!a||!a.imageLight)return!1;this.isCircular_=a.isCircular;a.imageWidth&&(this.style.width=a.imageWidth+"px");a.imageHeight&&(this.style.height=a.imageHeight+"px");return b&&a.imageDark?a.imageDark:a.imageLight}, computeThemeIcon_:function(a){if(!a||!a.themedIcon)return!1;var b=a.themedIcon;this.$.icon.style.color=XV[b.iconColor||"CARD_ITEM_COLOR_GENERAL_BACKGROUND_A"];this.$.icon.style.width=(a.imageWidth||18)+"px";this.$.icon.style.height=(a.imageHeight||18)+"px";return"yt-icons:"+b.icon.iconType}});var S9a;var T9a;var U9a;var V9a;Polymer({is:"yt-card-item-actions-renderer",_template:function(){if(void 0!==V9a)return V9a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U9a){var d=document.createElement("template");d.innerHTML=""; U9a=d}d=U9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return V9a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object},stampDom:{"data.primaryButtonRenderer":{id:"primary-button-renderer",mapping:UO("sharingToggleButtonAndDefaultButton")},"data.secondaryButtonRenderer":{id:"secondary-button-renderer",mapping:UO("sharingToggleButtonAndDefaultButton")}}});var W9a;var X9a;var Y9a;var Z9a;Polymer({is:"yt-card-item-text-with-image-renderer",_template:function(){if(void 0!==Z9a)return Z9a;var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y9a){var d=document.createElement("template");d.innerHTML=""; Y9a=d}d=Y9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Z9a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object,imagePlacement:{type:String,value:"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN",computed:"computeImagePlacement_(data.imagePlacement)",reflectToAttribute:!0}},stampDom:{"data.imageRenderer":{id:"themed-image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.textCollectionRenderer":{id:"card-item-text-collection-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}, computeImagePlacement_:function(a){return a||"CARD_ITEM_IMAGE_PLACEMENT_UNKNOWN"}});Polymer({is:"yt-card-item-error-renderer",_template:function(){if(void 0!==X9a)return X9a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W9a){var d=document.createElement("template");d.innerHTML=""; W9a=d}d=W9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return X9a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object},stampDom:{"data.errorTextRenderer":{id:"error-text-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"},cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}}}});var $9a;var a$a;var b$a;var c$a;var YV=function(){return O.apply(this,arguments)||this}; p(YV,O);YV.prototype.configureRendererStamper=function(){return{"data.textCollectionRenderer":{id:"card-item-text-collection-renderer",mapping:{cardItemTextCollectionRenderer:"yt-card-item-text-collection-renderer"}},"data.buttonRenderer":{id:"primary-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; g.Object.defineProperties(YV,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===c$a){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===b$a){var d=document.createElement("template");d.innerHTML="";b$a=d}d=b$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);c$a=a}a= c$a;return a}}}); var ZV=YV;w([P(X.YtRendererBehavior),x("design:type",Object)],ZV.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],ZV.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],ZV.prototype,"data",void 0);ZV=w([fO({is:"yt-card-item-text-with-button-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],ZV);TO("itemSectionRenderer","CardItemRenderer","yt-card-item-renderer"); Polymer({is:"yt-card-item-renderer",_template:function(){if(void 0!==a$a)return a$a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(O9a().content.cloneNode(!0), a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$9a){var d=document.createElement("template");d.innerHTML=""; $9a=d}d=$9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return a$a=a}, behaviors:[X.YtRendererBehavior,Z,WV.YtCardItemBoxBehavior,TV.YtTappableItemBehavior],properties:{data:Object,isExpanded_:{type:Boolean,value:!1},isErrorRendererVisible_:{type:Boolean,value:!1}},listeners:{"yt-toggle-button":"onYtToggleButton_"},observers:["backgroundColorChanged_(data.backgroundColor)","errorRendererVisibilityChanged_(data.errorRenderer, isExpanded_)"],stampDom:{"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}, cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"},cardItemTextWithButtonRenderer:{component:"yt-card-item-text-with-button-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"},cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}, themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.errorRenderer":{id:"error-renderer",mapping:{cardItemErrorRenderer:{component:"yt-card-item-error-renderer"}}}},created:function(){this.tappableItemBehaviorTargetId=this.cardItemBoxBehaviorPaddingTargetId="main-content"}, backgroundColorChanged_:function(a){this.$["main-content"].style.backgroundColor=XV[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"}, errorRendererVisibilityChanged_:function(a,b){this.isErrorRendererVisible_=!!a&&!b}, onYtToggleButton_:function(a,b){this.isExpanded_=b.toggled}});var d$a;var e$a;Polymer({is:"yt-offer-item-upsell-renderer",_template:function(){if(void 0!==e$a)return e$a;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===d$a){var d=document.createElement("template");d.innerHTML=""; d$a=d}d=d$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return e$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},observers:["backgroundColorChanged_(data.backgroundColor)"],stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}, "data.priceRenderer":{id:"price-renderer",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.actionsRenderer":{id:"actions-renderer",mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}},backgroundColorChanged_:function(a){this.style.backgroundColor=XV[a||"CARD_ITEM_COLOR_UNKNOWN"]||"transparent"}});TO("itemSectionRenderer","CardItemContainerRenderer","yt-card-item-container-renderer"); Polymer({is:"yt-card-item-container-renderer",_template:function(){if(void 0!==T9a)return T9a;var a=document.createElement("template");a.innerHTML="
\n\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S9a){var d=document.createElement("template");d.innerHTML=""; S9a=d}d=S9a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return T9a=a}, isInjectionRoot:!0,behaviors:[zU.YtContinuationHandlerBehavior,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,Z,NQ,X.YtRendererBehavior,bla.InjectBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isExpanded_:{type:Boolean,reflectToAttribute:!0,value:!1},containerStyle_:{type:String,computed:"computeContainerStyle_(data.containerStyle)",reflectToAttribute:!0,value:"CARD_ITEM_CONTAINER_STYLE_DEFAULT"},continuationStatus_:{type:String,value:"not-started"},showSpinner_:{type:Boolean, reflectToAttribute:!0,computed:"computeShowSpinner_(isExpanded_, continuationStatus_)",value:!1},isOnClickCommand_:{type:Boolean,value:!1},showMoreContentsButton_:{type:Boolean,computed:"computeShowMoreContentsButton_(isExpanded_, showSpinner_, isOnClickCommand_, data.continuations, data.contents)",value:!1}},actionMap:{"yt-update-card-item-on-click-command":"updateCardOnClickCommand_"},listeners:{"yt-toggle-button":"onToggleButton_","yt-next-continuation-data-updated":"nextContinuationDataUpdated_"}, stampDom:{"data.baseRenderer":{id:"base",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0}}},"data.contents":{id:"contents",mapping:{cardItemRenderer:{component:"yt-card-item-renderer",noInjection:!0},offerItemUpsellRenderer:{component:"yt-offer-item-upsell-renderer",noInjection:!0},activityItemRenderer:{component:"yt-activity-item-renderer",noInjection:!0}}},"data.continuationSection":{id:"continuation-section",mapping:UO("sharingItemSection")},"data.moreContentsButtonRenderer":{id:"more-contents-button", mapping:{buttonRenderer:{component:"yt-button-renderer",noInjection:!0}}}},nextContinuation:{continuationType:"sectionListContinuation",contentsArray:"data.continuationSection"},configureContinuationPathMap:function(){return{"yt-append-continuation-items-action":"continuationSection"}}, computeContainerStyle_:function(a){return a}, computeShowSpinner_:function(a,b){return a&&"in-progress"===b}, computeShowMoreContentsButton_:function(a,b,c,d,f){return!(!(d&&d.length||f&&f.length&&c)||!a||b)}, onToggleButton_:function(a){var b=this;a.stopPropagation();(this.isExpanded_=a.detail&&a.detail.toggled)&&!this.data.continuationSection.length&&this.data.continuation&&this.data.continuation.onClickContinuationData&&"in-progress"!==this.continuationStatus_?(this.fire("yt-load-next-continuation",function(c){return b.getContinuationUrl_(b.data.continuation.onClickContinuationData,c)}),this.continuationStatus_="in-progress"):this.isExpanded_&&!this.data.continuationSection.length&&this.data.onClickCommand&& "in-progress"!==this.continuationStatus_&&(this.sendServiceRequestAction([this.data.onClickCommand]),this.continuationStatus_="in-progress")}, onShowMoreContentsButtonClicked_:function(a){var b=this;a.stopPropagation();this.data.continuations&&this.data.continuations[0].nextContinuationData?(this.fire("yt-load-next-continuation",function(c){return b.getContinuationUrl_(b.data.continuations[0].nextContinuationData,c)}),this.continuationStatus_="in-progress"):this.data.onClickCommand&&(this.sendServiceRequestAction([this.data.onClickCommand]),this.continuationStatus_="in-progress",this.data.onClickCommand=void 0,this.isOnClickCommand_=!1)}, getContinuationUrl_:function(a,b){var c=a.continuation;a=a.clickTrackingParams;var d=Tn();a&&d&&BJ(d,Nn(a));return Id(b,{continuation:c})}, nextContinuationDataUpdated_:function(){this.continuationStatus_="complete";var a=this.querySelector("#continuation-section");a&&(a=a.querySelectorAll("ytmusic-item-section-renderer"))&&a.forEach(function(b){return b.classList.add("memberships-and-purchases")})}, dataChanged_:function(){this.isExpanded_=!!this.data.contents;this.data.continuationSection||(this.data.continuationSection=[]);this.data.onClickCommand&&(this.isOnClickCommand_=!0)}, updateCardOnClickCommand_:function(a){a=a.updateCardItemOnClickCommand;this.data&&this.data.targetId&&a&&a.targetId===this.data.targetId&&a.onClickCommand&&(this.data.onClickCommand=a.onClickCommand,this.isOnClickCommand_=!0)}});var f$a;var g$a;var h$a;var i$a;Polymer({is:"yt-generic-faq-question-renderer",_template:function(){if(void 0!==i$a)return i$a;var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.question)]]\n \n \n
\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===h$a){var d=document.createElement("template");d.innerHTML=""; h$a=d}d=h$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return i$a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object,answerExpanded:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{tap:"toggleAnswer_"},toggleAnswer_:function(a){var b=Polymer.dom(a).rootTarget;if(!b||!b.classList.contains("yt-simple-endpoint")&&"yt-endpoint"!=b.getAttribute("is"))a.preventDefault(),a.stopPropagation(),this.answerExpanded=!this.answerExpanded}});TO("itemSectionRenderer","faqSectionRenderer","yt-faq-section-renderer"); Polymer({is:"yt-faq-section-renderer",_template:function(){if(void 0!==g$a)return g$a;var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.header)]]\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===f$a){var d=document.createElement("template");d.innerHTML=""; f$a=d}d=f$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return g$a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object},stampDom:{"data.questions":{id:"contents",mapping:{genericFaqQuestionRenderer:"yt-generic-faq-question-renderer"}}}});var j$a;var k$a;TO("itemSectionRenderer","OfferItemExpandedRenderer","yt-offer-item-expanded-renderer"); Polymer({is:"yt-offer-item-expanded-renderer",_template:function(){if(void 0!==k$a)return k$a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===j$a){var d=document.createElement("template");d.innerHTML=""; j$a=d}d=j$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return k$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer", mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});var l$a;var m$a;TO("itemSectionRenderer","OfferItemRenderer","yt-offer-item-renderer"); Polymer({is:"yt-offer-item-renderer",_template:function(){if(void 0!==m$a)return m$a;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===l$a){var d=document.createElement("template");d.innerHTML=""; l$a=d}d=l$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return m$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}},"data.headingRenderer":{id:"heading-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.descriptionRenderer":{id:"description-renderer",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.additionalInfoRenderer":{id:"additional-info-renderer", mapping:{cardItemActionsRenderer:{component:"yt-card-item-actions-renderer"}}}}});var n$a;var o$a;TO("itemSectionRenderer","subscriptionProductHeaderRenderer","yt-subscription-product-header-renderer"); Polymer({is:"yt-subscription-product-header-renderer",_template:function(){if(void 0!==o$a)return o$a;var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.text)]]\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===n$a){var d=document.createElement("template");d.innerHTML="";n$a=d}d=n$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return o$a=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object,ariaLevel:{type:String,computed:"computeAriaLevel_(data.level)",reflectToAttribute:!0},role:{type:String,value:"heading",reflectToAttribute:!0},tabindex:{type:Number,value:-1,reflectToAttribute:!0}},computeAriaLevel_:function(a){return this.getLevelID_(a)}, getLevelID_:function(a){return(a=a.match(/[0-9]+$/))&&1==a.length?a[0]:"1"}});var p$a;var q$a;TO("itemSectionRenderer","subscriptionProductRenderer","yt-subscription-product-renderer"); Polymer({is:"yt-subscription-product-renderer",_template:function(){if(void 0!==q$a)return q$a;var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===p$a){var d=document.createElement("template");d.innerHTML=""; p$a=d}d=p$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return q$a=a}, behaviors:[X.YtRendererBehavior,Z],listeners:{"yt-rendererstamper-finished":"onStampFinished_"},properties:{data:Object},stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.menu":{id:"menu",mapping:UO("menuRenderer"),events:!0}},onStampFinished_:function(){this.$.menu.children[0].icon="yt-icons:more_vert"}});var r$a;var s$a;TO("itemSectionRenderer","subscriptionProductUpsellOfferRenderer","yt-subscription-product-upsell-offer-renderer"); Polymer({is:"yt-subscription-product-upsell-offer-renderer",_template:function(){if(void 0!==s$a)return s$a;var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n \n \n
\n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===r$a){var d=document.createElement("template");d.innerHTML=""; r$a=d}d=r$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return s$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},observers:["imageScrimColorValuesChanged_(data.imageScrimColorValues)"],stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:"yt-button-renderer"}}},imageScrimColorValuesChanged_:function(a){this.$.scrim.style.backgroundColor=a?QN(a[0]):"transparent"}});var t$a;var u$a;var v$a;var w$a;var $V=[W.YtActionSenderBehavior,{openToastWithFormattedMessage:function(a){this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:a}}}},this])}, openToast:function(a){this.openToastWithFormattedMessage(kL(a))}}];var x$a;var y$a;Polymer({is:"yt-single-ypc-offer-renderer",_template:function(){if(void 0!==y$a)return y$a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===x$a){var d=document.createElement("template");d.innerHTML=""; x$a=d}d=x$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return y$a=a}, behaviors:[X.YtRendererBehavior,$V],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:Object,collapsible:{type:Boolean,value:!1,reflectToAttribute:!0},isManageRed:{reflectToAttribute:!0,type:Boolean,value:!1}},onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)}});Polymer({is:"yt-single-ypc-offer-list-renderer",_template:function(){if(void 0!==w$a)return w$a;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===v$a){var d=document.createElement("template");d.innerHTML="";v$a=d}d= v$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return w$a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object,isManageRed:{type:Boolean,reflectToAttribute:!0,value:!1}},stampDom:{"data.singleYpcOfferSupportedRenderers":{id:"contents",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});var z$a;var A$a;TO("itemSectionRenderer","ypcOffersListRenderer","yt-ypc-offers-list-renderer"); Polymer({is:"yt-ypc-offers-list-renderer",_template:function(){if(void 0!==A$a)return A$a;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===z$a){var d=document.createElement("template");d.innerHTML="";z$a=d}d=z$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return A$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object,isManageRed:{type:Boolean,value:!1}},stampDom:{"data.offersList":{id:"contents",mapping:{singleYpcOfferListRenderer:{component:"yt-single-ypc-offer-list-renderer",properties:{isManageRed:"[[isManageRed]]"}}}}}});TO("itemSectionRenderer","unlimitedManageSubscriptionPageRenderer","yt-unlimited-manage-subscription-page-renderer"); Polymer({is:"yt-unlimited-manage-subscription-page-renderer",_template:function(){if(void 0!==u$a)return u$a;var a=document.createElement("template");a.innerHTML="\n

[[getSimpleString(data.subscriptionTitle)]]

\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===t$a){var d=document.createElement("template");d.innerHTML=""; t$a=d}d=t$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return u$a=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.manageFixFopButton":{id:"manage-fix-fop-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.helpButton":{id:"help-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.manageFamilyButton":{id:"manage-family-button",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.manageSubscriptionButton":{id:"manage-subscription-button", mapping:{buttonRenderer:{component:"yt-button-renderer",params:{alignByText:!0}}}},"data.offers":{id:"offers",mapping:{ypcOffersListRenderer:{component:"yt-ypc-offers-list-renderer",params:{isManageRed:!0}}}}}});var B$a;var C$a;Polymer({is:"yt-collapsible-ypc-offer-renderer",_template:function(){if(void 0!==C$a)return C$a;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===B$a){var d=document.createElement("template");d.innerHTML=""; B$a=d}d=B$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return C$a=a}, behaviors:[Polymer.IronA11yKeysBehavior,Z,X.YtRendererBehavior],hostAttributes:{role:"button",tabindex:0},keyBindings:{"enter:keypress":"onKeypress_"},properties:{data:{type:Object,observer:"dataChanged_"},offersVisible_:{type:Boolean,reflectToAttribute:!0}},stampDom:{"data.singleYpcOfferListSupportedRenderers":{id:"offers",mapping:{singleYpcOfferRenderer:{component:"yt-single-ypc-offer-renderer",params:{collapsible:!0}}}}},onKeypress_:function(a){a.detail.keyboardEvent.target==this&&this.expandOffers_()}, handleHeaderTap_:function(a){a.preventDefault();a.stopPropagation();this.expandOffers_()}, expandOffers_:function(){this.offersVisible_=!0;this.setAttribute("tabindex","-1")}, dataChanged_:function(a){this.offersVisible_=!a.isCollapsed}});var D$a;var E$a;TO("itemSectionRenderer","unlimitedPageHeaderRenderer","yt-unlimited-page-header-renderer"); Polymer({is:"yt-unlimited-page-header-renderer",_template:function(){if(void 0!==E$a)return E$a;var a=document.createElement("template");a.innerHTML="

\n \n \n

\n\n\n\n\n
\n \n \n
\n\n\n
\n\n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===D$a){var d=document.createElement("template");d.innerHTML=""; D$a=d}d=D$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return E$a=a}, behaviors:[Z,X.YtRendererBehavior,$V],listeners:{"yt-service-request-error":"onYtServiceRequestError_"},properties:{data:{type:Object,observer:"dataChanged_"}},stampDom:{"data.moreOffersRenderers":{id:"more-offers",mapping:{collapsibleYpcOfferRenderer:{component:"yt-collapsible-ypc-offer-renderer"}}}},dataChanged_:function(){if(this.data.backgroundImage){var a=wO(this.data.backgroundImage.thumbnails,screen.width),b=this.getScrimLayerColorStops_();this.style["background-image"]=b?"linear-gradient(180deg, "+ b+"), url("+a+")":"url("+a+")";this.data.gtmId&&wWa(this.data.gtmId)}}, onYtServiceRequestError_:function(a){this.openToast(a.detail.error.message)}, getScrimLayerColorStops_:function(){var a=this.get("unlimitedHeaderV2Data.unlimitedHeaderV2Data",this.data);if(!a)return null;var b=100/a.scrimLayerColors.length;return a.scrimLayerColors.map(function(c,d){d*=b;return QN(c)+" "+d+"%"}).join(",")}});var F$a;var G$a;TO("itemSectionRenderer","UnlimitedUserNotificationRenderer","yt-unlimited-user-notification-renderer"); Polymer({is:"yt-unlimited-user-notification-renderer",_template:function(){if(void 0!==G$a)return G$a;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===F$a){var d=document.createElement("template");d.innerHTML=""; F$a=d}d=F$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return G$a=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-confirm":!0}}}}}});var H$a;var I$a;var aW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-viewership-action":"handleUpdateViewershipAction_","yt-update-title-action":"handleUpdateTitleAction_","yt-update-date-text-action":"handleUpdateDateTextAction_","yt-update-sentiment-buttons-action":"handleUpdateSentimentButtonsAction_"};return a}; p(aW,O);e=aW.prototype;e.configureRendererStamper=function(){return{"data.videoActions":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more",styleActionButton:!0}}}},"data.viewCount":{id:"count",mapping:{videoViewCountRenderer:"yt-view-count-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged_=function(){this.scheduleInitialUpdatedMetadataRequest_();this.setSentimentBarWidth_()}; e.scheduleInitialUpdatedMetadataRequest_=function(){this.data&&this.data.updatedMetadataEndpoint&&Ck(this.ytTaskEmitterBehavior.getTaskManager(),this.fetchUpdatedMetadata_.bind(this),250)}; e.setSentimentBarWidth_=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){var b=a.$$("ytd-menu-renderer");if(b){b=Polymer.dom(b.root).querySelectorAll("[button-renderer]");for(var c=0,d=0;d

"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===H$a){var d=document.createElement("template");d.innerHTML=""; H$a=d}d=H$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);I$a=a}a=I$a;return a}}}); var bW=aW;bW.prototype.onYtServiceRequestCompleted_=bW.prototype.onYtServiceRequestCompleted_;bW.prototype.onYtServiceRequestSent_=bW.prototype.onYtServiceRequestSent_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],bW.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],bW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],bW.prototype,"ytRendererstamperBehavior",void 0); w([P(yO.YtTaskEmitterBehavior),x("design:type",Object)],bW.prototype,"ytTaskEmitterBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],bW.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],bW.prototype,"data",void 0);w([R({computed:"computeHasDateText_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],bW.prototype,"hasDateText_",void 0); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],bW.prototype,"onYtServiceRequestSent_",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],bW.prototype,"onYtServiceRequestCompleted_",null);bW=w([V({is:"ytd-video-primary-info-renderer"})],bW);var J$a;var K$a;var cW=function(){return O.apply(this,arguments)||this}; p(cW,O);cW.prototype.notifyLikeChange=function(a){a.status&&this.observeLikeStatus_(a.status)}; cW.prototype.observeLikeStatus_=function(a){this.data&&("DISLIKE"==a?(a=this.data.percentIfDisliked||0,this.activated_=!0):"LIKE"==a?(a=this.data.percentIfLiked||0,this.activated_=!0):(a=this.data.percentIfIndifferent||0,this.activated_=!1),this.$["like-bar"].style.width=a+"%")}; g.Object.defineProperties(cW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===K$a){var a=document.createElement("template");a.innerHTML="
\n
\n
\n[[data.tooltip]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===J$a){var d=document.createElement("template");d.innerHTML=""; J$a=d}d=J$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);K$a=a}a=K$a;return a}}}); var dW=cW;dW.prototype.observeLikeStatus_=dW.prototype.observeLikeStatus_;w([P(X.YtRendererBehavior),x("design:type",Object)],dW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],dW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],dW.prototype,"activated_",void 0);w([U("data.likeStatus"),x("design:type",Function),x("design:paramtypes",[String]),x("design:returntype",void 0)],dW.prototype,"observeLikeStatus_",null); dW=w([V({is:"ytd-sentiment-bar-renderer"})],dW);var L$a;var M$a;var N$a=function(){return O.apply(this,arguments)||this}; p(N$a,O); g.Object.defineProperties(N$a,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===M$a){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.viewCount)]][[getSimpleString(data.shortViewCount)]]";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===L$a){var d=document.createElement("template");d.innerHTML=""; L$a=d}d=L$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);M$a=a}a=M$a;return a}}}); var eW=N$a;w([P(kO.YtComponentBehavior),x("design:type",Object)],eW.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],eW.prototype,"data",void 0);w([R({value:function(){return N("kevlar_fixie_watch_layout")||N("no_sub_count_on_sub_button")}, reflectToAttribute:!0}),x("design:type",Boolean)],eW.prototype,"small_",void 0);eW=w([V({is:"yt-view-count-renderer"})],eW);var O$a;var P$a;var fW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-date-text-action":"handleUpdateDateTextAction","yt-update-description-action":"handleUpdateDescriptionAction","yt-update-horizontal-card-list-action":"handleUpdateHorizontalCardListAction"};return a}; p(fW,O);e=fW.prototype;e.configureRendererStamper=function(){return{subscribeButtonData:{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(a){this.collapsed=!(a&&a.defaultExpanded);this.subscribeButtonData=a.subscribeButton;this.descriptionCollapsedHeight=20*(a.descriptionCollapsedLines||3);this.updateInlineRecs(void 0)}; e.handleUpdateHorizontalCardListAction=function(a){a=this.get("updateHorizontalCardListAction.contents.horizontalCardListRenderer",a);this.updateInlineRecs(a)}; e.updateInlineRecs=function(a){this.inlineRecsListRenderer.set("data",a);this.toggleClass("expanded",!this.inlineRecsListRenderer.empty,this.$["list-container"])}; e.handleUpdateDateTextAction=function(a){this.data&&this.data.dateText&&this.set("data.dateText",a.updateDateTextAction.dateText)}; e.handleUpdateDescriptionAction=function(a){this.$.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)}; e.computeMetadataCollapsible=function(a){return!!a&&!!a.rows&&a.rows.length>a.collapsedItemCount}; g.Object.defineProperties(fW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===P$a){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.dateText)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===O$a){var d=document.createElement("template");d.innerHTML=""; O$a=d}d=O$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);P$a=a}a=P$a;return a}}}); var gW=fW;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],gW.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],gW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],gW.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],gW.prototype,"data",void 0);w([R(),x("design:type",Boolean)],gW.prototype,"collapsed",void 0); w([R(),x("design:type",Boolean)],gW.prototype,"canCollapse",void 0);w([R(),x("design:type",Object)],gW.prototype,"subscribeButtonData",void 0);w([R(),x("design:type",Number)],gW.prototype,"descriptionCollapsedHeight",void 0);w([CE("#inline-recs-list-renderer"),x("design:type",Object)],gW.prototype,"inlineRecsListRenderer",void 0);gW=w([V({is:"ytd-video-secondary-info-renderer"})],gW);var Q$a;var R$a;var hW=function(){return O.apply(this,arguments)||this}; p(hW,O);hW.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer",buttonRenderer:"ytd-button-renderer"}}}}; hW.prototype.onTap=function(a){var b=this.data&&this.data.endpoint;b&&!NR(Polymer.dom(a).path,this,["YTD-SUBSCRIBE-BUTTON-RENDERER","YTD-BUTTON-RENDERER"])&&this.fire("yt-navigate",{endpoint:b})}; g.Object.defineProperties(hW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===R$a){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Q$a){var d=document.createElement("template");d.innerHTML=""; Q$a=d}d=Q$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);R$a=a}a=R$a;return a}}}); var iW=hW;w([P(Z),x("design:type",Object)],iW.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],iW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],iW.prototype,"data",void 0);iW=w([V({is:"ytd-autotagging-metadata-renderer"})],iW);var S$a;var T$a;var jW=function(){return O.apply(this,arguments)||this}; p(jW,O);jW.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{autotaggingMetadataRenderer:"ytd-autotagging-metadata-renderer"}}}}; g.Object.defineProperties(jW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===T$a){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.header)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===S$a){var d=document.createElement("template");d.innerHTML=""; S$a=d}d=S$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);T$a=a}a=T$a;return a}}}); var kW=jW;w([P(Z),x("design:type",Object)],kW.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],kW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],kW.prototype,"data",void 0);kW=w([V({is:"ytd-autotagging-metadata-row-renderer"})],kW);var U$a;var V$a;var lW=function(){return O.apply(this,arguments)||this}; p(lW,O); lW.prototype.configureRendererStamper=function(){return{alwaysShownItems:{id:"always-shown",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer",metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",richMetadataRowRenderer:"ytd-rich-metadata-row-renderer",autotaggingMetadataRowRenderer:"ytd-autotagging-metadata-row-renderer"}},collapsibleItems:{id:"collapsible",mapping:{metadataRowRenderer:"ytd-metadata-row-renderer",metadataWithImageRowRenderer:"ytd-metadata-with-image-row-renderer", metadataRowHeaderRenderer:"ytd-metadata-row-header-renderer",richMetadataRowRenderer:"ytd-rich-metadata-row-renderer",autotaggingMetadataRowRenderer:"ytd-autotagging-metadata-row-renderer"}}}}; lW.prototype.computeCollapsibleItems=function(a,b,c){return void 0===a||void 0===b||void 0===c||c?[]:a.slice(b)}; lW.prototype.computeAlwaysShownItems=function(a,b){return a&&a.length?a.slice(0,b):[]}; g.Object.defineProperties(lW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===V$a){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===U$a){var d=document.createElement("template");d.innerHTML=""; U$a=d}d=U$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);V$a=a}a=V$a;return a}}}); var mW=lW;w([P(X.YtRendererBehavior),x("design:type",Object)],mW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],mW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],mW.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],mW.prototype,"collapsed",void 0);w([R({computed:"computeAlwaysShownItems(data.rows,data.collapsedItemCount)"}),x("design:type",Array)],mW.prototype,"alwaysShownItems",void 0); w([R({computed:"computeCollapsibleItems(data.rows,data.collapsedItemCount,collapsed)"}),x("design:type",Array)],mW.prototype,"collapsibleItems",void 0);mW=w([V({is:"ytd-metadata-row-container-renderer"})],mW);var W$a;var X$a;var nW=function(){return O.apply(this,arguments)||this}; p(nW,O);nW.prototype.computeHasDividerLine=function(a){return a}; g.Object.defineProperties(nW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===X$a){var a=document.createElement("template");a.innerHTML="

\n \n

\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===W$a){var d=document.createElement("template");d.innerHTML=""; W$a=d}d=W$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);X$a=a}a=X$a;return a}}}); var oW=nW;w([P(X.YtRendererBehavior),x("design:type",Object)],oW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],oW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],oW.prototype,"hasDividerLine",void 0);oW=w([V({is:"ytd-metadata-row-header-renderer"})],oW);var Y$a;var Z$a;var pW=function(){return O.apply(this,arguments)||this}; p(pW,O);pW.prototype.computeHasDividerLine=function(a){return a}; g.Object.defineProperties(pW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Z$a){var a=document.createElement("template");a.innerHTML="

\n \n

\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Y$a){var d=document.createElement("template");d.innerHTML=""; Y$a=d}d=Y$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Z$a=a}a=Z$a;return a}}}); var qW=pW;w([P(X.YtRendererBehavior),x("design:type",Object)],qW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],qW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],qW.prototype,"hasDividerLine",void 0);qW=w([V({is:"ytd-metadata-row-renderer"})],qW);var $$a;var aab;var bab=function(){return O.apply(this,arguments)||this}; p(bab,O); g.Object.defineProperties(bab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===aab){var a=document.createElement("template");a.innerHTML="\n \n \n
\n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$$a){var d=document.createElement("template");d.innerHTML=""; $$a=d}d=$$a;c.call(b,d.content.cloneNode(!0),a.content.firstChild);aab=a}a=aab;return a}}}); var rW=bab;w([P(X.YtRendererBehavior),x("design:type",Object)],rW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],rW.prototype,"data",void 0);rW=w([V({is:"ytd-metadata-with-image-row-renderer"})],rW);var cab;var dab;var sW=function(){return O.apply(this,arguments)||this}; p(sW,O);e=sW.prototype;e.configureRendererStamper=function(){return{"data.informationButton":{id:"information-button-container",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onDataChanged=function(){this.data&&!this.endpointHref&&(this.endpointLink.classList.add("button-mode"),this.endpointLink.setAttribute("tabindex","0"),this.endpointLink.setAttribute("role","button"),this.endpointLink.addEventListener("keypress",this.onEndpointLinkKeyPress.bind(this)))}; e.onEndpointLinkKeyPress=function(a){a.target===this.endpointLink&&13===a.keyCode&&this.fire("click")}; e.onClick=function(){var a;!this.endpointHref&&(this.endpointLink.blur(),null===(a=this.data)||void 0===a?0:a.endpoint)&&(this.actionSenderBehavior.sendInnerTubeActions([this.data.endpoint],this),this.ytRendererBehavior.logExplicitClick(this.data))}; e.onYtNavigate=function(a){this.endpointHref||a.stopPropagation()}; e.onInformationButtonContainerClick=function(a){"information-button-container"!==a.target.id&&a.stopPropagation()}; e.computeStyle=function(a){return a}; e.computeThumbnailWidth=function(a){switch(a){case"RICH_METADATA_RENDERER_STYLE_THUMBNAIL":return 178;case"RICH_METADATA_RENDERER_STYLE_BOX_ART":return 70;case"RICH_METADATA_RENDERER_STYLE_TOPIC":return 96;case"RICH_METADATA_RENDERER_STYLE_SQUARE":return 100;default:return 68;}}; e.computeThumbnailObjectFit=function(a){switch(a){case"RICH_METADATA_RENDERER_STYLE_SQUARE":return"CONTAIN";}}; g.Object.defineProperties(sW.prototype,{endpointHref:{configurable:!0,enumerable:!0,get:function(){var a;return(null===(a=this.data)||void 0===a?0:a.endpoint)?this.componentBehavior.computeOptionalHref_(this.data.endpoint):null}}}); g.Object.defineProperties(sW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dab){var a=document.createElement("template");a.innerHTML="\n \n \n
\n
[[getSimpleString(data.title)]]
\n
\n [[getSimpleString(data.subtitle)]]\n
\n \n
\n
[[getSimpleString(data.callToAction)]]
\n \n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cab){var d=document.createElement("template");d.innerHTML=""; cab=d}d=cab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dab=a}a=dab;return a}}}); var tW=sW;tW.prototype.onYtNavigate=tW.prototype.onYtNavigate;tW.prototype.onClick=tW.prototype.onClick;tW.prototype.onDataChanged=tW.prototype.onDataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],tW.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],tW.prototype,"componentBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],tW.prototype,"actionSenderBehavior",void 0); w([P(Z),x("design:type",Object)],tW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],tW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],tW.prototype,"componentStyle",void 0);w([R({computed:"computeThumbnailObjectFit(data.style)"}),x("design:type",String)],tW.prototype,"thumbnailObjectFit",void 0); w([R({computed:"computeThumbnailWidth(data.style)"}),x("design:type",Number)],tW.prototype,"thumbnailWidth",void 0);w([CE("#endpoint-link"),x("design:type",HTMLAnchorElement)],tW.prototype,"endpointLink",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],tW.prototype,"onDataChanged",null);w([BE("data.endpoint"),x("design:type",Object),x("design:paramtypes",[])],tW.prototype,"endpointHref",null); w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],tW.prototype,"onClick",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],tW.prototype,"onYtNavigate",null);tW=w([V({is:"ytd-rich-metadata-renderer"})],tW);var eab;var fab;var uW=function(){return O.apply(this,arguments)||this}; p(uW,O);uW.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richMetadataRenderer:"ytd-rich-metadata-renderer"}}}}; uW.prototype.computeHasDividerLine=function(a){return a}; g.Object.defineProperties(uW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fab){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===eab){var d=document.createElement("template");d.innerHTML=""; eab=d}d=eab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fab=a}a=fab;return a}}}); var vW=uW;w([P(Z),x("design:type",Object)],vW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],vW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDividerLine(data.hasDividerLine)"}),x("design:type",Boolean)],vW.prototype,"hasDividerLine",void 0);vW=w([V({is:"ytd-rich-metadata-row-renderer"})],vW);var gab;var hab;var wW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-button-refresh-action":"handleButtonRefreshAction","yt-unsubscribe-action":"handleUnsubscribeAction"};return a}; p(wW,O);e=wW.prototype;e.configureRendererStamper=function(){return{"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.analyticsButton":{id:"analytics-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.handleButtonRefreshAction=function(a){a.buttonRefreshAction&&this.set("data.membershipButton",a.buttonRefreshAction.membershipButton)}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.handleUnsubscribeAction=function(){this.data&&this.data.membershipButton&&"STYLE_PRIMARY"===this.data.membershipButton.buttonRenderer.style&&this.$$("#sponsor-button ytd-button-renderer").set("data.style","STYLE_SUGGESTIVE")}; g.Object.defineProperties(wW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hab){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gab){var d=document.createElement("template");d.innerHTML=""; gab=d}d=gab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hab=a}a=hab;return a}}}); var xW=wW;xW.prototype.onYtServiceRequestError=xW.prototype.onYtServiceRequestError;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],xW.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],xW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],xW.prototype,"ytRendererstamperBehavior",void 0);w([P($V),x("design:type",Object)],xW.prototype,"ytOpenToastBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],xW.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],xW.prototype,"data",void 0);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],xW.prototype,"onYtServiceRequestError",null);xW=w([V({is:"ytd-video-owner-renderer"})],xW);var iab;var jab;var yW=function(){return O.apply(this,arguments)||this}; p(yW,O);yW.prototype.computeObjectFit=function(a){return"CARD_RENDERER_STYLE_TYPE_UNIVERSAL_WATCH_CARD_MOVIE_POSTER"===a||"CARD_RENDERER_STYLE_TYPE_MOVIE_POSTER"===a?"COVER":"FILL"}; yW.prototype.computeCardStyle=function(a){return a?a.replace("CARD_RENDERER_STYLE_TYPE_","").toLowerCase():""}; g.Object.defineProperties(yW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jab){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n
[[getSimpleString(data.query)]]
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===iab){var d=document.createElement("template");d.innerHTML=""; iab=d}d=iab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jab=a}a=jab;return a}}}); var zW=yW;w([P(X.YtRendererBehavior),x("design:type",Object)],zW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],zW.prototype,"data",void 0);w([R({computed:"computeObjectFit(data.searchRefinementCardRendererStyle.value)"}),x("design:type",Number)],zW.prototype,"objectFit",void 0);w([R({reflectToAttribute:!0,computed:"computeCardStyle(data.searchRefinementCardRendererStyle.value)"}),x("design:type",String)],zW.prototype,"cardStyle",void 0); zW=w([V({is:"ytd-search-refinement-card-renderer"})],zW);var kab;var lab;var AW=function(){return O.apply(this,arguments)||this}; p(AW,O);AW.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; AW.prototype.onClick=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.sourceEndpoint;!NR(Polymer.dom(a).path,this,["A".toString()])&&c&&this.fire("yt-navigate",{endpoint:c})}; g.Object.defineProperties(AW.prototype,{showMetadataAtTop:{configurable:!0,enumerable:!0,get:function(){return this.data&&!(!this.data.source&&!this.data.publishedTimeText)&&!!this.data.sourceAtTop}}, showMetadataBelowTitle:{configurable:!0,enumerable:!0,get:function(){return this.data&&!(!this.data.source&&!this.data.publishedTimeText)&&!this.data.sourceAtTop}}, hasMenu:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.menu)}}, truncateParagraphs:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.truncateParagraphs)}}, background:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.background?this.data.background.replace("INFO_PANEL_CONTENT_BACKGROUND_",""):""}}}); g.Object.defineProperties(AW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lab){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n \n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kab){var d=document.createElement("template");d.innerHTML=""; kab=d}d=kab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lab=a}a=lab;return a}}}); var BW=AW;w([P(X.YtRendererBehavior),x("design:type",Object)],BW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],BW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],BW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],BW.prototype,"showVerticalDividers",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],BW.prototype,"showMetadataAtTop",null); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],BW.prototype,"showMetadataBelowTitle",null);w([R({reflectToAttribute:!0}),BE("data.menu"),x("design:type",Object),x("design:paramtypes",[])],BW.prototype,"hasMenu",null);w([R({reflectToAttribute:!0}),BE("data.truncateParagraphs"),x("design:type",Object),x("design:paramtypes",[])],BW.prototype,"truncateParagraphs",null); w([R({type:String,reflectToAttribute:!0}),BE("data.background"),x("design:type",Object),x("design:paramtypes",[])],BW.prototype,"background",null);BW=w([V({is:"ytd-info-panel-content-renderer"})],BW);var mab;var nab;var CW=function(){return O.apply(this,arguments)||this}; p(CW,O);CW.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{richListHeaderRenderer:"ytd-rich-list-header-renderer"}},"data.contents":{id:"contents",mapping:{gridVideoRenderer:{component:"ytd-grid-video-renderer",properties:{isSearch:"[[isSearch]]"}}}}}}; g.Object.defineProperties(CW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nab){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mab){var d=document.createElement("template");d.innerHTML=""; mab=d}d=mab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nab=a}a=nab;return a}}}); var DW=CW;w([P(X.YtRendererBehavior),x("design:type",Object)],DW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],DW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],DW.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],DW.prototype,"isSearch",void 0);DW=w([V({is:"ytd-preview-card-renderer"})],DW);var oab;var pab;var EW=function(){return O.apply(this,arguments)||this}; p(EW,O);EW.prototype.configureRendererStamper=function(){return{"data.channelThumbnail":{id:"avatar",mapping:{channelThumbnailWithLinkRenderer:"yt-channel-thumbnail-with-link-renderer"}}}}; EW.prototype.computeTitleStyle=function(a){return a||null}; EW.prototype.computeAvatarStyle=function(a){return a||null}; g.Object.defineProperties(EW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pab){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===oab){var d=document.createElement("template");d.innerHTML=""; oab=d}d=oab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pab=a}a=pab;return a}}}); var FW=EW;w([P(X.YtRendererBehavior),x("design:type",Object)],FW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],FW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],FW.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeTitleStyle(data.titleStyle.style)"}),x("design:type",String)],FW.prototype,"titleStyle",void 0); w([R({reflectToAttribute:!0,computed:"computeAvatarStyle(data.channelThumbnail.channelThumbnailWithLinkRenderer.style)"}),x("design:type",String)],FW.prototype,"avatarStyle",void 0);FW=w([V({is:"ytd-rich-list-header-renderer"})],FW);var qab;var rab;Polymer({is:"yt-channel-thumbnail-with-link-renderer",_template:function(){if(void 0!==rab)return rab;var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qab){var d=document.createElement("template");d.innerHTML=""; qab=d}d=qab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return rab=a}, behaviors:[X.YtRendererBehavior],properties:{data:Object,style_:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},computeStyle_:function(a){return a}});var sab;var tab;var GW=function(){var a=O.apply(this,arguments)||this;a.isSearch=!1;return a}; p(GW,O);e=GW.prototype; e.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{searchRefinementCardRenderer:"ytd-search-refinement-card-renderer",compactChannelRecommendationCardRenderer:"ytd-compact-channel-recommendation-card-renderer",videoCardRenderer:"ytd-grid-video-renderer",gameCardRenderer:"ytd-game-card-renderer",infoPanelContentRenderer:{component:"ytd-info-panel-content-renderer",params:{showVerticalDividers:!0}},previewCardRenderer:{component:"ytd-preview-card-renderer",properties:{isSearch:"[[isSearch]]"}}}}, "data.header":{id:"header",mapping:{titleAndButtonListHeaderRenderer:"ytd-title-and-button-list-header-renderer",richListHeaderRenderer:"ytd-rich-list-header-renderer"}},"data.sortFilter":{id:"sort-filter",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.button":{id:"header-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.previousButton":{id:"left-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}, attributes:{arrow:!0}}},initialRenderPriority:0,waitForSignal:"eocs"},"data.nextButton":{id:"right-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"},attributes:{arrow:!0}}}}}}; e.getItemsPath=function(){return"data.cards"}; e.dataChanged=function(){this.ytdHorizontalListBehavior.reset()}; e.computeCardListStyle_=function(a){return a||null}; e.computeEmpty_=function(a){return!this.get("cards.length",a)}; e.computeThumbnailStyle_=function(a){return this.get("header.richListHeaderRenderer.channelThumbnail.channelThumbnailWithLinkRenderer.style",a)||null}; e.computeHasSubtitle_=function(a){return!!this.get("header.richListHeaderRenderer.subtitle",a)}; e.computeInitialCountNumber_=function(a){return"HORIZONTAL_CARD_LIST_STYLE_TYPE_CHANNEL_SHELF"===a?6:"HORIZONTAL_CARD_LIST_STYLE_TYPE_INLINE_RECOMMENDATIONS"===a?8:"HORIZONTAL_CARD_LIST_STYLE_TYPE_NARROW_SHELF"===a?10:4}; e.computeUseFloorScrolling_=function(a){return"HORIZONTAL_CARD_LIST_STYLE_TYPE_RELATED_CHANNELS"===a}; e.computeHasGameCard_=function(a){return(a=this.get("cards",a))?a.some(function(b){return b.gameCardRenderer}):!1}; e.computeHasInfoPanel=function(a){var b;return null===(b=null===a||void 0===a?void 0:a.cards)||void 0===b?void 0:b.some(function(c){return c.infoPanelContentRenderer})}; e.handleKeyDown_=function(){this.ytdHorizontalListBehavior.fillRemainingListItems();this.ytRendererBehavior.markDirty()}; g.Object.defineProperties(GW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tab){var a=document.createElement("template");a.innerHTML="
\n

\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sab){var d=document.createElement("template");d.innerHTML=""; sab=d}d=sab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tab=a}a=tab;return a}}}); var HW=GW;HW.prototype.dataChanged=HW.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],HW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],HW.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ.YtdHorizontalListBehavior),x("design:type",Object)],HW.prototype,"ytdHorizontalListBehavior",void 0);w([R(),x("design:type",Object)],HW.prototype,"data",void 0); w([R({computed:"computeInitialCountNumber_(data.style.type)"}),x("design:type",Number)],HW.prototype,"initialCount",void 0);w([R({computed:"computeUseFloorScrolling_(data.style.type)"}),x("design:type",Boolean)],HW.prototype,"useFloorScrolling",void 0);w([R({reflectToAttribute:!0,computed:"computeCardListStyle_(data.style.type)"}),x("design:type",Object)],HW.prototype,"cardListStyle",void 0); w([R({value:!0,reflectToAttribute:!0,computed:"computeEmpty_(data)"}),x("design:type",Boolean)],HW.prototype,"empty",void 0);w([R({reflectToAttribute:!0,computed:"computeHasSubtitle_(data)"}),x("design:type",Boolean)],HW.prototype,"hasSubtitle",void 0);w([R({reflectToAttribute:!0,computed:"computeThumbnailStyle_(data)"}),x("design:type",Boolean)],HW.prototype,"thumbnailStyle_",void 0); w([R({readOnly:!0,reflectToAttribute:!0,computed:"computeHasGameCard_(data)"}),x("design:type",Boolean)],HW.prototype,"hasGameCard",void 0);w([R({readOnly:!0,reflectToAttribute:!0,computed:"computeHasInfoPanel(data)"}),x("design:type",Boolean)],HW.prototype,"hasInfoPanel",void 0);w([R(),x("design:type",Object)],HW.prototype,"isSearch",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],HW.prototype,"dataChanged",null); HW=w([V({is:"ytd-horizontal-card-list-renderer"})],HW);var uab;var vab;var wab=function(){return O.apply(this,arguments)||this}; p(wab,O); g.Object.defineProperties(wab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vab){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uab){var d=document.createElement("template");d.innerHTML=""; uab=d}d=uab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vab=a}a=vab;return a}}}); var IW=wab;w([P(X.YtRendererBehavior),x("design:type",Object)],IW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],IW.prototype,"data",void 0);IW=w([V({is:"ytd-title-and-button-list-header-renderer"})],IW);var xab;var yab;var JW=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-description-action":"handleUpdateDescriptionAction"};return a}; p(JW,O);e=JW.prototype;e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:{component:"ytd-subscribe-button-renderer",params:{withCount:!0}},subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},"data.membershipButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.expand=function(){this.expanded=!0;this.fire("yt-metadata-expanded",!0)}; e.collapse=function(){this.expanded&&(this.expanded=!1,this.fire("yt-metadata-expanded",!1))}; e.handleUpdateDescriptionAction=function(a){this.description.hidden=a.updateDescriptionAction.isEmpty;this.set("data.description",a.updateDescriptionAction.description)}; g.Object.defineProperties(JW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yab){var a=document.createElement("template");a.innerHTML="
\u2014 [[getSimpleString(data.description)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xab){var d=document.createElement("template");d.innerHTML=""; xab=d}d=xab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yab=a}a=yab;return a}}}); var KW=JW;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],KW.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],KW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],KW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],KW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],KW.prototype,"expanded",void 0); w([CE("#description"),x("design:type",Object)],KW.prototype,"description",void 0);KW=w([V({is:"ytd-video-secondary-info-renderer-fixie"})],KW);var zab;var Aab;var LW=function(){var a=O.apply(this,arguments)||this;a.isCollapsed=!1;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-update-donation-shelf-command":"handleUpdate_","yt-open-popup-action":"handleOpenPopupAction_"};return a}; p(LW,O);e=LW.prototype;e.configureRendererStamper=function(){return{"data.donateButton":{id:"donate-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme_=document.documentElement.hasAttribute("dark")}; e.onDonateTap_=function(){var a=this.get("data.donateButton.buttonRenderer.command");if(a){var b=Tn(),c=this.get("data.donateButton.buttonRenderer.trackingParams");b&&c&&BJ(b,Nn(c));this.ytOpenPopupBehavior.openPopup(a)}}; e.onShowMore_=function(){this.isCollapsed=!1;var a=Tn(),b=this.get("data.expandButton.buttonRenderer.trackingParams");a&&b&&BJ(a,Nn(b))}; e.onShowLess_=function(){this.isCollapsed=!0}; e.dataChanged_=function(){this.updateStyles({"--progress-bar-completion":100*this.data.progress+"%"})}; e.onDarkModeToggledAction_=function(a){this.isDarkTheme_=a}; e.handleUpdate_=function(a){if(a=this.get("updateDonationShelfCommand.donationShelf.donationShelfRenderer",a))this.set("data.startLabel",a.startLabel),this.set("data.endLabel",a.endLabel),this.set("data.progress",a.progress),this.set("data.amountRaisedLabel",a.amountRaisedLabel),this.dataChanged_()}; e.handleOpenPopupAction_=function(a){this.get("openPopupAction.popup.ypcTransactionErrorMessageRenderer",a)&&this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["yt-loading-renderer"])}; e.computeHeaderBackgroundUrl_=function(a,b){if(a)return b?a.headerBackgroundDarkUrl:a.headerBackgroundUrl}; e.isProgressBarVisible=function(a){return!(!a||void 0===a.progress)}; e.headerBackgroundClass=function(){return"rtl"===A("HTML_DIR",void 0)?"flip":""}; g.Object.defineProperties(LW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Aab){var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.headerTitle)]]\n
\n \n
\n\n
\n
\n \n \n
\n
\n [[getSimpleString(data.campaignTitle)]]\n
\n
\n [[getSimpleString(data.campaignSubtitle)]]\n
\n
\n
\n
\n \n \n \n
\n\n\n\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zab){var d=document.createElement("template");d.innerHTML=""; zab=d}d=zab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aab=a}a=Aab;return a}}}); var MW=LW;w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],MW.prototype,"ytOpenPopupBehavior",void 0);w([P(Z),x("design:type",Object)],MW.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],MW.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],MW.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],MW.prototype,"ytActionSenderBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],MW.prototype,"data",void 0);w([R(),x("design:type",Object)],MW.prototype,"isCollapsed",void 0);w([R({computed:"computeHeaderBackgroundUrl_(data, isDarkTheme_)"}),x("design:type",String)],MW.prototype,"headerBackgroundUrl_",void 0);w([R(),x("design:type",Boolean)],MW.prototype,"isDarkTheme_",void 0);MW=w([V({is:"ytd-donation-shelf-renderer"})],MW);var Bab;var Cab;var Dab=function(){return O.apply(this,arguments)||this}; p(Dab,O); g.Object.defineProperties(Dab,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cab){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bab){var d=document.createElement("template");d.innerHTML=""; Bab=d}d=Bab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cab=a}a=Cab;return a}}}); var Eab=Dab;w([R(),x("design:type",Object)],Eab.prototype,"data",void 0);Eab=w([V({is:"ytd-donation-unavailable-renderer"})],Eab);var Fab;var Gab;var NW=function(){var a=O.apply(this,arguments)||this;a.playerListenerConfig=null;return a}; p(NW,O);e=NW.prototype;e.dataChanged=function(){var a=KM(this);a&&a.getPlayerPromise().then(this.maybeRemovePlayerListeners.bind(this));var b=this.data&&this.data.survey;b&&((b=(b=b.singleOptionSurveyRenderer||b.checkboxSurveyRenderer)&&b.watchPageDisplayTriggers)?this.triggerWatchPageSurvey(a,b):this.openSurvey())}; e.triggerWatchPageSurvey=function(a,b){return Za(this,function d(){var f=this,h,l,m,n,r,v,z;return za(d,function(C){if(1==C.nextAddress)return a?q(C,a.getPlayerPromise(),2):C.return();f.player=C.yieldResult;if(!f.player)return C.return();h={};l=k(b);for(m=l.next();!m.done;m=l.next())n=m.value,r=k(f.createEventListenerPair(n)),v=r.next().value,z=r.next().value,v&&z&&(h[v]=z,f.ytPlayerListenerBehavior.listenToPlayerEvent(f.player,v,z));f.playerListenerConfig=h;ra(C)})})}; e.createEventListenerPair=function(a){var b=a.playbackEventTrigger;return b?this.handlePlaybackTrigger(b):(a=a.watchTimeTrigger)?this.handleWatchTimeTrigger(a):[void 0,void 0]}; e.handleWatchTimeTrigger=function(a){var b=this;this.accumulatedMediaTime=this.lastKnownPlaybackPosition=0;var c=a.videoWatchFraction,d=a.watchTimeSec;return d&&c?["onVideoProgress",function(){b.player&&b.isWatchTimeConditionMet(b.player,c,d)&&b.showSurvey()}]:[void 0, void 0]}; e.isWatchTimeConditionMet=function(a,b,c){var d=a.getProgressState(),f=d.current-this.lastKnownPlaybackPosition;5>f&&(this.accumulatedMediaTime+=f);this.lastKnownPlaybackPosition=d.current;d=Math.round(this.accumulatedMediaTime/d.duration*1E3)/1E3;return a.getPresentingPlayerType&&1===a.getPresentingPlayerType()&&(this.accumulatedMediaTime>c||d>b)}; e.handlePlaybackTrigger=function(a){var b=this;a=a.playbackEvent;if("SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_PLAYBACK_FINISH"===a){var c="onStateChange";var d=function(f){0===f&&b.showSurvey()}}else"SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_CONTENT_VIDEO_START"===a?(c="onVideoProgress",d=function(f){b.player&&b.player.getPresentingPlayerType&&1===b.player.getPresentingPlayerType()&&f&&b.showSurvey()}):"SURVEY_DISPLAY_TRIGGER_PLAYBACK_EVENT_AD_FINISH"===a&&(c="onAdEnd",d=this.showSurvey); return[c,d]}; e.showSurvey=function(){this.openSurvey();this.player&&this.maybeRemovePlayerListeners(this.player)}; e.openSurvey=function(){this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"SURVEY",popup:this.data&&this.data.survey}})}; e.maybeRemovePlayerListeners=function(a){if(this.playerListenerConfig){for(var b=k(Object.keys(this.playerListenerConfig)),c=b.next();!c.done;c=b.next())c=c.value,this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(a,c,this.playerListenerConfig[c]);this.playerListenerConfig=null}}; g.Object.defineProperties(NW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gab){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fab){var d=document.createElement("template");d.innerHTML="";Fab=d}d=Fab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gab=a}a=Gab;return a}}}); var OW=NW;OW.prototype.dataChanged=OW.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],OW.prototype,"ytRendererBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],OW.prototype,"ytdOpenPopupBehavior",void 0);w([P(TP),x("design:type",d1a)],OW.prototype,"ytPlayerListenerBehavior",void 0);w([R(),x("design:type",Object)],OW.prototype,"data",void 0);w([R(),x("design:type",Object)],OW.prototype,"playerListenerConfig",void 0); w([R({value:0}),x("design:type",Number)],OW.prototype,"lastKnownPlaybackPosition",void 0);w([R({value:0}),x("design:type",Number)],OW.prototype,"accumulatedMediaTime",void 0);w([R(),x("design:type",Object)],OW.prototype,"player",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],OW.prototype,"dataChanged",null);OW=w([V({is:"ytd-survey-trigger-renderer"})],OW);var Hab;var Iab;TO("itemSectionRenderer","infoPanelContainerRenderer","ytd-info-panel-container-renderer");var PW=function(){return O.apply(this,arguments)||this}; p(PW,O);PW.prototype.configureRendererStamper=function(){return{"data.menu":{id:"header-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content":{id:"content",mapping:{infoPanelContentRenderer:"ytd-info-panel-content-renderer",horizontalCardListRenderer:"ytd-horizontal-card-list-renderer"}}}}; g.Object.defineProperties(PW.prototype,{background:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.background?this.data.background.replace("INFO_PANEL_CONTAINER_BACKGROUND_",""):""}}}); g.Object.defineProperties(PW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Iab){var a=document.createElement("template");a.innerHTML="
\n

\n \n \n \n

\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hab){var d=document.createElement("template");d.innerHTML=""; Hab=d}d=Hab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Iab=a}a=Iab;return a}}}); var QW=PW;w([P(X.YtRendererBehavior),x("design:type",Object)],QW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],QW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],QW.prototype,"data",void 0);w([R({type:String,reflectToAttribute:!0}),BE("data.background"),x("design:type",Object),x("design:paramtypes",[])],QW.prototype,"background",null);QW=w([V({is:"ytd-info-panel-container-renderer"})],QW);var Jab;var Kab;var Lab=function(a){ab.call(this,a)}; p(Lab,ab);var Mab=function(a){ab.call(this,a)}; p(Mab,Lab);var Nab=function(a){ab.call(this,a)}; p(Nab,Lab);var RW=function(){return O.apply(this,arguments)||this}; p(RW,O);RW.prototype.onTap=function(){var a=this,b=!1,c=this.get("serviceEndpoint.selectActiveIdentityEndpoint.supportedTokens",this.data);c&&c.forEach(function(d){if(d.accountSigninToken)if(b=!0,a.onAccountItemTap)a.onAccountItemTap(d.accountSigninToken.signinUrl);else SN(d.accountSigninToken.signinUrl,void 0,void 0,window.top)}); b||Zm(new Mab("Did not handle account switch tap. No token."))}; g.Object.defineProperties(RW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kab){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n \n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jab){var d=document.createElement("template");d.innerHTML=""; Jab=d}d=Jab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kab=a}a=Kab;return a}}}); var SW=RW;SW.prototype.onTap=SW.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],SW.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],SW.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],SW.prototype,"onAccountItemTap",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],SW.prototype,"onTap",null);SW=w([V({is:"ytd-account-item-renderer"})],SW);var Oab;var Pab;var TW=function(){return O.apply(this,arguments)||this}; p(TW,O);TW.prototype.configureRendererStamper=function(){return{"data.searchBox":{id:"search-box",mapping:{searchBoxRenderer:"ytd-search-box-renderer",channelSwitcherSearchBoxRenderer:"ytd-channel-switcher-search-box-renderer"}}}}; g.Object.defineProperties(TW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pab){var a=document.createElement("template");a.innerHTML="

\n \n

\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Oab){var d=document.createElement("template");d.innerHTML=""; Oab=d}d=Oab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pab=a}a=Pab;return a}}}); var UW=TW;w([P(X.YtRendererBehavior),x("design:type",Object)],UW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],UW.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],UW.prototype,"data",void 0);UW=w([V({is:"ytd-channel-switcher-header-renderer"})],UW);var Qab;var Rab;var VW=function(){var a=O.apply(this,arguments)||this;a.boundSubmitSearch=a.submitSearch.bind(a);a.boundClearSearch=a.clearSearch.bind(a);return a}; p(VW,O);e=VW.prototype;e.configureRendererStamper=function(){return{"data.searchButton":{id:"search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundSubmitSearch]]"}}}},"data.clearButton":{id:"clear-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundClearSearch]]"}}}}}}; e.toggleClearButton=function(){this.hideClearButton=ue||!this.input.value}; e.submitOnEnterKeyUp=function(a){13!==a.keyCode||this.input.invalid||this.submit(this.input.value)}; e.clearSearch=function(){this.submit("")}; e.submitSearch=function(){this.input.invalid||this.submit(this.input.value)}; e.submit=function(a){var b=y.unsafeClone(this.data.endpoint);b.getAccountsListInnertubeEndpoint&&(b.getAccountsListInnertubeEndpoint.channelSwitcherQuery=a,this.actionSenderBehavior.sendServiceRequestAction([b]))}; g.Object.defineProperties(VW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rab){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qab){var d=document.createElement("template");d.innerHTML=""; Qab=d}d=Qab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rab=a}a=Rab;return a}}}); var WW=VW;WW.prototype.toggleClearButton=WW.prototype.toggleClearButton;w([P(X.YtRendererBehavior),x("design:type",Object)],WW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],WW.prototype,"ytRendererstamperBehavior",void 0);w([P([W.YtActionSenderBehavior]),x("design:type",Object)],WW.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],WW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],WW.prototype,"hideClearButton",void 0); w([R(),x("design:type",Object)],WW.prototype,"boundSubmitSearch",void 0);w([R(),x("design:type",Object)],WW.prototype,"boundClearSearch",void 0);w([CE("#input"),x("design:type",Object)],WW.prototype,"input",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WW.prototype,"toggleClearButton",null);WW=w([V({is:"ytd-channel-switcher-search-box-renderer"})],WW);var Sab;var Uab;var XW=function(){var a=O.apply(this,arguments)||this;a.boundSubmit=a.submit.bind(a);return a}; p(XW,O);e=XW.prototype;e.configureRendererStamper=function(){return{"data.searchButton":{id:"search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundSubmit]]"}}}},"data.clearButton":{id:"clear-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.ready=function(){this.form.addEventListener("submit",this.onSubmit.bind(this))}; e.onSubmit=function(a){a.preventDefault();return!1}; e.toggleClearButton=function(){this.hideClearButton=ue||!this.input.value}; e.submitOnEnterKeyUp=function(a){13===a.keyCode&&this.submit()}; e.submit=function(){var a=this.data.endpoint,b=y.unsafeClone(a);N("kevlar_include_query_in_search_endpoint")&&(b.browseEndpoint?b.browseEndpoint.query=this.input.value:b.searchEndpoint&&(b.searchEndpoint.query=this.input.value));b.commandMetadata&&b.commandMetadata.webCommandMetadata&&b.commandMetadata.webCommandMetadata.url?(b.commandMetadata.webCommandMetadata.url=Md(b.commandMetadata.webCommandMetadata.url,"query",this.input.value),this.fire("yt-navigate",{endpoint:b})):b.getAccountsListInnertubeEndpoint?( b.getAccountsListInnertubeEndpoint.channelSwitcherQuery=this.input.value,this.actionSenderBehavior.sendServiceRequestAction([b])):Zm(Error("Error: Trying to navigate to an endpoint without url: "+JSON.stringify(a)))}; e.getUrl=function(a){return this.get("commandMetadata.webCommandMetadata.url",a)}; g.Object.defineProperties(XW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Uab){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sab){var d=document.createElement("template");d.innerHTML=""; Sab=d}d=Sab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Uab=a}a=Uab;return a}}}); var YW=XW;YW.prototype.toggleClearButton=YW.prototype.toggleClearButton;w([P(X.YtRendererBehavior),x("design:type",Object)],YW.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],YW.prototype,"ytRendererstamperBehavior",void 0);w([P([W.YtActionSenderBehavior]),x("design:type",Object)],YW.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],YW.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],YW.prototype,"hideClearButton",void 0); w([R(),x("design:type",Object)],YW.prototype,"boundSubmit",void 0);w([CE("#form"),x("design:type",HTMLFormElement)],YW.prototype,"form",void 0);w([CE("#input"),x("design:type",Object)],YW.prototype,"input",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],YW.prototype,"toggleClearButton",null);YW=w([V({is:"ytd-search-box-renderer"})],YW);var Vab;var Wab;var ZW=function(){var a=O.apply(this,arguments)||this;a.hasContents=!1;a.actionMap={"yt-update-channel-switcher-page-action":"updateChannelSwitcherAction"};return a}; p(ZW,O);e=ZW.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.computeHasContents=function(a){var b;return(null===a||void 0===a?0:a.contents)&&0<(null===(b=null===a||void 0===a?void 0:a.contents)||void 0===b?void 0:b.length)?!0:!1}; e.updateChannelSwitcherAction=function(a){var b,c;void 0!==(null===(c=null===(b=null===a||void 0===a?void 0:a.updateChannelSwitcherPageAction)||void 0===b?void 0:b.page)||void 0===c?void 0:c.channelSwitcherPageRenderer)&&(this.data=a.updateChannelSwitcherPageAction.page.channelSwitcherPageRenderer)}; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{channelSwitcherHeaderRenderer:"ytd-channel-switcher-header-renderer"}},"data.contents":{id:"contents",mapping:{buttonRenderer:"ytd-button-renderer",accountItemRenderer:"ytd-account-item-renderer",continuationItemRenderer:"ytd-continuation-item-renderer"}}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; g.Object.defineProperties(ZW,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wab){var a=document.createElement("template");a.innerHTML="
\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vab){var d=document.createElement("template");d.innerHTML=""; Vab=d}d=Vab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wab=a}a=Wab;return a}}}); var $W=ZW;w([P(X.YtRendererBehavior),x("design:type",Object)],$W.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],$W.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],$W.prototype,"actionHandlerBehavior",void 0);w([P(yU),x("design:type",Object)],$W.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],$W.prototype,"data",void 0); w([R({reflectToAttribute:!0,computed:"computeHasContents(data)"}),x("design:type",Boolean)],$W.prototype,"hasContents",void 0);$W=w([V({is:"ytd-channel-switcher-page-renderer"})],$W);var Xab;var Yab;var aX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(aX,O);aX.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme=document.documentElement.hasAttribute("dark")}; aX.prototype.computeBannerImageUrl=function(a,b){if(void 0!==a){var c=a.thumbnail.thumbnails;b&&(c=a.thumbnailDark.thumbnails);this.bannerImageUrl=(a=wO(c,24,void 0,"height"))?a:void 0}}; aX.prototype.onDarkModeToggledAction=function(a){this.isDarkTheme=a}; aX.prototype.computeHasText=function(a){return!!a}; g.Object.defineProperties(aX.prototype,{bannerStyle:{configurable:!0,enumerable:!0,get:function(){if(this.bannerImageUrl)return ec({"background-image":ac(this.bannerImageUrl)})}}}); g.Object.defineProperties(aX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Yab){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xab){var d=document.createElement("template");d.innerHTML=""; Xab=d}d=Xab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yab=a}a=Yab;return a}}}); var bX=aX;bX.prototype.computeHasText=bX.prototype.computeHasText;bX.prototype.computeBannerImageUrl=bX.prototype.computeBannerImageUrl;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],bX.prototype,"ytActionHandlerBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],bX.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],bX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],bX.prototype,"data",void 0); w([R(),x("design:type",Boolean)],bX.prototype,"isDarkTheme",void 0);w([R(),x("design:type",String)],bX.prototype,"bannerImageUrl",void 0);w([R({reflectToAttribute:!0,computed:"computeHasText(data.text)"}),x("design:type",Boolean)],bX.prototype,"hasText",void 0);w([U("data","isDarkTheme"),x("design:type",Function),x("design:paramtypes",[Object,Boolean]),x("design:returntype",void 0)],bX.prototype,"computeBannerImageUrl",null); w([U("data.text"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],bX.prototype,"computeHasText",null);w([BE("bannerImageUrl"),x("design:type",Object),x("design:paramtypes",[])],bX.prototype,"bannerStyle",null);bX=w([V({is:"ytd-backstage-prefilled-post-dialog-header-renderer"})],bX);var Zab;var $ab;var abb=function(){return O.apply(this,arguments)||this}; p(abb,O); g.Object.defineProperties(abb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$ab){var a=document.createElement("template");a.innerHTML="\n[[getSimpleString(data.title)]]\n[[getSimpleString(data.text)]]\n\n[[getSimpleString(data.footer)]]\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zab){var d=document.createElement("template");d.innerHTML=""; Zab=d}d=Zab;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$ab=a}a=$ab;return a}}}); var cX=abb;w([P(X.YtRendererBehavior),x("design:type",Object)],cX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],cX.prototype,"data",void 0);cX=w([V({is:"ytd-backstage-zero-state-renderer"})],cX);var bbb;var cbb;var dbb={"data.actionButton":{id:"schedule-button",mapping:{buttonRenderer:"ytd-button-renderer"}}},dX=function(){return O.apply(this,arguments)||this}; p(dX,O);dX.prototype.configureRendererStamper=function(){return dbb}; g.Object.defineProperties(dX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===cbb){var a=document.createElement("template");a.innerHTML="\n[[getSimpleString(data.title)]]\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bbb){var d=document.createElement("template");d.innerHTML=""; bbb=d}d=bbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);cbb=a}a=cbb;return a}}}); var eX=dX;w([P(X.YtRendererBehavior),x("design:type",Object)],eX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],eX.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],eX.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],eX.prototype,"icon",void 0);eX=w([V({is:"ytd-post-scheduling-zero-state-renderer"})],eX);var ebb;var fbb;var fX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-update-posts-total-count-action":"handleUpdatePostsTotalCountAction"};return a}; p(fX,O);fX.prototype.onTabsActivate=function(a){this.data&&this.data.tabs&&this.fire("yt-navigate",{endpoint:this.data.tabs[a.detail.selected].navigationEndpoint})}; fX.prototype.shouldShowTotalCount=function(a){return a&&void 0!==a.totalCount}; fX.prototype.handleUpdatePostsTotalCountAction=function(a){var b=this.get(["data.tabs",1,"totalCount"]),c=this.get("updatePostsTotalCountAction.updateType",a);a=this.get("updatePostsTotalCountAction.number",a);void 0!==b&&"UPDATE_POSTS_TOTAL_COUNT_TYPE_UNKNOWN"!==c&&a&&("UPDATE_POSTS_TOTAL_COUNT_TYPE_ADD"===c?this.set(["data.tabs",1,"totalCount"],Number(b)+a):"UPDATE_POSTS_TOTAL_COUNT_TYPE_REMOVE"===c&&this.set(["data.tabs",1,"totalCount"],Number(b)-a))}; g.Object.defineProperties(fX.prototype,{selected:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.tabs)for(var a=0,b=this.data.tabs.length;a
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ebb){var d=document.createElement("template");d.innerHTML=""; ebb=d}d=ebb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fbb=a}a=fbb;return a}}}); var gX=fX;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],gX.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],gX.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],gX.prototype,"data",void 0);w([BE("data.tabs"),x("design:type",Number),x("design:paramtypes",[])],gX.prototype,"selected",null);gX=w([V({is:"ytd-post-stream-filter-renderer"})],gX);var gbb;var hbb;var hX=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;a.commentDialog_=null;a.actionMap={"yt-create-comment-action":"onCreateCommentAction_"};return a}; p(hX,O);e=hX.prototype;e.configureRendererStamper=function(){return{"data.imageButton":{id:"image-button",mapping:{buttonRenderer:"ytd-button-renderer"}},commentDialog_:{id:"comment-dialog",mapping:{commentDialogRenderer:{component:"ytd-comment-dialog-renderer",properties:{zeroStepFooterText:"[[data.zeroStep.zeroStepChannelCreationRenderer.footerText]]"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){var a=this,b=this.$["placeholder-area"],c=function(d){d.stopPropagation();"keypress"===d.type&&13!==d.keyCode&&32!==d.keyCode||a.openDialog()}; this.$["simplebox-placeholder"].addEventListener("focus",c);b.addEventListener("tap",c);b.addEventListener("keypress",c)}; e.dataChanged_=function(){this.commentDialog_=null;this.isOpen=!1}; e.openDialog=function(){this.data&&(this.data.prepareAccountEndpoint?this.fire("yt-navigate",{endpoint:this.data.prepareAccountEndpoint}):(this.commentDialog_||(this.commentDialog_={commentDialogRenderer:this.computeCommentDialog_(this.data)}),this.isOpen=!0,this.$["comment-dialog"].firstElementChild.focus()))}; e.onYtCommentboxDismiss_=function(a){a.stopPropagation();this.isOpen=!1}; e.onCreateCommentAction_=function(a){this.get("createCommentAction.contents",a)&&(this.isOpen=!1)}; e.computeCommentDialog_=function(a){return{placeholderText:a.placeholderText,authorThumbnail:a.authorThumbnail,submitButton:a.submitButton,imageButton:a.imageButton,cancelButton:a.cancelButton,emojiButton:a.emojiButton,emojis:a.emojis,emojiPicker:a.emojiPicker,unicodeEmojisUrl:a.unicodeEmojisUrl}}; g.Object.defineProperties(hX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hbb){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gbb){var d=document.createElement("template");d.innerHTML=""; gbb=d}d=gbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hbb=a}a=hbb;return a}}}); var iX=hX;iX.prototype.onYtCommentboxDismiss_=iX.prototype.onYtCommentboxDismiss_;w([P(Z),x("design:type",Object)],iX.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],iX.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],iX.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],iX.prototype,"data",void 0); w([R(),x("design:type",Object)],iX.prototype,"isOpen",void 0);w([R(),x("design:type",Object)],iX.prototype,"commentDialog_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],iX.prototype,"enableCreationBox",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],iX.prototype,"onYtCommentboxDismiss_",null);iX=w([V({is:"ytd-comment-simplebox-renderer"})],iX);var ibb;var jbb;var jX=function(){var a=O.apply(this,arguments)||this;a.isPostSchedulingEnabled=N("enable_post_scheduling");a.hasFinishedStamping_=!1;a.handleOpenPostCommentDialogActionAfterStamp_=!1;a.actionMap={"yt-signal-action-open-post-comment-dialog":"handleSignalActionOpenPostCommentDialogAction_"};return a}; p(jX,O);e=jX.prototype; e.configureRendererStamper=function(){return{"data.createRenderer":{id:"simple-box",mapping:{commentSimpleboxRenderer:"ytd-comment-simplebox-renderer"}},backstagePostDialog_:{id:"backstage-post-dialog",mapping:{backstagePostDialogRenderer:{component:"ytd-backstage-post-dialog-renderer"}},events:!0},"data.sortMenu":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}},"data.alerts":{id:"alert",mapping:{alertWithButtonRenderer:"ytd-alert-with-button-renderer"},renderPriority:0, waitForSignal:"eocs"},"data.zeroStateMessage":{id:"zero-state-message",mapping:{backstageZeroStateRenderer:"ytd-backstage-zero-state-renderer"}},"data.prefilledCreateDialogHeaderMessage":{id:"prefilled-dialog-header",mapping:{backstagePrefilledPostDialogHeaderRenderer:"ytd-backstage-prefilled-post-dialog-header-renderer"}},"data.postStreamFilter":{id:"post-stream-filter",mapping:{postStreamFilterRenderer:"ytd-post-stream-filter-renderer"}},"data.schedulingZeroStateMessage":{id:"scheduling-zero-state-message", mapping:{postSchedulingZeroStateRenderer:"ytd-post-scheduling-zero-state-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_()}; e.onStampFinished_=function(){this.hasFinishedStamping_=!0;this.hasActionsChange_&&this.observePrefilledBackstagePostDialog_();this.handleOpenPostCommentDialogActionAfterStamp_&&this.handleSignalActionOpenPostCommentDialogAction_()}; e.onYtServiceRequestSent_=function(a,b){if(!N("kevlar_command_handler")&&b.actions)for(a=0;a ytd-backstage-post-dialog-renderer").openSchedulingPanel(c.showSchedulingPanelCommand)}}; e.observePrefilledBackstagePostDialog_=function(){var a;if(this.hasFinishedStamping_){if(this.hasActionsChange_=!1,this.getPrefilledBackstagePostDialog_(null===(a=this.data)||void 0===a?void 0:a.actions)){this.$["prefilled-dialog-header"].hidden=!1;var b=this.$["backstage-post-dialog"].firstElementChild;b&&Polymer.RenderStatus.afterNextRender(this,function(){b.focus();b.openDialog&&b.openDialog()})}}else this.hasActionsChange_=!0}; e.computeIsBackstage_=function(a){return a}; e.onYtCommentboxDismiss_=function(){this.$["prefilled-dialog-header"].hidden=!0;this.removePrefilledDialog_(this.data)}; e.removePrefilledDialog_=function(a){if(null===a||void 0===a?0:a.actions){for(var b=a.actions.length-1;0<=b;b--){var c=a.actions[b];c.createBackstagePostDialogEndpoint&&c.createBackstagePostDialogEndpoint.dialog&&delete a.actions[b]}this.set("data",void 0);this.set("data",a)}}; e.getPrefilledBackstagePostDialog_=function(a){if(a)for(var b=0;b\n\n
\n
\n
\n
\n\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ibb){var d=document.createElement("template");d.innerHTML=""; ibb=d}d=ibb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jbb=a}a=jbb;return a}}}); var kX=jX;kX.prototype.onYtCommentboxDismiss_=kX.prototype.onYtCommentboxDismiss_;kX.prototype.observePrefilledBackstagePostDialog_=kX.prototype.observePrefilledBackstagePostDialog_;kX.prototype.onYtServiceRequestSent_=kX.prototype.onYtServiceRequestSent_;kX.prototype.onStampFinished_=kX.prototype.onStampFinished_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],kX.prototype,"ytActionHandlerBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],kX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],kX.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],kX.prototype,"data",void 0);w([R({computed:"computeIsBackstage_(data.isBackstageContent)",reflectToAttribute:!0}),x("design:type",Boolean)],kX.prototype,"isBackstage",void 0); w([R({readOnly:!0,computed:"computeBackstagePostDialog_(data)"}),x("design:type",Object)],kX.prototype,"backstagePostDialog_",void 0);w([R(),x("design:type",Object)],kX.prototype,"isPostSchedulingEnabled",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kX.prototype,"onStampFinished_",null); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],kX.prototype,"onYtServiceRequestSent_",null);w([U("data.actions"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],kX.prototype,"observePrefilledBackstagePostDialog_",null);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],kX.prototype,"onYtCommentboxDismiss_",null); kX=w([V({is:"ytd-comments-header-renderer"})],kX);var kbb;var lbb;var lX=function(){var a=O.apply(this,arguments)||this;a.isDisplayed=!0;return a}; p(lX,O);e=lX.prototype;e.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.isDisplayed=!0}; e.computeType=function(a){return a||"UNKNOWN"}; e.onYtServiceRequestCompleted=function(a){a.stopPropagation();this.isDisplayed=!1}; e.onClose=function(){this.isDisplayed=!1}; g.Object.defineProperties(lX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lbb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kbb){var d=document.createElement("template");d.innerHTML=""; kbb=d}d=kbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lbb=a}a=lbb;return a}}}); var mX=lX;mX.prototype.onYtServiceRequestCompleted=mX.prototype.onYtServiceRequestCompleted;w([P(X.YtRendererBehavior),x("design:type",Object)],mX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],mX.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],mX.prototype,"data",void 0);w([R({computed:"computeType(data.type)",reflectToAttribute:!0}),x("design:type",String)],mX.prototype,"type",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],mX.prototype,"isDisplayed",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],mX.prototype,"onYtServiceRequestCompleted",null);mX=w([V({is:"ytd-alert-with-button-renderer"})],mX);var mbb;var nbb;var obb=function(){return O.apply(this,arguments)||this}; p(obb,O); g.Object.defineProperties(obb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nbb){var a=document.createElement("template");a.innerHTML="\n \n
\n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mbb){var d=document.createElement("template");d.innerHTML=""; mbb=d}d=mbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nbb=a}a=nbb;return a}}}); var nX=obb;w([R(),x("design:type",Object)],nX.prototype,"data",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],nX.prototype,"ytRendererBehavior",void 0);nX=w([V({is:"ytd-destination-button-renderer"})],nX);var pbb;var qbb;var oX=function(){var a=O.apply(this,arguments)||this;a.isShowMoreVisible=!1;a.isExpanded=!N("trending_explore_shelf_enable_collapse");a.gridStateActionMap={"ytd-update-grid-state-action":"handleUpdateGridStateAction"};return a}; p(oX,O);e=oX.prototype;e.configureRendererStamper=function(){return{"data.destinationButtons":{id:"destination-buttons",mapping:{destinationButtonRenderer:{component:"ytd-destination-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.registerActionMap(this.gridStateActionMap)}; e.handleUpdateGridStateAction=function(){this.updateDestinationButtonsVisibility()}; e.updateDestinationButtonsVisibility=function(){var a;if(!this.isExpanded){var b=this.clientWidth;b&&null!==(a=this.data)&&void 0!==a&&a.destinationButtons&&(b=Math.ceil(this.data.destinationButtons.length/Math.floor((b+4)/214)),this.fullyVisibleRows=Math.min(b,ik("trending_explore_shelf_max_rows")),this.isShowMoreVisible=this.fullyVisibleRows
\n
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pbb){var d=document.createElement("template");d.innerHTML=""; pbb=d}d=pbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qbb=a}a=qbb;return a}}}); var pX=oX;w([R(),x("design:type",Object)],pX.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Number)],pX.prototype,"fullyVisibleRows",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],pX.prototype,"isShowMoreVisible",void 0);w([R(),x("design:type",Boolean)],pX.prototype,"isExpanded",void 0);w([R(),x("design:type",Object)],pX.prototype,"gridStateActionMap",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],pX.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],pX.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],pX.prototype,"ytActionHandlerBehavior",void 0);pX=w([V({is:"ytd-destination-shelf-renderer"})],pX);var rbb;var sbb;var qX=function(){return O.apply(this,arguments)||this}; p(qX,O);qX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; g.Object.defineProperties(qX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sbb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rbb){var d=document.createElement("template");d.innerHTML=""; rbb=d}d=rbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sbb=a}a=sbb;return a}}}); var rX=qX;w([P(X.YtRendererBehavior),x("design:type",Object)],rX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],rX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],rX.prototype,"ytdDismissableItemBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],rX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],rX.prototype,"thumbnailWidth",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"":"94"}}), x("design:type",String)],rX.prototype,"customThumbnailSize",void 0);w([R(),x("design:type",Object)],rX.prototype,"data",void 0);rX=w([V({is:"ytd-compact-playlist-renderer"})],rX);var tbb;var ubb;var sX=function(){return O.apply(this,arguments)||this}; p(sX,O);sX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer"}}}}; sX.prototype.attached=function(){this.classList.add("use-ellipsis")}; sX.prototype.onYtNavigate=function(a,b){var c=this;if(b.endpoint===this.data.navigationEndpoint&&this.get("endpoint.watchEndpoint.continuePlayback",b)){var d=this.get("watchEndpoint.videoId",b.endpoint),f=this.actionSenderBehavior.sendOptionalAction("yt-get-current-video-id-action")[0];N("kevlar_mix_handle_first_endpoint_different")&&d&&f&&d!==f||(a.stopPropagation(),MM(this).getPlayerPromise().then(function(h){if(0===h.getPlayerState()&&c.data.secondaryNavigationEndpoint)var l=c.data.secondaryNavigationEndpoint;else l=Object.assign({},b.endpoint),l.commandMetadata&&l.commandMetadata.webCommandMetadata&&(h=Math.floor(h.getCurrentTime()),l.commandMetadata.webCommandMetadata.url=Id(l.commandMetadata.webCommandMetadata.url,{t:h}),!N("kevlar_add_start_time_to_mix_endpoint_killswitch")&&l.watchEndpoint&&(l.watchEndpoint.startTimeSeconds=h));c.fire("yt-navigate",{endpoint:l})}))}}; g.Object.defineProperties(sX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ubb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tbb){var d=document.createElement("template");d.innerHTML=""; tbb=d}d=tbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ubb=a}a=ubb;return a}}}); var tX=sX;tX.prototype.onYtNavigate=tX.prototype.onYtNavigate;w([P(X.YtRendererBehavior),x("design:type",Object)],tX.prototype,"ytRendererBehavior",void 0);w([P(OO.YtEndpointBehavior),x("design:type",Object)],tX.prototype,"ytEndpointBehavior",void 0);w([P(Z),x("design:type",Object)],tX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],tX.prototype,"ytdDismissableItemBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],tX.prototype,"actionSenderBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],tX.prototype,"ytdLockupBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],tX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],tX.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],tX.prototype,"data",void 0);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],tX.prototype,"onYtNavigate",null);tX=w([V({is:"ytd-compact-radio-renderer"})],tX);var vbb;var wbb;var uX=function(){return O.apply(this,arguments)||this}; p(uX,O);uX.prototype.configureRendererStamper=function(){return{"data.button":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!1}}}}}}; g.Object.defineProperties(uX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wbb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vbb){var d=document.createElement("template");d.innerHTML=""; vbb=d}d=vbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wbb=a}a=wbb;return a}}}); var vX=uX;w([R(),x("design:type",Object)],vX.prototype,"data",void 0);w([P(Z),x("design:type",Object)],vX.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],vX.prototype,"rendererBehavior",void 0);vX=w([V({is:"ytd-compact-text-promo-renderer"})],vX);var xbb;var ybb;var wX=function(){return O.apply(this,arguments)||this}; p(wX,O);wX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; wX.prototype.isMetaBlockEmpty=function(a){return!a||!a.longBylineText&&!a.shortBylineText&&!a.shortViewCountText&&!a.viewCountText}; g.Object.defineProperties(wX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ybb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xbb){var d=document.createElement("template");d.innerHTML=""; xbb=d}d=xbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ybb=a}a=ybb;return a}}}); var xX=wX;w([P(X.YtRendererBehavior),x("design:type",Object)],xX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],xX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],xX.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],xX.prototype,"ytdLockupBehavior",void 0);w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],xX.prototype,"ytdMouseDownPrefetchableBehavior",void 0); w([R({reflectToAttribute:!0,computed:"isMetaBlockEmpty(data)"}),x("design:type",Boolean)],xX.prototype,"metaBlockEmpty",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],xX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],xX.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],xX.prototype,"data",void 0);xX=w([V({is:"ytd-compact-video-renderer"})],xX);TO("itemSectionRenderer","counterfactualRenderer","ytd-counterfactual-renderer");var zbb=function(){return O.apply(this,arguments)||this}; p(zbb,O);var yX=zbb;w([P(X.YtRendererBehavior),x("design:type",Object)],yX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],yX.prototype,"data",void 0);yX=w([V({is:"ytd-counterfactual-renderer"})],yX);var Abb;var Bbb;var zX=function(){return O.apply(this,arguments)||this}; p(zX,O);zX.prototype.computeStyle=function(a){return a?a:""}; g.Object.defineProperties(zX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bbb){var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.title)]]
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Abb){var d=document.createElement("template");d.innerHTML=""; Abb=d}d=Abb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bbb=a}a=Bbb;return a}}}); var AX=zX;w([P(X.YtRendererBehavior),x("design:type",Object)],AX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],AX.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.titleStyle)"}),x("design:type",String)],AX.prototype,"titleStyle",void 0);AX=w([V({is:"ytd-item-section-header-renderer"})],AX);var Cbb;var Dbb;var Ebb;TO("sharingItemSection","itemSectionRenderer","ytd-item-section-renderer");var BX=function(){var a=O.apply(this,arguments)||this;a.continuationShowButton=!1;a.isSearch=!1;a.actionMap={"yt-item-section-continuation-action":"handleYtItemSectionContinuation_","yt-item-section-replace-action":"handleYtItemSectionReplace_"};a.nextContinuation={continuationType:"itemSectionContinuation",usePost:!0};return a}; p(BX,O);e=BX.prototype;e.getItemsPath=function(){return"data.contents"}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents","yt-reload-continuation-items-command-body":"contents","yt-reload-continuation-items-command-header":"header"}}; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{commentsHeaderRenderer:"ytd-comments-header-renderer",sortFilterHeaderRenderer:"ytd-sort-filter-header-renderer",itemSectionHeaderRenderer:"ytd-item-section-header-renderer"}},shownItems:{id:"contents",mapping:{activityItemRenderer:"yt-activity-item-renderer",backgroundPromoRenderer:"ytd-background-promo-renderer",backstagePostThreadRenderer:"ytd-backstage-post-thread-renderer",buttonRenderer:"ytd-button-renderer",carouselAdRenderer:"ytd-carousel-ad-renderer", cardItemContainerRenderer:"yt-card-item-container-renderer",cardItemRenderer:"yt-card-item-renderer",carouselItemRenderer:"ytd-carousel-item-renderer",channelAboutFullMetadataRenderer:"ytd-channel-about-metadata-renderer",channelFeaturedContentRenderer:"ytd-channel-featured-content-renderer",channelRenderer:"ytd-channel-renderer",channelSwitcherPageRenderer:"ytd-channel-switcher-page-renderer",channelVideoPlayerRenderer:"ytd-channel-video-player-renderer",clarificationRenderer:"ytd-clarification-renderer", commentHistoryEntryRenderer:"ytd-comment-history-entry-renderer",commentThreadRenderer:"ytd-comment-thread-renderer",compactMovieRenderer:"ytd-compact-movie-renderer",compactPlaylistRenderer:"ytd-compact-playlist-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",compactTextPromoRenderer:"ytd-compact-text-promo-renderer",compactVideoRenderer:"ytd-compact-video-renderer",compactRadioRenderer:"ytd-compact-radio-renderer",connectedAppRenderer:"ytd-connected-app-renderer",counterfactualRenderer:"ytd-counterfactual-renderer", destinationShelfRenderer:"ytd-destination-shelf-renderer",didYouMeanRenderer:"yt-did-you-mean-renderer",displayAdRenderer:"ytd-display-ad-renderer",emergencyOneboxRenderer:"ytd-emergency-onebox-renderer",exploratoryResultsRenderer:"ytd-exploratory-results-renderer",factCheckRenderer:"ytd-fact-check-renderer",faqSectionRenderer:"yt-faq-section-renderer",feedbackElicitationSingleQuestionRenderer:"ytd-feedback-elicitation-single-question-renderer",feedEntryRenderer:"ytd-feed-entry-renderer",gridRenderer:"ytd-grid-renderer", hashtagTileRenderer:"ytd-hashtag-tile-renderer",horizontalCardListRenderer:{component:"ytd-horizontal-card-list-renderer",properties:{isSearch:"[[isSearch]]"}},includingResultsForRenderer:"yt-including-results-for-renderer",infoPanelContainerRenderer:"ytd-info-panel-container-renderer",inlineSurveyRenderer:"ytd-inline-survey-renderer",labsEditRenderer:"ytd-labs-edit-renderer",labsHeaderRenderer:"ytd-labs-header-renderer",labsItemRenderer:"ytd-labs-item-renderer",liveChatHistoryEntryRenderer:"ytd-live-chat-history-entry-renderer", messageRenderer:"ytd-message-renderer",movieRenderer:"ytd-movie-renderer",musicPassFeatureInfoRenderer:"yt-music-pass-feature-info-renderer",newspaperRenderer:"ytd-newspaper-renderer",noResultsFoundShowingResultsForRenderer:"yt-no-results-found-showing-results-for-renderer",notificationRenderer:"ytd-notification-renderer",offerItemExpandedRenderer:"yt-offer-item-expanded-renderer",offerItemRenderer:"yt-offer-item-renderer",offerItemUpsellRenderer:"yt-offer-item-upsell-renderer",playlistRenderer:{component:"ytd-playlist-renderer", properties:{isSearch:"[[isSearch]]"}},pageIntroductionRenderer:"ytd-page-introduction-renderer",playlistShowMetadataRenderer:"ytd-playlist-show-metadata-renderer",playlistVideoListRenderer:"ytd-playlist-video-list-renderer",premiumBrowseFooterRenderer:"ytd-premium-browse-footer-renderer",productDetailsRenderer:"ytd-product-details-renderer",promotedSparklesTextSearchRenderer:"ytd-promoted-sparkles-text-search-renderer",purchaseItemRenderer:"ytd-purchase-item-renderer",radioRenderer:"ytd-radio-renderer", redCancelSurveyRenderer:"ytd-red-cancel-survey-renderer",resultsWithoutQuotesRenderer:"yt-results-without-quotes-renderer",searchHistoryQueryRenderer:"ytd-search-history-query-renderer",searchNoResultsRenderer:"yt-search-no-results-renderer",searchPyvRenderer:"ytd-search-pyv-renderer",settingsOptionsRenderer:"ytd-settings-options-renderer",shelfRenderer:{component:"ytd-shelf-renderer",properties:{isSearch:"[[isSearch]]"}},showingResultsForRenderer:"yt-showing-results-for-renderer",showRenderer:"ytd-show-renderer", simpleTextSectionRenderer:"ytd-simple-text-section-renderer",statementBannerRenderer:"ytd-statement-banner-renderer",subscriptionProductHeaderRenderer:"yt-subscription-product-header-renderer",subscriptionProductRenderer:"yt-subscription-product-renderer",subscriptionProductUpsellOfferRenderer:"yt-subscription-product-upsell-offer-renderer",toggleFormFieldRenderer:"yt-toggle-form-field-renderer",unlimitedManageSubscriptionPageRenderer:"yt-unlimited-manage-subscription-page-renderer",unlimitedPageFeatureInfoRenderer:"ytd-unlimited-page-feature-info-renderer", unlimitedPageHeaderRenderer:"yt-unlimited-page-header-renderer",unlimitedUserNotificationRenderer:"yt-unlimited-user-notification-renderer",videoRenderer:{component:"ytd-video-renderer",properties:{isSearch:"[[isSearch]]"}},webAnswerRenderer:"ytd-web-answer-renderer",ypcOffersListRenderer:"yt-ypc-offers-list-renderer",redeemCodeRenderer:"ytd-redeem-code-renderer",primetimePromoRenderer:"ytd-primetime-promo-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",properties:{showButton:"[[continuationShowButton]]"}}, infoPanelContentRenderer:"ytd-info-panel-content-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]",disablePrescanVisibility:"[[continuationDisablePrescanVisibility]]"}},reloadContinuationData:{component:"yt-reload-continuation"}},renderPriority:N("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:N("kevlar_low_priority_continuation")}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.created=function(){this.cachedViewportHeight_=A("initialInnerHeight",void 0)||window.innerHeight;te&&N("polymer2_aggressive_batching")&&(this.ytLazyListBehavior.initialCount=20,this.ytLazyListBehavior.minChunkSize=12)}; e.onRetrieveLocation_=function(a,b){this.containsComments_()&&(this.firstCommentsLoaded_=b.hasComments=!0)}; e.containsComments_=function(){return"comment-item-section"===this.get("data.sectionIdentifier")}; e.onLoadReloadContinuation_=function(a,b){var c=this;a.stopPropagation();this.isReloading_=!0;this.fire("yt-retrieve-location",{locationRetrieved:function(d){var f=c.ytComponentBehavior.getInterfaceForTs("yt-network-manager");d=b(d);f.postData(d).then(function(h){return c.onReloadContinuationData_(h)})}})}; e.onReloadContinuationData_=function(a){if(a=this.get("response.continuationContents.itemSectionContinuation",a)||this.get("response.contents.itemSectionRenderer",a)||this.get("response.continuationContents.sectionListContinuation.contents.0.itemSectionRenderer",a)||this.get("response.continuationContents.relatedChipsContinuation.continuation.watchNextSecondaryResultsRenderer",a))this.set("data.contents",a.contents||a.results),a.header&&this.set("data.header",a.header),this.set("data.continuations", a.continuations||[]);this.isReloading_=!1}; e.computeContentsClass_=function(a){return a?"reloading":""}; e.computeShowButton_=function(){return!!this.firstCommentsLoaded_&&this.containsComments_()&&N("kevlar_disable_comments_auto_load")}; e.computeIsReloading_=function(){return this.isReloading_||this.ytContinuationHandlerBehavior.continuationIsReloading}; e.computeHasDestinationShelfRenderer=function(a){var b,c;return!(null===(c=null===(b=null===a||void 0===a?void 0:a.contents)||void 0===b?void 0:b[0])||void 0===c||!c.destinationShelfRenderer)}; e.dataChanged_=function(){this.firstCommentsLoaded_=!1}; e.onYtDismissableItemDismissedChange_=function(a){this._setItemDismissed("yt-dismissable-item-dismissed"==a.type)}; e.triggerContinuations=function(){for(var a=this.$.continuations.children,b=0;b
\n
\n \n \n
\n
\n
\n"; var b=a.content,c=b.insertBefore;if(void 0===Dbb){var d=document.createElement("template");d.innerHTML=""; Dbb=d}d=Dbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===Cbb&&(d=document.createElement("template"),d.innerHTML="", Cbb=d);d=Cbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ebb=a}a=Ebb;return a}}}); var CX=BX;CX.prototype.onYtDismissableItemDismissedChange_=CX.prototype.onYtDismissableItemDismissedChange_;CX.prototype.onLoadReloadContinuation_=CX.prototype.onLoadReloadContinuation_;CX.prototype.onRetrieveLocation_=CX.prototype.onRetrieveLocation_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],CX.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],CX.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],CX.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ),x("design:type",Object)],CX.prototype,"ytLazyListBehavior",void 0);w([P(NQ),x("design:type",Object)],CX.prototype,"ytNextContinuationBehavior",void 0);w([P(zU.YtContinuationHandlerBehavior),x("design:type",Object)],CX.prototype,"ytContinuationHandlerBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],CX.prototype,"ytComponentBehavior",void 0); w([R({notify:!0,observer:"dataChanged_"}),x("design:type",Object)],CX.prototype,"data",void 0);w([R({observer:"continuationShowButtonChanged"}),x("design:type",Object)],CX.prototype,"continuationShowButton",void 0);w([R({value:!0}),x("design:type",Boolean)],CX.prototype,"autoFill",void 0);w([R(),x("design:type",Boolean)],CX.prototype,"continuationDisablePrescanVisibility",void 0);w([R(),x("design:type",Boolean)],CX.prototype,"isReloading_",void 0); w([R(),x("design:type",Object)],CX.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,computed:"computeUseHeightHack_(isSearch)"}),x("design:type",Boolean)],CX.prototype,"useHeightHack",void 0);w([R({computed:"computeShowButton_(data.sectionIdentifier, firstCommentsLoaded_)"}),x("design:type",Boolean)],CX.prototype,"showButton_",void 0);w([R(),x("design:type",Boolean)],CX.prototype,"firstCommentsLoaded_",void 0);w([R(),x("design:type",Boolean)],CX.prototype,"isSearchDova",void 0); w([R({reflectToAttribute:!0,readOnly:!0}),x("design:type",Boolean)],CX.prototype,"itemDismissed",void 0);w([R({reflectToAttribute:!0,computed:"computeHasDestinationShelfRenderer(data)"}),x("design:type",Boolean)],CX.prototype,"hasDestinationShelfRenderer",void 0);w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],CX.prototype,"onRetrieveLocation_",null); w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Function]),x("design:returntype",void 0)],CX.prototype,"onLoadReloadContinuation_",null);w([S("yt-dismissable-item-dismissed"),S("yt-dismissable-item-undismissed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],CX.prototype,"onYtDismissableItemDismissedChange_",null);CX=w([V({is:"ytd-item-section-renderer"})],CX);var Fbb;var Gbb;var Hbb=function(){return O.apply(this,arguments)||this}; p(Hbb,O); g.Object.defineProperties(Hbb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gbb){var a=document.createElement("template");a.innerHTML="\n\n\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fbb){var d=document.createElement("template");d.innerHTML=""; Fbb=d}d=Fbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gbb=a}a=Gbb;return a}}}); var DX=Hbb;w([R(),x("design:type",Object)],DX.prototype,"data",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],DX.prototype,"rendererBehavior",void 0);DX=w([V({is:"ytd-premium-browse-footer-renderer"})],DX);var Ibb;var Jbb;var EX=function(){return O.apply(this,arguments)||this}; p(EX,O);e=EX.prototype; e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&EN?void 0:0,waitForSignal:"eocs"},"data.buttons":{id:"buttons",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}}}}; e.onDataChanged=function(a){var b,c,d,f=this.get("channelThumbnailSupportedRenderers.channelThumbnailWithLinkRenderer",a);f&&(f.title=null===(d=null===(c=null===(b=null===a||void 0===a?void 0:a.shortBylineText)||void 0===b?void 0:b.runs)||void 0===c?void 0:c[0])||void 0===d?void 0:d.text,this.set("data.owner",f));f=a.thumbnailRenderer;!a.thumbnail&&f&&f.playlistVideoThumbnailRenderer&&this.set("data.thumbnail",f.playlistVideoThumbnailRenderer.thumbnail)}; e.onDetailsTap=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint;c&&!NR(Polymer.dom(a).path,this,["A","BUTTON"])&&this.fire("yt-navigate",{endpoint:c})}; e.onRendererTap=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.serviceEndpoint;(null===b||void 0===b?0:b.feedbackEndpoint)&&this.actionSenderBehavior.sendServiceRequestAction([b])}; e.onMovingThumbnailPreviewEnd=function(){N("web_inline_player_after_video_preview")&&this.actionSenderBehavior.sendAction("yt-open-video-preview-action",[this.data,this.offsetTop,this.offsetLeft])}; e.computeDescriptionSnippet=function(a,b){return b?null===a||void 0===a?void 0:a.description:null===a||void 0===a?void 0:a.descriptionSnippet}; e.computeHideDescriptionSnippet=function(a,b,c){return!b||!c||N("hide_desktop_search_grid_result_metadata")}; e.computeHidePlaylistVideos=function(a,b){return!(null===a||void 0===a?0:a.videos)||!b||N("hide_desktop_search_grid_result_metadata")}; e.getFirstTwoPlaylistVideos=function(a){var b;return null===(b=null===a||void 0===a?void 0:a.videos)||void 0===b?void 0:b.slice(0,2)}; e.computeMetaBlockClass=function(a){return a?"":"grid"}; g.Object.defineProperties(EX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jbb){var a=document.createElement("template");a.innerHTML="

"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ibb){var d=document.createElement("template");d.innerHTML=""; Ibb=d}d=Ibb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jbb=a}a=Jbb;return a}}}); var FX=EX;FX.prototype.onMovingThumbnailPreviewEnd=FX.prototype.onMovingThumbnailPreviewEnd;FX.prototype.onDataChanged=FX.prototype.onDataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],FX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],FX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],FX.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],FX.prototype,"ytdLockupBehavior",void 0); w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],FX.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(CQ),x("design:type",Object)],FX.prototype,"ytdReduxBehavior",void 0);w([P([W.YtActionSenderBehavior]),x("design:type",Object)],FX.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],FX.prototype,"data",void 0);w([R(),x("design:type",Boolean)],FX.prototype,"noEndpoints",void 0);w([R({value:!1}),x("design:type",Boolean)],FX.prototype,"isRadio",void 0); w([R({value:!1}),x("design:type",Boolean)],FX.prototype,"isPromotedVideo",void 0);w([R({value:!1}),x("design:type",Boolean)],FX.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0,selector:qT}),x("design:type",Boolean)],FX.prototype,"miniMode",void 0);w([R({computed:"computeHidePlaylistVideos(data, isSearch)"}),x("design:type",Boolean)],FX.prototype,"hidePlaylistVideos",void 0); w([R({computed:"computeDescriptionSnippet(data, isPromotedVideo)"}),x("design:type",String)],FX.prototype,"descriptionSnippet",void 0);w([R({computed:"computeHideDescriptionSnippet(data, descriptionSnippet, isSearch)"}),x("design:type",Boolean)],FX.prototype,"hideDescriptionSnippet",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],FX.prototype,"onDataChanged",null); w([S("yt-moving-thumbnail-ended"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],FX.prototype,"onMovingThumbnailPreviewEnd",null);FX=w([V({is:"ytd-rich-grid-media"})],FX);var Kbb;var Lbb;var GX=function(){return O.apply(this,arguments)||this}; p(GX,O); GX.prototype.configureRendererStamper=function(){return N("enable_menu_on_rich_grid_movie")?{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}},initialRenderPriority:!N("defer_menus")||N("desktop_persistent_menu")&&EN?void 0:0,waitForSignal:"eocs"},dismissedRenderer:{id:"dismissed-content",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer",notificationTextRenderer:"ytd-notification-text-renderer"}},"data.offerButton":{id:"offer-button", mapping:{buttonRenderer:"ytd-button-renderer"}}}:{"data.offerButton":{id:"offer-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; GX.prototype.computeHideMetadataContainer=function(a,b){return N("hide_desktop_search_grid_result_metadata")||b||!(null===a||void 0===a?0:a.descriptionSnippet)&&!(null===a||void 0===a?0:a.topMetadataItems)&&!(null===a||void 0===a?0:a.bottomMetadataItems)}; g.Object.defineProperties(GX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lbb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kbb){var d=document.createElement("template");d.innerHTML=""; Kbb=d}d=Kbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lbb=a}a=Lbb;return a}}}); var HX=GX;w([P(X.YtRendererBehavior),x("design:type",Object)],HX.prototype,"ytRendererBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],HX.prototype,"ytdLockupBehavior",void 0);w([P(Z),x("design:type",Object)],HX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],HX.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],HX.prototype,"data",void 0); w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],HX.prototype,"isMovieInShelf",void 0);w([R({computed:"computeHideMetadataContainer(data, isMovieInShelf)"}),x("design:type",Boolean)],HX.prototype,"hideMetadataContainer",void 0);HX=w([V({is:"ytd-rich-grid-movie"})],HX);var Mbb;var Nbb;var IX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-rich-item-index-update-action":"onIndexUpdateAction"};return a}; p(IX,O); IX.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{postRenderer:{component:"ytd-post-renderer",params:{isRichGrid_:!0}},sharedPostRenderer:{component:"ytd-shared-post-renderer",params:{isRichGrid_:!0}},primetimePromoDetailsRenderer:"ytd-primetime-promo-details-renderer",primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",movieRenderer:{component:"ytd-rich-grid-movie",properties:{isMovieInShelf:"[[isMovieInShelf]]"}},videoRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1}, properties:{isSearch:"[[isSearch]]"}},radioRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!0},properties:{isSearch:"[[isSearch]]"}},playlistRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1},properties:{isSearch:"[[isSearch]]"}},promotedVideoRenderer:{component:"ytd-rich-grid-media",params:{isRadio:!1,isPromotedVideo:!0},properties:{isSearch:"[[isSearch]]"}},displayAdRenderer:{component:"ytd-display-ad-renderer"},channelRenderer:"ytd-rich-grid-channel"}}}}; IX.prototype.onIndexUpdateAction=function(){var a,b=Tn();b&&(null===(a=this.data)||void 0===a?0:a.trackingParams)&&this.data.hasOwnProperty("colIndex")&&this.data.hasOwnProperty("rowIndex")&&JNa(b,Nn(this.data.trackingParams),{gridData:{veColumnCoordinate:this.data.colIndex,veRowCoordinate:this.data.rowIndex}})}; IX.prototype.isMovieRendererInShelf=function(a,b){var c;return b&&!(null===(c=null===a||void 0===a?void 0:a.content)||void 0===c||!c.movieRenderer)}; IX.prototype.isPostRenderer=function(){var a,b,c,d;return!(null===(b=null===(a=this.data)||void 0===a?void 0:a.content)||void 0===b||!b.postRenderer)||!(null===(d=null===(c=this.data)||void 0===c?void 0:c.content)||void 0===d||!d.sharedPostRenderer)}; g.Object.defineProperties(IX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nbb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mbb){var d=document.createElement("template");d.innerHTML=""; Mbb=d}d=Mbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nbb=a}a=Nbb;return a}}}); var JX=IX;w([P(Z),x("design:type",Object)],JX.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],JX.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],JX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],JX.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isPostRenderer(data)"}),x("design:type",Boolean)],JX.prototype,"isPost",void 0); w([R({value:!1}),x("design:type",Boolean)],JX.prototype,"isShelfItem",void 0);w([R({reflectToAttribute:!0,computed:"isMovieRendererInShelf(data, isShelfItem)"}),x("design:type",Boolean)],JX.prototype,"isMovieInShelf",void 0);w([R({value:!1}),x("design:type",Boolean)],JX.prototype,"isSearch",void 0);JX=w([V({is:"ytd-rich-item-renderer"})],JX);var Obb;var Pbb;var KX=function(){return O.apply(this,arguments)||this}; p(KX,O);e=KX.prototype;e.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; e.onClick=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.navigationEndpoint;!NR(Polymer.dom(a).path,this,["YTD-SUBSCRIBE-BUTTON-RENDERER"])&&c&&(c.ypcGetOffersEndpoint?(this.ytActionSenderBehavior.sendServiceRequestAction([c]),a.preventDefault()):this.fire("yt-navigate",{endpoint:c}))}; e.computeChannelEndpoint=function(a){return a&&a.ypcGetOffersEndpoint?null:a}; e.computeHrefEndpoint=function(a){return(null===a||void 0===a?0:a.ypcGetOffersEndpoint)?null:this.componentBehavior.computeHref_(a)}; e.computeHideDot=function(a){return!(a&&a.subscriberCountText&&a.videoCountText)}; e.computeHideDescriptionSnippet=function(a){return!(null===a||void 0===a?0:a.descriptionSnippet)||N("hide_desktop_search_grid_result_metadata")}; g.Object.defineProperties(KX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pbb){var a=document.createElement("template");a.innerHTML="
\n \n
\n

\n \n \n \n \n

\n
\n [[getSimpleString(data.subscriberCountText)]]\n \n [[getSimpleString(data.videoCountText)]]\n
\n \n
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Obb){var d=document.createElement("template");d.innerHTML=""; Obb=d}d=Obb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pbb=a}a=Pbb;return a}}}); var LX=KX;w([P(X.YtRendererBehavior),x("design:type",Object)],LX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],LX.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],LX.prototype,"ytActionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],LX.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],LX.prototype,"data",void 0); w([R({value:!1,computed:"computeHideDescriptionSnippet(data)"}),x("design:type",Boolean)],LX.prototype,"hideDescriptionSnippet",void 0);LX=w([V({is:"ytd-rich-grid-channel"})],LX);var Qbb;var Rbb;var MX=function(){return O.apply(this,arguments)||this}; p(MX,O);MX.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(MX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rbb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qbb){var d=document.createElement("template");d.innerHTML=""; Qbb=d}d=Qbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rbb=a}a=Rbb;return a}}}); var NX=MX;w([P(X.YtRendererBehavior),x("design:type",Object)],NX.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],NX.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],NX.prototype,"data",void 0);NX=w([V({is:"ytd-primetime-promo-details-renderer"})],NX);var Sbb;var Tbb;var OX=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"handleDarkModeToggledAction"};return a}; p(OX,O);OX.prototype.attached=function(){this.isDarkTheme=document.documentElement.hasAttribute("dark");this.actionHandlerBehavior.actionMap=this.actionMap}; OX.prototype.handleDarkModeToggledAction=function(a){this.isDarkTheme=a}; OX.prototype.computeHeaderLogoThumbnail=function(a,b){if(a)return b?a.darkLogo:a.lightLogo}; g.Object.defineProperties(OX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tbb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sbb){var d=document.createElement("template");d.innerHTML=""; Sbb=d}d=Sbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tbb=a}a=Tbb;return a}}}); var PX=OX;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],PX.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],PX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],PX.prototype,"data",void 0);w([R({computed:"computeHeaderLogoThumbnail(data,isDarkTheme)"}),x("design:type",Object)],PX.prototype,"themeLogo",void 0);w([R(),x("design:type",Boolean)],PX.prototype,"isDarkTheme",void 0); PX=w([V({is:"ytd-primetime-promo-header-renderer"})],PX);var Ubb;var Vbb;TO("itemSectionRenderer","primetimePromoRenderer","ytd-primetime-promo-renderer");var QX=function(){var a=O.apply(this,arguments)||this;a.isPrimetimeRedesign=!1;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p(QX,O);e=QX.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.requestElementsPerRow()}; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{primetimePromoPanelRenderer:"ytd-primetime-promo-panel-renderer",horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{useFloorScrolling:!0}}}},"data.panels":{id:"panels",mapping:{richItemRenderer:"ytd-rich-item-renderer"}},"data.header":{id:"header-contents",mapping:{primetimePromoHeaderRenderer:"ytd-primetime-promo-header-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.onDataChange=function(){var a=this;this.isPrimetimeRedesign=!!this.data&&!!this.data.panels;Polymer.RenderStatus.afterNextRender(this,function(){a.updateItemVisibility()})}; e.onUpdateElementsPerRowAction=function(a){a&&this.elementsPerRow!==a&&(this.elementsPerRow=a,this.updateItemVisibility())}; e.updateItemVisibility=function(){var a=this;this.data&&this.data.panels&&Polymer.dom(this.root).querySelectorAll("ytd-rich-item-renderer").forEach(function(b,c){b.hidden=c>a.elementsPerRow-1})}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; g.Object.defineProperties(QX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vbb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ubb){var d=document.createElement("template");d.innerHTML=""; Ubb=d}d=Ubb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vbb=a}a=Vbb;return a}}}); var RX=QX;RX.prototype.onDataChange=RX.prototype.onDataChange;w([P(Z),x("design:type",Object)],RX.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],RX.prototype,"ytdDismissableItemBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],RX.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],RX.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],RX.prototype,"data",void 0); w([R({value:3}),x("design:type",Number)],RX.prototype,"elementsPerRow",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],RX.prototype,"isPrimetimeRedesign",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],RX.prototype,"onDataChange",null);RX=w([V({is:"ytd-primetime-promo-renderer"})],RX);var Wbb;var Xbb;var SX=function(){return O.apply(this,arguments)||this}; p(SX,O);SX.prototype.configureRendererStamper=function(){return{"data.filterMenu":{id:"filter-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}}; g.Object.defineProperties(SX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xbb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wbb){var d=document.createElement("template");d.innerHTML=""; Wbb=d}d=Wbb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xbb=a}a=Xbb;return a}}}); var TX=SX;w([P(Z),x("design:type",Object)],TX.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],TX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],TX.prototype,"data",void 0);TX=w([V({is:"ytd-sort-filter-header-renderer"})],TX);var Ybb;var Zbb;var UX=function(){return O.apply(this,arguments)||this}; p(UX,O);UX.prototype.computeThumbnailStyle=function(a){if(a&&(a=PN(a)))return ec({"background-color":a})}; g.Object.defineProperties(UX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zbb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ybb){var d=document.createElement("template");d.innerHTML=""; Ybb=d}d=Ybb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zbb=a}a=Zbb;return a}}}); var VX=UX;w([P(X.YtRendererBehavior),x("design:type",Object)],VX.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],VX.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("desktop_search_prominent_thumbs")}}), x("design:type",Boolean)],VX.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return jk("desktop_search_prominent_thumbs_style")}}), x("design:type",String)],VX.prototype,"prominentThumbStyle",void 0);VX=w([V({is:"ytd-hashtag-tile-renderer"})],VX);var $bb;var acb;var WX=function(){return O.apply(this,arguments)||this}; p(WX,O);WX.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{noInkOnDropdownButton:!0}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; g.Object.defineProperties(WX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===acb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$bb){var d=document.createElement("template");d.innerHTML=""; $bb=d}d=$bb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);acb=a}a=acb;return a}}}); var XX=WX;w([P(cQ),x("design:type",Object)],XX.prototype,"ytdDismissableItemBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],XX.prototype,"ytdLockupBehavior",void 0);w([P(Z),x("design:type",Object)],XX.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],XX.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],XX.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],XX.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],XX.prototype,"data",void 0);XX=w([V({is:"ytd-compact-movie-renderer"})],XX);var bcb;var ccb;var dcb;var ecb;Polymer({is:"yt-copy-link-renderer",_template:function(){if(void 0!==ecb)return ecb;var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dcb){var d=document.createElement("template");d.innerHTML=""; dcb=d}d=dcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ecb=a}, behaviors:[xO.YtActionHandlerBehavior,X.YtRendererBehavior],properties:{data:Object,rendererStyle:{type:String,reflectToAttribute:!0,computed:"computeStyle_(data.style)"}},listeners:{tap:"handleTap_"},actionMap:{"yt-share-panel-set-timestamp-action":"handleSetTimestamp_","yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},handleSetTimestamp_:function(a){this.data&&this.data.shortUrl&&(this.$["share-url"].value=a.isSet?Jd(this.data.shortUrl,"t",a.timestamp):this.data.shortUrl)}, handleSignalActionCopyShareUrl_:function(){this.copyUrlToClipboard_()}, handleTap_:function(a){this.copyUrlToClipboard_();a.stopPropagation();a.preventDefault()}, copyUrlToClipboard_:function(){this.trackCopyUrl_();window.getSelection().removeAllRanges();this.$["share-url"].select();document.execCommand("copy")}, trackCopyUrl_:function(){this&&this.data&&this.data.copyButton&&this.data.copyButton.buttonRenderer&&this.logExplicitClick(this.data.copyButton.buttonRenderer)}, computeStyle_:function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}});TO("itemSectionRenderer","toggleFormFieldRenderer","yt-toggle-form-field-renderer"); Polymer({is:"yt-toggle-form-field-renderer",_template:function(){if(void 0!==ccb)return ccb;var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.label)]]
\n \n \n
\n\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bcb){var d=document.createElement("template");d.innerHTML=""; bcb=d}d=bcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ccb=a}, behaviors:[xO.YtActionHandlerBehavior,Z,X.YtRendererBehavior],properties:{data:{type:Object,notify:!0},description_:{type:Boolean,computed:"computeDescription_(data.*)"},useKeyboardFocused:{type:Boolean,value:function(){return!!this.getInterface(PO)&&N("kevlar_keyboard_button_focus")}, reflectToAttribute:!0},keyboardFocused:{type:Boolean,value:!1,reflectToAttribute:!0}},stampDom:{"data.footer":{id:"footer-container",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}}},actionMap:{"yt-update-toggle-action":"handleUpdateToggleAction_"},attached:function(){this.keyboardFocused=!1}, onToggleButtonFocusin_:function(){if(this.useKeyboardFocused){var a=this.getInterface(PO);a&&(this.keyboardFocused=a.isKeyBoardInUse())}}, onToggleButtonFocusout_:function(){this.keyboardFocused=!1}, computeDescription_:function(){if(this.data){if(this.data.toggled&&this.data.toggledDescription)return this.data.toggledDescription;if(!this.data.toggled&&this.data.description)return this.data.description}}, onChange_:function(){var a=this.data.toggled?this.data.toggleOnAction:this.data.toggleOffAction;a&&this.sendServiceRequestAction([a]);this.data.requireChangeConfirmation&&this.set("data.toggled",!this.data.toggled)}, handleUpdateToggleAction_:function(a){a&&a.updateToggleAction&&this.data&&(a=a.updateToggleAction,a.targetId==this.data.targetId&&this.set("data.toggled",a.toggled))}, toBoolean_:function(a){return!!a}, reset:function(){}});var fcb=document.createElement("template");fcb.innerHTML="";document.head.appendChild(fcb.content);var gcb;var hcb;var YX=function(){return O.apply(this,arguments)||this}; p(YX,O);YX.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; g.Object.defineProperties(YX,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hcb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n\n
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gcb){var d=document.createElement("template");d.innerHTML=""; gcb=d}d=gcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hcb=a}a=hcb;return a}}}); var ZX=YX;w([P(X.YtRendererBehavior),x("design:type",Object)],ZX.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],ZX.prototype,"data",void 0);ZX=w([V({is:"ytd-limited-state-message-renderer"})],ZX);var icb;var jcb;var $X=function(){return O.apply(this,arguments)||this}; p($X,O);$X.prototype.dataChanged=function(){this.data&&(this.data.impressionCommand&&this.data.impressionCommand.clickTrackingParams&&delete this.data.impressionCommand.clickTrackingParams,this.macroReplacementBehavior.sendServiceRequestAction([this.data.impressionCommand]),this.data.backgroundColor&&(this.enableColors=!0,this.style.backgroundColor=PN(this.data.backgroundColor)))}; $X.prototype.onHeadlineClick=function(){if(this.data&&this.data.headline){var a=this.getFormattedStringLoggingDirectives(this.data.headline);a&&this.rendererBehavior.logExplicitClick(a)}}; $X.prototype.onDescriptionClick=function(){if(this.data&&this.data.description){var a=this.getFormattedStringLoggingDirectives(this.data.description);a&&this.rendererBehavior.logExplicitClick(a)}}; $X.prototype.getFormattedStringLoggingDirectives=function(a){return a&&a.runs&&0\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===icb){var d=document.createElement("template");d.innerHTML=""; icb=d}d=icb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jcb=a}a=jcb;return a}}}); var aY=$X;aY.prototype.dataChanged=aY.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],aY.prototype,"rendererBehavior",void 0);w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],aY.prototype,"macroReplacementBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],aY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],aY.prototype,"data",void 0);w([R(),x("design:type",Object)],aY.prototype,"navigationEndpoint",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],aY.prototype,"enableColors",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aY.prototype,"dataChanged",null);aY=w([V({is:"ytd-action-basic-immersive-content-renderer"})],aY);var kcb;var lcb;var bY=function(){return O.apply(this,arguments)||this}; p(bY,O);bY.prototype.configureRendererStamper=function(){return{"data.sitelinkRenderers":{id:"sitelinks",mapping:{sitelinkRenderer:"ytd-sitelink-renderer"}},"data.actionButton":{id:"action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; bY.prototype.dataChanged=function(){var a=this;this.data&&this.data.impressionCommands&&this.data.impressionCommands.forEach(function(b){b.clickTrackingParams&&delete b.clickTrackingParams;a.ytMacroReplacementBehavior.sendServiceRequestAction([b])})}; bY.prototype.shouldHideFooter=function(a){return!(a&&N("use_ads_engagement_panel_desktop_footer_cta"))}; g.Object.defineProperties(bY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lcb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kcb){var d=document.createElement("template");d.innerHTML=""; kcb=d}d=kcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lcb=a}a=lcb;return a}}}); var cY=bY;cY.prototype.dataChanged=cY.prototype.dataChanged;w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],cY.prototype,"ytMacroReplacementBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],cY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],cY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],cY.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],cY.prototype,"dataChanged",null);cY=w([V({is:"ytd-action-engagement-panel-content-renderer"})],cY);var mcb;var ncb;var dY=function(){return O.apply(this,arguments)||this}; p(dY,O);dY.prototype.onSitelinkTap=function(){this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint});this.data&&this.data.clickCommands&&this.actionSenderBehavior.sendInnerTubeActions(this.data.clickCommands,this)}; g.Object.defineProperties(dY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ncb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mcb){var d=document.createElement("template");d.innerHTML=""; mcb=d}d=mcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ncb=a}a=ncb;return a}}}); var eY=dY;w([P(W.YtActionSenderBehavior),x("design:type",Object)],eY.prototype,"actionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],eY.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],eY.prototype,"data",void 0);eY=w([V({is:"ytd-sitelink-renderer"})],eY);var ocb;var pcb;var fY=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-ad-engagement-panel-click-action":"handleAdsEngagementPanelClick"};return a}; p(fY,O);e=fY.prototype;e.configureRendererStamper=function(){return{"data.contentRenderer":{id:"content",mapping:{actionEngagementPanelContentRenderer:"ytd-action-engagement-panel-content-renderer",basicImmersiveEngagementPanelContentRenderer:"ytd-action-basic-immersive-content-renderer"}}}}; e.attached=function(){this.getDataFromPlayerAndRender()}; e.dataChanged=function(){this.getDataFromPlayerAndRender()}; e.detached=function(){this.player&&(this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"updateEngagementPanelAction",this.sendUpdateEngagementPanelAction),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"changeEngagementPanelVisibility",this.sendChangeEngagementPanelVisibilityAction),this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player,"scrollToEngagementPanel",this.sendScrollToEngagementPanelCommand))}; e.getDataFromPlayerAndRender=function(){var a=this,b=KM(this);b&&b.getPlayerPromise().then(function(c){a.getCachedDataAndListen(c)})}; e.getCachedDataAndListen=function(a){this.resolveCachedActions();this.player||(this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"updateEngagementPanelAction",this.sendUpdateEngagementPanelAction),this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"changeEngagementPanelVisibility",this.sendChangeEngagementPanelVisibilityAction),this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"scrollToEngagementPanel",this.sendScrollToEngagementPanelCommand),this.player=a)}; e.resolveCachedActions=function(){var a=Ka("yt.www.ads.eventcache.getLastUpdateEngagementPanelAction");(a=a&&a())&&!y.isEmpty(a)&&this.sendUpdateEngagementPanelAction(a);(a=(a=Ka("yt.www.ads.eventcache.getLastChangeEngagementPanelVisibilityAction"))&&a())&&!y.isEmpty(a)&&this.sendChangeEngagementPanelVisibilityAction(a);(a=(a=Ka("yt.www.ads.eventcache.getLastScrollToEngagementPanelCommand"))&&a())&&!y.isEmpty(a)&&this.sendScrollToEngagementPanelCommand(a)}; e.sendUpdateEngagementPanelAction=function(a){this.actionSenderBehavior.sendAction("yt-update-engagement-panel-action",[a])}; e.sendChangeEngagementPanelVisibilityAction=function(a){this.actionSenderBehavior.sendAction("yt-change-engagement-panel-visibility-action",[a])}; e.sendScrollToEngagementPanelCommand=function(a){this.actionSenderBehavior.sendAction("yt-scroll-to-engagement-panel-command",[a])}; e.handleAdsEngagementPanelClick=function(){if(this.player)this.player.onAdUxClicked("ads-engagement-panel");else Am(Error("Missing player in YtdAdsEngagementPanelContentRenderer."))}; g.Object.defineProperties(fY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pcb){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ocb){var d=document.createElement("template");d.innerHTML="";ocb=d}d=ocb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);pcb=a}a=pcb;return a}}}); var gY=fY;gY.prototype.dataChanged=gY.prototype.dataChanged;w([P(W.YtActionSenderBehavior),x("design:type",Object)],gY.prototype,"actionSenderBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],gY.prototype,"actionHandlerBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],gY.prototype,"componentBehavior",void 0);w([P(TP),x("design:type",Object)],gY.prototype,"ytPlayerListenerBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],gY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],gY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],gY.prototype,"data",void 0);w([R(),x("design:type",Object)],gY.prototype,"player",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],gY.prototype,"dataChanged",null);gY=w([V({is:"ytd-ads-engagement-panel-content-renderer"})],gY);var qcb;var rcb;var hY=function(){return O.apply(this,arguments)||this}; p(hY,O);e=hY.prototype; e.onKeyDown=function(a){if(0!==this.snippetElements.length&&(a=a.keyCode,38===a||40===a)){0<=this.highlightedIndex&&this.removeSnippetHighlight(this.snippetElements[this.highlightedIndex]);38===a?this.highlightedIndex--:this.highlightedIndex++;this.highlightedIndex=Tf(this.highlightedIndex,-1,this.snippetElements.length);a=this.snippetElements.length;var b=this.highlightedIndex%a;this.highlightedIndex=0>b*a?b+a:b;a=this.snippetElements[this.highlightedIndex];this.highlightSnippet(a);this.ensureVisible(a)}}; e.onKeyUp=function(a){var b=this;jBa(a)&&(13===a.keyCode?(this.selectSnippet(this.snippetElements[this.highlightedIndex]),this.inputElement.blur()):this.filterSnippets(this.snippets,this.typedValue),this.inputTimerId&&Fk.cancelJob(this.inputTimerId),this.inputTimerId=Ck(Fk,function(){b.typedValue&&(b.fetchSnippets(b.typedValue),b.logInputGesture(b.data))},1E3))}; e.onClick=function(a){(a=Mg(a.target,"snippet-item"))&&this.selectSnippet(a)}; e.panelContentVisibleChanged=function(){this.panelContentVisible&&this.inputElement.focus()}; e.created=function(){this.ytActionHandlerBehavior.actionMap={"yt-update-search-in-video-results-action":"onUpdateSearchInVideoResults"}}; e.ready=function(){var a=this;this.inputElement.addEventListener("focus",function(){a.snippetsWrapper.style.removeProperty("display")})}; e.dataChanged=function(){this.typedValue="";this.snippets=[];this.fetchSnippets("")}; e.fetchSnippets=function(a){a={getSearchInVideoCommand:{externalVideoId:this.ytActionSenderBehavior.sendAction("yt-get-current-video-id-action")[0],query:null!==a&&void 0!==a?a:""},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/in_video/search",sendPost:!0,url:"/service_ajax"}}};this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.filterSnippets=function(a,b){var c=this;if(b){this.filteredSnippets=y.unsafeClone(a);var d=RegExp(Hba(b),"i");this.filteredSnippets=this.filteredSnippets.filter(function(l){return d.test(c.ytRendererBehavior.getSimpleString(l.snippet))}); a=k(this.filteredSnippets);for(var f=a.next();!f.done;f=a.next()){f=f.value;var h=this.ytRendererBehavior.getSimpleString(f.snippet);f.snippet={runs:[{text:h.substring(0,h.toLowerCase().indexOf(b))},{text:h.substring(h.toLowerCase().indexOf(b),h.toLowerCase().indexOf(b)+b.length),bold:!0},{text:h.substring(h.toLowerCase().indexOf(b)+b.length,h.length)}]}}}else this.filteredSnippets=a}; e.onUpdateSearchInVideoResults=function(a){var b,c,d,f;0c&&(this.snippetsWrapper.scrollTop+=a-c)}; e.seekPlayer=function(a){return Za(this,function c(){var d,f=this,h;return za(c,function(l){if(1==l.nextAddress){if(!a)return l.jumpTo(0);d=Number(a.dataset.startOffset);return q(l,MM(f).getPlayerPromise(),3)}h=l.yieldResult;h.seekTo(d/1E3,!0);h.wakeUpControls();ra(l)})})}; e.logInputGesture=function(a){var b=Tn();b&&(null===a||void 0===a?0:a.trackingParams)&&INa(b,Nn(a.trackingParams),"INTERACTION_LOGGING_GESTURE_TYPE_INPUT_TEXT")}; g.Object.defineProperties(hY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rcb){var a=document.createElement("template");a.innerHTML="\n \n \n\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qcb){var d=document.createElement("template");d.innerHTML=""; qcb=d}d=qcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rcb=a}a=rcb;return a}}}); var iY=hY;iY.prototype.panelContentVisibleChanged=iY.prototype.panelContentVisibleChanged;iY.prototype.onClick=iY.prototype.onClick;iY.prototype.onKeyUp=iY.prototype.onKeyUp;iY.prototype.onKeyDown=iY.prototype.onKeyDown;w([P(X.YtRendererBehavior),x("design:type",Object)],iY.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],iY.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],iY.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],iY.prototype,"data",void 0);w([R({value:[]}),x("design:type",Array)],iY.prototype,"snippets",void 0);w([R({value:[]}),x("design:type",Array)],iY.prototype,"filteredSnippets",void 0);w([R({value:[]}),x("design:type",Array)],iY.prototype,"snippetElements",void 0);w([CE("#siv-input"),x("design:type",HTMLElement)],iY.prototype,"inputElement",void 0); w([CE("#siv-snippets-wrapper"),x("design:type",HTMLElement)],iY.prototype,"snippetsWrapper",void 0);w([R({notify:!0}),x("design:type",String)],iY.prototype,"typedValue",void 0);w([R({value:-1}),x("design:type",Number)],iY.prototype,"highlightedIndex",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[mi]),x("design:returntype",void 0)],iY.prototype,"onKeyDown",null); w([S("keyup"),x("design:type",Function),x("design:paramtypes",[mi]),x("design:returntype",void 0)],iY.prototype,"onKeyUp",null);w([S("click"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],iY.prototype,"onClick",null);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],iY.prototype,"panelContentVisible",void 0); w([U("panelContentVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],iY.prototype,"panelContentVisibleChanged",null);iY=w([V({is:"ytd-search-in-video-renderer"})],iY);var scb;var tcb;var ucb=function(){return O.apply(this,arguments)||this}; p(ucb,O); g.Object.defineProperties(ucb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tcb){var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.title)]]

[[data.brandName]]
[[getSimpleString(data.ctaText)]]
";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===scb){var d=document.createElement("template");d.innerHTML=""; scb=d}d=scb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tcb=a}a=tcb;return a}}}); var jY=ucb;w([P(X.YtRendererBehavior),x("design:type",Object)],jY.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],jY.prototype,"data",void 0);jY=w([V({is:"ytd-product-list-item-renderer"})],jY);var vcb;var wcb;var kY=function(){return O.apply(this,arguments)||this}; p(kY,O);kY.prototype.created=function(){this.ytRendererBehavior.monitorScroll=!0}; kY.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{productListItemRenderer:"ytd-product-list-item-renderer"}}}}; kY.prototype.attached=function(){return Za(this,function b(){var c=this;return za(b,function(d){if(1==d.nextAddress)return q(d,MM(c).getPlayerPromise(),2);c.playerApi=d.yieldResult;ra(d)})})}; kY.prototype.panelContentVisibleChanged=function(a){var b;null===(b=this.playerApi)||void 0===b?void 0:b.productsInVideoVisibilityUpdated(a);!N("products_in_video_overlay_include_scroll_to_ep_command")&&a&&this.ytActionSenderBehavior.sendAction("yt-scroll-to-watch-columns")}; g.Object.defineProperties(kY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wcb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vcb){var d=document.createElement("template");d.innerHTML=""; vcb=d}d=vcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wcb=a}a=wcb;return a}}}); var lY=kY;w([P(X.YtRendererBehavior),x("design:type",Object)],lY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],lY.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],lY.prototype,"ytActionSenderBehavior",void 0);w([R({reflectToAttribute:!0,observer:"panelContentVisibleChanged"}),x("design:type",Boolean)],lY.prototype,"panelContentVisible",void 0);w([R(),x("design:type",Object)],lY.prototype,"data",void 0); lY=w([V({is:"ytd-product-list-renderer"})],lY);var xcb;var ycb;var mY=function(){var a=O.apply(this,arguments)||this;a.hideTimestamps=!!cK("hide-transcript-timestamps");a.panel=N("kevlar_transcript_engagement_panel");a.refresh=N("kevlar_transcript_panel_refreshed_styles");a.currentCueIndex_=-1;a.flatCues_=[];a.actionMap={"yt-signal-action-toggle-transcript-timestamps":"handleSignalActionToggleTranscriptTimestamps_","yt-player-time-changed":"onYtPlayerTimeChanged_"};return a}; p(mY,O);e=mY.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.hideTimestampsChanged=function(){bK("hide-transcript-timestamps",this.hideTimestamps)}; e.toggleTranscriptTimestampAction_=function(){this.hideTimestamps=!this.hideTimestamps}; e.handleSignalActionToggleTranscriptTimestamps_=function(){this.toggleTranscriptTimestampAction_()}; e.dataChanged=function(){var a=this,b;null!==(b=this.data)&&void 0!==b&&b.cueGroups&&(this.flatCues_.length=0,this.currentCueIndex_=-1,this.data.cueGroups.forEach(function(c){c.transcriptCueGroupRenderer.cues.forEach(function(d){a.flatCues_.push(parseInt(d.transcriptCueRenderer.startOffsetMs,10))})}))}; e.onYtPlayerTimeChanged_=function(a){if(!(0>a)){for(var b=this.currentCueIndex_,c=b;;){var d=0<=c?this.flatCues_[c]/1E3:-1;if(a+.5d)c+=1;else break}c!=b&&(0<=b&&((a=this.getCueElement_(b))&&a.classList.remove("active"),(b=this.getCueGroupElement_(b))&&b.classList.remove("active")),(b=this.getCueElement_(c))&&b.classList.add("active"),(b=this.getCueGroupElement_(c))&&b.classList.add("active"),this.currentCueIndex_=c,this.isHovered_|| this.scrollElementToTop_(c))}}; e.scrollElementToTop_=function(a){a=this.getCueElement_(3<=a?a-3:0);this.scrollTop=Math.min(a.offsetTop-this.offsetTop,this.scrollHeight-this.offsetHeight)}; e.getCueElement_=function(a){return this.$$(".cue[start-offset=\""+this.flatCues_[a]+"\"]")}; e.getCueGroupElement_=function(a){return(a=this.getCueElement_(a))&&a.parentElement?a.parentElement.parentElement:null}; e.onTap_=function(a){var b=Polymer.dom(a).rootTarget;a.target.classList.contains("cue")&&this.seekCueElement_(b)}; e.onKeyPress_=function(a){13==a.keyCode&&(a=Mg(a.target,"cue"))&&this.seekCueElement_(a)}; e.seekCueElement_=function(a){a=parseInt(a.getAttribute("start-offset"),10);this.ytActionSenderBehavior.sendAction("yt-transcript-player-seek",[a/1E3])}; e.onMouseEnter_=function(){this.isHovered_=!0}; e.onMouseLeave_=function(){this.isHovered_=!1}; g.Object.defineProperties(mY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ycb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xcb){var d=document.createElement("template");d.innerHTML=""; xcb=d}d=xcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ycb=a}a=ycb;return a}}}); var nY=mY;nY.prototype.onMouseLeave_=nY.prototype.onMouseLeave_;nY.prototype.onMouseEnter_=nY.prototype.onMouseEnter_;nY.prototype.onKeyPress_=nY.prototype.onKeyPress_;nY.prototype.onTap_=nY.prototype.onTap_;nY.prototype.dataChanged=nY.prototype.dataChanged;nY.prototype.hideTimestampsChanged=nY.prototype.hideTimestampsChanged;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],nY.prototype,"ytActionHandlerBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],nY.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],nY.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],nY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],nY.prototype,"hideTimestamps",void 0);w([R(),x("design:type",Boolean)],nY.prototype,"isHovered_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],nY.prototype,"panel",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],nY.prototype,"refresh",void 0);w([U("hideTimestamps"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nY.prototype,"hideTimestampsChanged",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nY.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],nY.prototype,"onTap_",null); w([S("keypress"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],nY.prototype,"onKeyPress_",null);w([S("mouseenter"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nY.prototype,"onMouseEnter_",null);w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],nY.prototype,"onMouseLeave_",null);nY=w([V({is:"ytd-transcript-body-renderer"})],nY);var zcb;var Acb;var oY=function(){return O.apply(this,arguments)||this}; p(oY,O);oY.prototype.configureRendererStamper=function(){return{"data.languageMenu":{id:"menu",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; g.Object.defineProperties(oY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Acb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zcb){var d=document.createElement("template");d.innerHTML=""; zcb=d}d=zcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Acb=a}a=Acb;return a}}}); var pY=oY;w([P(X.YtRendererBehavior),x("design:type",Object)],pY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],pY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],pY.prototype,"data",void 0);pY=w([V({is:"ytd-transcript-footer-renderer"})],pY);var Bcb;var Ccb;var qY=function(){return O.apply(this,arguments)||this}; p(qY,O);qY.prototype.configureRendererStamper=function(){return{"data.overflowMenu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"close",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(qY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ccb){var a=document.createElement("template");a.innerHTML="

\n [[getSimpleString(data.formattedTitle)]]\n

\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bcb){var d=document.createElement("template");d.innerHTML=""; Bcb=d}d=Bcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ccb=a}a=Ccb;return a}}}); var rY=qY;w([P(X.YtRendererBehavior),x("design:type",Object)],rY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],rY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],rY.prototype,"data",void 0);rY=w([V({is:"ytd-transcript-header-renderer"})],rY);var Dcb;var Ecb;var sY=function(){var a=O.apply(this,arguments)||this;a.player=null;a.playerPollJobId=0;return a}; p(sY,O);e=sY.prototype;e.panelContentVisibleChanged=function(){this.updatePlayerPolling()}; e.onLoadReloadContinuation=function(a){N("kevlar_transcript_engagement_panel")&&this.ytActionSenderBehavior.sendServiceRequestAction([{clickTrackingParams:a.target.data.clickTrackingParams,getTranscriptEndpoint:{params:a.target.data.continuation},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/get_transcript",sendPost:!0,url:"/service_ajax"}}}])}; e.configureRendererStamper=function(){return{"data.footer":{id:"footer",mapping:{transcriptFooterRenderer:"ytd-transcript-footer-renderer"}},"data.body":{id:"body",mapping:{transcriptBodyRenderer:"ytd-transcript-body-renderer"}},"data.header":{id:"header",mapping:{transcriptHeaderRenderer:"ytd-transcript-header-renderer"}}}}; e.created=function(){N("kevlar_transcript_engagement_panel")&&(this.ytActionHandlerBehavior.actionMap={"yt-transcript-player-seek":"onYtTranscriptPlayerSeek"})}; e.attached=function(){N("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()}; e.detached=function(){N("kevlar_transcript_engagement_panel")&&this.updatePlayerPolling()}; e.updatePlayerPolling=function(){this.isAttached&&this.panelContentVisible?(this.player&&this.stopPollingPlayerTime(),this.startPollingPlayerTime()):this.stopPollingPlayerTime()}; e.startPollingPlayerTime=function(){return Za(this,function b(){var c=this,d;return za(b,function(f){if(1==f.nextAddress)return(d=KM(c))?q(f,d.getPlayerPromise(),2):f.return();c.player=f.yieldResult;c.playerPollJobId=Ck(Fk,c.getPlayerVideoProgress.bind(c),1E3);ra(f)})})}; e.getPlayerVideoProgress=function(){Fk.cancelJob(this.playerPollJobId);if(this.player){var a=this.player.getCurrentTime();this.ytActionSenderBehavior.sendAction("yt-player-time-changed",[a])}this.playerPollJobId=Ck(Fk,this.getPlayerVideoProgress.bind(this),1E3)}; e.stopPollingPlayerTime=function(){this.player=null;Fk.cancelJob(this.playerPollJobId)}; e.onYtTranscriptPlayerSeek=function(a){this.player&&this.player.seekTo(a,!0)}; g.Object.defineProperties(sY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ecb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dcb){var d=document.createElement("template");d.innerHTML=""; Dcb=d}d=Dcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ecb=a}a=Ecb;return a}}}); var tY=sY;tY.prototype.onLoadReloadContinuation=tY.prototype.onLoadReloadContinuation;tY.prototype.panelContentVisibleChanged=tY.prototype.panelContentVisibleChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],tY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],tY.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],tY.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],tY.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],tY.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:N("kevlar_transcript_engagement_panel")}),x("design:type",Boolean)],tY.prototype,"panel",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_transcript_panel_refreshed_styles")}}), x("design:type",Boolean)],tY.prototype,"refresh",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],tY.prototype,"panelContentVisible",void 0);w([U("panelContentVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],tY.prototype,"panelContentVisibleChanged",null);w([S("yt-load-reload-continuation"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],tY.prototype,"onLoadReloadContinuation",null); tY=w([V({is:"ytd-transcript-renderer"})],tY);var Fcb;var Gcb;var uY=function(){return O.apply(this,arguments)||this}; p(uY,O);uY.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!1}}}}}}; g.Object.defineProperties(uY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gcb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fcb){var d=document.createElement("template");d.innerHTML=""; Fcb=d}d=Fcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gcb=a}a=Gcb;return a}}}); var vY=uY;w([P(X.YtRendererBehavior),x("design:type",Object)],vY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],vY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],vY.prototype,"data",void 0);vY=w([V({is:"ytd-media-upsell-renderer"})],vY);var Hcb;var Icb;var wY=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-change-engagement-panel-visibility-action":"onYtChangeEngagementPanelVisibilityAction","yt-scroll-to-engagement-panel-command":"onYtScrollToEngagementPanelCommand","yt-update-engagement-panel-action":"onYtUpdateEngagementPanelAction","yt-show-engagement-panel-scrim-action":"onYtShowEngagementPanelScrimAction","yt-hide-engagement-panel-scrim-action":"onYtHideEngagementPanelScrimAction"};return a}; p(wY,O);e=wY.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{engagementPanelTitleHeaderRenderer:"ytd-engagement-panel-title-header-renderer"},events:!0},"data.content":{id:"content",mapping:{continuationItemRenderer:"ytd-continuation-item-renderer",transcriptRenderer:"ytd-transcript-renderer",clipSectionRenderer:"yt-clip-section-renderer",adsEngagementPanelContentRenderer:"ytd-ads-engagement-panel-content-renderer",macroMarkersListRenderer:"ytd-macro-markers-list-renderer",searchInVideoRenderer:"ytd-search-in-video-renderer", mediaUpsellRenderer:"ytd-media-upsell-renderer",productListRenderer:"ytd-product-list-renderer"},events:!0}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.onYtRendererstamperFinished=function(){var a;this.updateChildVisibilityProperties();if(null===(a=this.data)||void 0===a?0:a.targetId){var b=this.$.content.firstElementChild;b&&b.setAttribute("panel-target-id",this.data.targetId)}}; e.dataChanged=function(a){this.visibility=a&&a.visibility}; e.visibilityChanged=function(a,b){var c,d;this.updateChildVisibilityProperties();var f="ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"===a,h=b&&"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"!==b;(null===(c=this.data)||void 0===c?0:c.onShowCommands)&&a&&"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"!==a&&(!b||"ENGAGEMENT_PANEL_VISIBILITY_HIDDEN"===b)?this.actionSenderBehavior.sendInnerTubeActions(this.data.onShowCommands,this):(null===(d=this.data)||void 0===d?0:d.onHideCommands)&&f&&h&&this.actionSenderBehavior.sendInnerTubeActions(this.data.onHideCommands, this)}; e.updateChildVisibilityProperties=function(){var a=this.visibility,b=this.$.header.firstElementChild;if(b){var c="ENGAGEMENT_PANEL_VISIBILITY_COLLAPSED"===a;b.collapsed=c;(b=b.$["visibility-button"].firstElementChild)&&"ytd-toggle-button-renderer"===b.is&&b.data.isToggled!==c&&b.set("data.isToggled",c)}if(c=this.$.content.firstElementChild)a&&"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"!==a?c.removeAttribute("panel-content-visible"):(c.setAttribute("panel-content-visible",""),c.markDirty())}; e.onYtChangeEngagementPanelVisibilityAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.changeEngagementPanelVisibilityAction;c&&(null===a||void 0===a?void 0:a.targetId)===c&&(this.visibility=a.visibility)}; e.onYtScrollToEngagementPanelCommand=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.scrollToEngagementPanelCommand;c&&(null===a||void 0===a?void 0:a.targetId)===c&&"ENGAGEMENT_PANEL_VISIBILITY_EXPANDED"===this.visibility&&(N("enable_scroll_to_ep_minimal_scrolling")?this.actionSenderBehavior.sendAction("yt-scroll-to-watch-element",[this]):this.actionSenderBehavior.sendAction("yt-scroll-to-watch-columns"))}; e.onYtUpdateEngagementPanelAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.updateEngagementPanelAction;c&&(null===a||void 0===a?void 0:a.targetId)===c&&((null===a||void 0===a?0:a.header)&&this.set("data.header",a.header),(null===a||void 0===a?0:a.content)&&this.set("data.content",a.content),this.updateChildVisibilityProperties())}; e.onYtShowEngagementPanelScrimAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.showEngagementPanelScrimAction;c&&(null===a||void 0===a?void 0:a.engagementPanelTargetId)===c&&(this.scrimmed=!0)}; e.onYtHideEngagementPanelScrimAction=function(a){var b,c=null===(b=this.data)||void 0===b?void 0:b.targetId;a=a.hideEngagementPanelScrimAction;c&&(null===a||void 0===a?void 0:a.engagementPanelTargetId)===c&&(this.scrimmed=!1)}; g.Object.defineProperties(wY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Icb){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hcb){var d=document.createElement("template");d.innerHTML=""; Hcb=d}d=Hcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Icb=a}a=Icb;return a}}}); var xY=wY;xY.prototype.onYtRendererstamperFinished=xY.prototype.onYtRendererstamperFinished;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],xY.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],xY.prototype,"actionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],xY.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],xY.prototype,"data",void 0); w([R({reflectToAttribute:!0,observer:"visibilityChanged"}),x("design:type",Object)],xY.prototype,"visibility",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],xY.prototype,"scrimmed",void 0);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],xY.prototype,"onYtRendererstamperFinished",null);xY=w([V({is:"ytd-engagement-panel-section-list-renderer"})],xY);var Jcb;var Kcb;var yY=function(){return O.apply(this,arguments)||this}; p(yY,O);yY.prototype.onTap=function(){this.data&&(this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.data.clickCommand&&this.actionSenderBehavior.sendInnerTubeActions([this.data.clickCommand],this))}; yY.prototype.computeHideMediaQuery=function(){return"(min-width: 600px) and (max-width: "+(pN()+1E3)+"px)"}; g.Object.defineProperties(yY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kcb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jcb){var d=document.createElement("template");d.innerHTML=""; Jcb=d}d=Jcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kcb=a}a=Kcb;return a}}}); var zY=yY;w([P(W.YtActionSenderBehavior),x("design:type",Object)],zY.prototype,"actionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],zY.prototype,"rendererBehavior",void 0);w([R(),x("design:type",Object)],zY.prototype,"data",void 0);w([R(),x("design:type",Boolean)],zY.prototype,"shouldHide",void 0);zY=w([V({is:"ytd-ad-engagement-panel-banner-renderer"})],zY);var Lcb;var Mcb;var AY=function(){return O.apply(this,arguments)||this}; p(AY,O);AY.prototype.computeHideDefaultAdBadge=function(a,b){return this.data&&!this.data.badges||b}; g.Object.defineProperties(AY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mcb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lcb){var d=document.createElement("template");d.innerHTML=""; Lcb=d}d=Lcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mcb=a}a=Mcb;return a}}}); var BY=AY;w([R(),x("design:type",Object)],BY.prototype,"data",void 0);w([R({value:function(){return N("enable_basic_immersive_desktop_color_extraction")}}), x("design:type",Boolean)],BY.prototype,"useCustomAdBadge",void 0);w([R({value:function(){return YK("AD_BADGE_TEXT",void 0,"Ad")}}), x("design:type",String)],BY.prototype,"adBadgeText",void 0);w([R({computed:"computeHideDefaultAdBadge(data, useCustomAdBadge)"}),x("design:type",Boolean)],BY.prototype,"hideDefaultAdBadge",void 0);BY=w([V({is:"ytd-engagement-panel-ad-subtitle-renderer"})],BY);var Ncb;var Ocb;var CY=function(){return O.apply(this,arguments)||this}; p(CY,O);e=CY.prototype; e.configureRendererStamper=function(){return{"data.visibilityButton":{id:"visibility-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.subtitleComplex":{id:"subtitle-complex",mapping:{engagementPanelAdSubtitleRenderer:"ytd-engagement-panel-ad-subtitle-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.informationButton":{id:"information-button", mapping:{buttonRenderer:"ytd-button-renderer"}},"data.banner":{id:"banner",mapping:{adEngagementPanelBannerRenderer:"ytd-ad-engagement-panel-banner-renderer"}}}}; e.dataChanged_=function(a){a&&a.backgroundColor&&N("enable_basic_immersive_desktop_color_extraction")?(this.disableDefaultColors=!0,this.$.header.style.backgroundColor=PN(a.backgroundColor)):this.disableDefaultColors=!1}; e.onHeaderClick_=function(a){this.shouldTriggerHeaderClick_(a)&&this.data&&(this.data.navigationEndpoint||this.data.onClickCommand?(this.data.navigationEndpoint&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.data.onClickCommand&&this.ytActionSenderBehavior.sendInnerTubeActions([this.data.onClickCommand],this)):(a=this.getVisibilityToggleButton_())&&a.click())}; e.onVisibilityButtonClick_=function(){if(this.data&&this.data.visibilityButton){var a=this.data.visibilityButton.buttonRenderer||this.data.visibilityButton.toggleButtonRenderer;a&&this.ytRendererBehavior.logExplicitClick(a)}}; e.getVisibilityToggleButton_=function(){var a=this.$["visibility-button"].firstElementChild;return a&&"ytd-toggle-button-renderer"==a.is?a:null}; e.shouldTriggerHeaderClick_=function(a){return!NR(Polymer.dom(a).path||[],this,["YTD-MENU-RENDERER","YTD-BUTTON-RENDERER","YTD-TOGGLE-BUTTON-RENDERER"])}; g.Object.defineProperties(CY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ocb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n

\n \n

\n
\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ncb){var d=document.createElement("template");d.innerHTML=""; Ncb=d}d=Ncb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ocb=a}a=Ocb;return a}}}); var DY=CY;w([P(W.YtActionSenderBehavior),x("design:type",Object)],DY.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],DY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],DY.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],DY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],DY.prototype,"disableDefaultColors",void 0); DY=w([V({is:"ytd-engagement-panel-title-header-renderer"})],DY);var Pcb;var Qcb;var EY=function(){var a=O.apply(this,arguments)||this;a.active=!1;return a}; p(EY,O);EY.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; EY.prototype.onEndpointClick=function(){this.data&&this.ytRendererBehavior.logExplicitClick(this.data)}; g.Object.defineProperties(EY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qcb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.timeDescription)]]
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pcb){var d=document.createElement("template");d.innerHTML=""; Pcb=d}d=Pcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qcb=a}a=Qcb;return a}}}); var FY=EY;w([P(X.YtRendererBehavior),x("design:type",Object)],FY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],FY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],FY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],FY.prototype,"active",void 0);FY=w([V({is:"ytd-macro-markers-list-item-renderer"})],FY);var Rcb;var Scb;var GY=function(){var a=O.apply(this,arguments)||this;a.browsingMode=!1;a.actionMap={"yt-set-active-panel-item-action":"handleSetActivePanelItemAction"};return a}; p(GY,O);e=GY.prototype;e.created=function(){var a=this;this.scrollAnimation=new vL(function(b){a.$.contents.scrollTop=b}); this.boundExitBrowsingMode=this.exitBrowsingMode.bind(this)}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.detached=function(){this.removePlayerSeekListener()}; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{macroMarkersListItemRenderer:"ytd-macro-markers-list-item-renderer"}}}}; e.dataChanged=function(){this.exitBrowsingMode()}; e.computeSyncEnabled=function(a){return!(null===a||void 0===a||!a.syncButtonLabel)}; e.getItemByIndex=function(a){return this.$.contents.children[a]}; e.setActiveItem=function(a){this.currentActiveItem&&(this.currentActiveItem.active=!1);a.active=!0;this.currentActiveItem=a}; e.handleSetActivePanelItemAction=function(a){(a=a.setActivePanelItemAction)&&this.panelTargetId===a.panelTargetId&&(a=this.getItemByIndex(a.itemIndex),this.setActiveItem(a),!this.browsingMode&&this.panelContentVisible&&this.scrollToItem(a))}; e.scrollToItem=function(a){a=this.getScrollPositionForItem(a);var b=this.$.contents;b.scrollTop!==a&&this.scrollAnimation.start(b.scrollTop,a,300)}; e.getScrollPositionForItem=function(a){var b=this.$.contents;a=yh(a).y+b.scrollTop-yh(b).y;return Math.min(a,b.scrollHeight-b.offsetHeight)}; e.onScroll=function(){this.ytRendererBehavior.markDirty();var a=this.$.contents;this.syncEnabled&&!this.browsingMode&&this.currentActiveItem&&!this.scrollAnimation.isAnimating_&&10
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rcb){var d=document.createElement("template");d.innerHTML=""; Rcb=d}d=Rcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Scb=a}a=Scb;return a}}}); var HY=GY;HY.prototype.dataChanged=HY.prototype.dataChanged;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],HY.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],HY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],HY.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],HY.prototype,"data",void 0);w([R({computed:"computeSyncEnabled(data)"}),x("design:type",Boolean)],HY.prototype,"syncEnabled",void 0); w([R({reflectToAttribute:!0}),x("design:type",String)],HY.prototype,"panelTargetId",void 0);w([R({reflectToAttribute:!0,observer:"panelContentVisibleChanged"}),x("design:type",Boolean)],HY.prototype,"panelContentVisible",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],HY.prototype,"browsingMode",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],HY.prototype,"dataChanged",null);HY=w([V({is:"ytd-macro-markers-list-renderer"})],HY);var Tcb;var Ucb;Polymer({is:"yt-clip-attribution-renderer",_template:function(){if(void 0!==Ucb)return Ucb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.clipAuthor)]]\n
\n
\n [[getSimpleString(data.createdText)]]\n
\n
\n
\n
\n [[getSimpleString(data.title)]]\n
\n [[getSimpleString(data.viewCount)]]\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tcb){var d=document.createElement("template");d.innerHTML=""; Tcb=d}d=Tcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Ucb=a}, properties:{data:Object},behaviors:[Z,W.YtActionSenderBehavior,X.YtRendererBehavior,TP],stampDom:{"data.authorBadges":{id:"badges",mapping:{}},"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.returnToVideo":{id:"under",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.player_=null;this.playerEvents_=new Map([["onLoopRangeChange",this.onLoopRangeChange_]])}, attached:function(){var a=this;KM(this).getPlayerPromise().then(function(b){a.setPlayer_(b)})}, setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents_);this.set("player_",a);a&&this.listenToPlayerEvents(a,this.playerEvents_)}, onLoopRangeChange_:function(a){!a&&this.data.onScrubExit&&this.sendInnerTubeActions([this.data.onScrubExit],this)}});var Vcb;var Wcb;Polymer({is:"yt-clip-ad-state-renderer",_template:function(){if(void 0!==Wcb)return Wcb;var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.title)]]
\n
[[getSimpleString(data.body)]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vcb){var d=document.createElement("template");d.innerHTML=""; Vcb=d}d=Vcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Wcb=a}, properties:{data:Object},behaviors:[X.YtRendererBehavior]});var Xcb;var Ycb;function Zcb(a,b,c,d){a=Math.max(c,a);b=Math.min(b,d-c);a+b>d?(c=d,a=c-b):c=a+b;return{start:a,end:c}} function $cb(a,b,c,d,f,h){ad&&(a=d-f);b>d&&(b=d);b=Math.min(a+h,Math.max(a+f,b));return{start:a,end:b}} function adb(a,b,c,d,f,h){b>d?b=d:b-f\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);return edb=a}, properties:{start:{type:Number,value:0},end:{type:Number,value:30},visible:{type:Boolean,value:!1},player_:{type:Object},tickSpacing:{type:Number},windowSizeSec:{type:Number},rulerWidth:{type:Number,value:0},rulerShift:{type:Number,value:0},canvasReady_:{type:Boolean,value:!1},storyboardImages_:{type:Array,value:function(){return[]}}, disabled:{type:Boolean,value:!1,reflectToAttribute:!0},forceRender_:{type:Number,value:0},devicePixelRatio_:{type:Number,value:0}},behaviors:[xO.YtActionHandlerBehavior,X.YtRendererBehavior],observers:["drawRuler_(visible, canvasReady_, player_, tickSpacing, windowSizeSec, rulerShift, start, end, storyboardImages_.*, forceRender_, disabled)","setUpCanvas_(visible, devicePixelRatio_, rulerWidth)"],actionMap:{"yt-dark-mode-toggled-action":"onDarkModeToggled_","yt-clip-creation-enable":"onClipCreationEnable_"}, created:function(){this.pendingStoryboardImages_={};this.pixelRatioBreakpoints_=["1dppx","1.5dppx","2dppx","3dppx"];this.tickLabelInterval=15;this.mediumTickInterval=5;this.largeTickInterval=15;this.aboveRulerHeight=28;this.rulerHeight=50;this.smallTickHeight=4;this.mediumTickHeight=8;this.largeTickHeight=16}, attached:function(){var a=this;KM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.updatePixelRatio_();this.pixelRatioBreakpoints_.forEach(function(b){window.matchMedia("screen and (min-resolution: "+b+")").addListener(function(){return a.updatePixelRatio_()}); window.matchMedia("screen and (max-resolution: "+b+")").addListener(function(){return a.updatePixelRatio_()})})}, detached:function(){var a=this;this.setPlayer(null);this.pixelRatioBreakpoints_.forEach(function(b){window.matchMedia("screen and (min-resolution: "+b+")").removeListener(function(){return a.updatePixelRatio_()}); window.matchMedia("screen and (max-resolution: "+b+")").removeListener(function(){return a.updatePixelRatio_()})}); this.storyboardImages_&&this.splice("storyboardImages_",0,this.storyboardImages_.length)}, setPlayer:function(a){a&&this.set("player_",a)}, updatePixelRatio_:function(){this.set("devicePixelRatio_",Math.max(1,window.devicePixelRatio))}, setUpCanvas_:function(a,b,c){this.set("canvasReady_",!1);a&&0!==b&&(a=this.$.ticks,a.width=c*b,a.height=78*b,a.style.width=this.rulerWidth_+"px",a.style.height="78px",a.getContext("2d").scale(b,b),this.set("canvasReady_",!0))}, drawRuler_:function(a,b,c,d,f,h,l,m){a&&c&&b&&(a=this.$.ticks,b=a.getContext("2d"),b.clearRect(0,0,a.width,a.height),b.strokeStyle=this.getComputedStyleValue("--yt-spec-10-percent-layer"),b.lineWidth=2,b.beginPath(),b.moveTo(0,this.aboveRulerHeight),b.lineTo(a.width,this.aboveRulerHeight),b.moveTo(0,a.height),b.lineTo(a.width,a.height),b.stroke(),this.drawRulerTicks_(a,h,f,d),this.drawStoryboardImages_(a,c,h,f,d),b.fillStyle=this.getComputedStyleValue("--yt-spec-themed-overlay-background"),b.fillRect(0, this.aboveRulerHeight,this.timeToPixels_(l-h,d,!1),this.rulerHeight),c=this.timeToPixels_(m-h,d,!1),b.fillRect(c,this.aboveRulerHeight,a.width-c,this.rulerHeight))}, drawRulerTicks_:function(a,b,c,d){var f=a.getContext("2d");f.lineWidth=1;for(var h=Math.floor(Math.max(0,b-this.tickLabelInterval));hd&&(d="0"+d);var f="";(void 0===b?0:b)&&(f="."+Math.round(10*(a-Math.floor(a))));return c+":"+d+f}, timeToPixels_:function(a,b,c){a*=b;return void 0===c||c?a+"px":a}, onDarkModeToggled_:function(){this.set("forceRender_",this.forceRender_+1)}});var fdb;var gdb;Polymer({is:"yt-clip-creation-scrubber-view",_template:function(){if(void 0!==gdb)return gdb;var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
[[durationLabel]]
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fdb){var d=document.createElement("template");d.innerHTML=""; fdb=d}d=fdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return gdb=a}, properties:{start:{type:Number,value:0},end:{type:Number,value:30},duration:{type:Number,computed:"computeDuration_(start, end)"},lengthTemplate:{type:String},durationLabel:{type:String,computed:"computeDurationLabel_(lengthTemplate, duration)"},visible:{type:Boolean,value:!1,observer:"onVisibleChanged_"},player_:{type:Object},draggingLeft_:{type:Boolean,value:!1,observer:"onDragStateChanged_"},draggingRight_:{type:Boolean,value:!1,observer:"onDragStateChanged_"},draggingRuler_:{type:Boolean,value:!1, reflectToAttribute:!0,observer:"onDragStateChanged_"},draggingWindow_:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"onDragStateChanged_"},tickSpacing_:{type:Number,computed:"computeTickSpacing_(windowSizeSec_, rulerWidth_)"},seekableStart:{type:Number,value:0},seekableEnd:{type:Number,value:0},windowSizeMs:{type:Number},windowSizeSec_:{type:Number,computed:"computeWindowSizeSec_(windowSizeMs, seekableStart, seekableEnd)"},rulerWidth_:{type:Number,value:0},rulerShift_:{type:Number,value:0}, disabled:{type:Boolean,value:!1,reflectToAttribute:!0},initialized:{type:Boolean,value:!1,observer:"onInitializedChanged_"},durationAccessibilityLabel:{type:String,value:""}},behaviors:[xO.YtActionHandlerBehavior,TP,X.YtRendererBehavior],observers:["updateLoopRange_(player_, visible, disabled, initialized, start, end)","updateHandles_(start, end, rulerShift_, tickSpacing_, windowSizeSec_)","updateRuler_(start, end)"],actionMap:{"yt-clip-creation-disable":"onClipCreationDisable_"},created:function(){var a= this;this.activeLoopRange_=!1;this.windowDragEndTime_=this.windowDragStartTime_=this.windowDragMouseStart_=this.rulerDragEndTime_=this.rulerDragStartTime_=this.rulerDragRulerStart_=this.rulerDragMouseStart_=0;this.playerEvents=new Map;this.playerEvents.set("onVideoProgress",this.onVideoProgress_);this.playerEvents.set("SEEK_COMPLETE",this.onSeekComplete_);this.playerEvents.set("onStateChange",this.onStateChange_);this.boundHandlers_={};var b={mouseup:this.endDrag_,mousemove:this.handleMouseDrag_, resize:this.updateRulerSize_,handles_mousedown:this.beginHandleDrag_,ruler_mousedown:this.beginRulerDrag_};Object.keys(b).forEach(function(c){a.boundHandlers_[c]=b[c].bind(a)})}, attached:function(){var a=this;KM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.activeLoopRange_=!1;this.$.handles.addEventListener("mousedown",this.boundHandlers_.handles_mousedown);this.$.ticks.addEventListener("mousedown",this.boundHandlers_.ruler_mousedown);window.addEventListener("resize",this.boundHandlers_.resize)}, detached:function(){this.setPlayer(null);window.removeEventListener("resize",this.boundHandlers_.resize);this.storyboardImages_&&this.splice("storyboardImages_",0,this.storyboardImages_.length);this.removeMouseEventHandlers_();this.$.handles.removeEventListener("mousedown",this.boundHandlers_.handles_mousedown);this.$.ticks.removeEventListener("mousedown",this.boundHandlers_.ruler_mousedown)}, setPlayer:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents);a&&(this.set("player_",a),this.listenToPlayerEvents(a,this.playerEvents))}, addMouseEventHandlers_:function(){window.addEventListener("mouseup",this.boundHandlers_.mouseup);window.addEventListener("mousemove",this.boundHandlers_.mousemove)}, removeMouseEventHandlers_:function(){window.removeEventListener("mouseup",this.boundHandlers_.mouseup);window.removeEventListener("mousemove",this.boundHandlers_.mousemove)}, beginHandleDrag_:function(a){this.disabled||(a.preventDefault(),this.draggingWindow_=this.draggingRuler_=this.draggingRight_=this.draggingLeft_=!1,a.target===this.$["handle-left"]?this.beginLeftHandleDrag_():a.target===this.$["handle-right"]?this.beginRightHandleDrag_():this.beginWindowDrag_(a))}, beginLeftHandleDrag_:function(){this.draggingLeft_=!0;this.beginDrag_()}, beginRightHandleDrag_:function(){this.draggingRight_=!0;this.beginDrag_()}, beginWindowDrag_:function(a){this.disabled||(this.draggingWindow_=!0,this.windowDragMouseStart_=a.clientX,this.windowDragStartTime_=this.start,this.windowDragEndTime_=this.end,this.beginDrag_())}, beginRulerDrag_:function(a){this.disabled||(a.preventDefault(),this.draggingRight_=this.draggingLeft_=!1,this.draggingRuler_=!0,this.draggingWindow_=!1,this.rulerDragMouseStart_=a.clientX,this.rulerDragRulerStart_=this.rulerShift_,this.rulerDragStartTime_=this.start,this.rulerDragEndTime_=this.end,this.beginDrag_())}, beginDrag_:function(){this.player_.pauseVideo();this.addMouseEventHandlers_()}, endDrag_:function(){var a=this.draggingRight_;this.draggingWindow_=this.draggingRuler_=this.draggingRight_=this.draggingLeft_=!1;this.updateLoopRange_(this.player_,this.visible,this.disabled,this.initialized,this.start,this.end,a);this.removeMouseEventHandlers_()}, onVisibleChanged_:function(a){a&&this.updateRulerSize_()}, updateRulerSize_:function(){this.set("rulerWidth_",this.$.ruler.getBoundingClientRect().width)}, handleMouseDrag_:function(a){0==a.buttons&&(this.draggingLeft_||this.draggingRight_||this.draggingRuler_||this.draggingWindow_)&&this.endDrag_();this.disabled||(this.draggingRuler_?this.handleRulerDrag_(a):this.draggingLeft_||this.draggingRight_?this.handleWindowHandleDrag_(a):this.draggingWindow_&&this.handleWindowDrag_(a))}, handleRulerDrag_:function(a){a=this.pixelsToTime_(a.clientX-this.rulerDragMouseStart_);a=this.capRulerOffset_(this.rulerDragRulerStart_-a);this.set("rulerShift_",a);var b=this.rulerDragStartTime_-(this.rulerDragRulerStart_-a);this.fire("set-fixed-length-range",{start:b,duration:this.rulerDragEndTime_-(this.rulerDragRulerStart_-a)-b})}, handleWindowDrag_:function(a){a=this.pixelsToTime_(a.clientX-this.windowDragMouseStart_);this.fire("set-fixed-length-range",{start:this.windowDragStartTime_+a,duration:this.windowDragEndTime_-this.windowDragStartTime_,startLimit:this.rulerShift_,endLimit:this.rulerShift_+this.windowSizeSec_})}, capRulerOffset_:function(a){return Math.min(Math.max(this.seekableStart,a),this.seekableEnd-this.windowSizeSec_)}, handleWindowHandleDrag_:function(a){var b=this.$.ruler.getBoundingClientRect();a=a.clientX-b.left;a=Math.max(0,Math.min(a,b.width));b=this.pixelsToTime_(a)+this.rulerShift_;if(this.draggingLeft_){var c=b;var d=this.end}else this.draggingRight_&&(c=this.start,d=b);this.fire("set-range",{start:c,end:d,startLimit:this.rulerShift_,endLimit:this.rulerShift_+this.windowSizeSec_})}, onVideoProgress_:function(a){this.disabled||(a=this.timeToPixels_(a-this.rulerShift_,this.tickSpacing_),this.$.playhead.style.transform="translateX("+a+")")}, onClipCreationDisable_:function(){this.endDrag_()}, timeToPixels_:function(a,b,c){a*=b;return void 0===c||c?a+"px":a}, pixelsToTime_:function(a){return a/this.tickSpacing_}, onInitializedChanged_:function(a){a&&this.centerRuler_(this.start,this.end,this.windowSizeSec_)}, centerRuler_:function(a,b,c){this.set("rulerShift_",this.capRulerOffset_(a+(b-a)/2-c/2))}, updateLoopRange_:function(a,b,c,d,f,h,l){a&&(b&&d&&!c?(this.draggingLeft_||this.draggingRuler_||this.draggingWindow_?(a.pauseVideo(),a.seekTo(f,!1)):this.draggingRight_?(a.pauseVideo(),a.seekTo(h-.1,!1)):(l?a.seekTo(h-1,!0):(b=a.getCurrentTime(),bh?a.seekTo(f,!0):a.seekTo(b,!0)),a.playVideo()),a.setLoopRange({startTimeMs:1E3*f,endTimeMs:1E3*h}),this.activeLoopRange_=!0,this.onVideoProgress_(a.getCurrentTime())):this.activeLoopRange_&&(a.setLoopRange(null),this.activeLoopRange_=!1))}, updateHandles_:function(a,b,c,d){this.$.handles.style.left=this.timeToPixels_(a-c,d);this.$.handles.style.width=this.timeToPixels_(b-a,d)}, updateRuler_:function(a,b){var c=this.rulerShift_+this.windowSizeSec_;(ac)&&this.centerRuler_(this.start,this.end,this.windowSizeSec_)}, computeDurationLabel_:function(a,b){return a?a.replace("$clip_length",parseFloat(b).toFixed(1)):""}, computeDuration_:function(a,b){return this.isValidTime_(a)&&this.isValidTime_(b)&&aa?!1:this.player?a>=this.seekableStart&&a<=this.seekableEnd:!0}, computeWindowSizeSec_:function(a,b,c){return Math.min((a||12E4)/1E3,c-b)}, computeTickSpacing_:function(a,b){return b?b/a:1}, onDragStateChanged_:function(){this.fire("clips-drag-state",{startChanging:this.draggingLeft_||this.draggingWindow_||this.draggingRuler_,endChanging:this.draggingRight_||this.draggingWindow_||this.draggingRuler_})}, centerRangeOnTime_:function(a){a=bdb(!0,a,this.duration,this.seekableStart,this.seekableEnd);this.fire("set-fixed-length-range",{start:a.start,duration:a.end-a.start})}, onSeekComplete_:function(){var a=this.draggingLeft_||this.draggingRight_||this.draggingWindow_||this.draggingRuler_;!this.visible||this.disabled||a||(a=this.player_.getCurrentTime(),(!this.player_.getLoopRange()||athis.end)&&this.centerRangeOnTime_(a))}, onStateChange_:function(a){this.visible&&!this.disabled&&0==a&&this.centerRangeOnTime_(this.seekableEnd)}});Polymer({is:"yt-clip-creation-scrubber-renderer",_template:function(){if(void 0!==ddb)return ddb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \u2013\n \n \n \n \n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cdb){var d=document.createElement("template");d.innerHTML=""; cdb=d}d=cdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return ddb=a}, properties:{data:Object,start:{type:Number,value:0,observer:"onStartChanged_"},startValid:{type:Boolean,value:!0},startWillUpdate:{type:Boolean,value:!1,reflectToAttribute:!0},end:{type:Number,value:30,observer:"onEndChanged_"},endValid:{type:Boolean,value:!0},endWillUpdate:{type:Boolean,value:!1,reflectToAttribute:!0},minLengthSec:{type:Number,computed:"computeMinLengthSec_(data.minLengthMs)"},maxLengthSec:{type:Number,computed:"computeMaxLengthSec_(data.maxLengthMs)"},defaultLengthSec:{type:Number, computed:"computeDefaultLengthSec_(data.defaultLengthMs)"},visible_:{type:Boolean,value:!1},player_:{type:Object},seekableStart_:{type:Number,value:null,computed:"computeSeekableStart_(player_, visible_)"},seekableEnd_:{type:Number,computed:"computeSeekableEnd_(player_, visible_)"},initialized:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},highlightStart:{type:Boolean,value:!1,reflectToAttribute:!0},highlightEnd:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[xO.YtActionHandlerBehavior, X.YtRendererBehavior],observers:["initializeClipRange_(player_, visible_, seekableStart_, seekableEnd_)","updateInputs_(start, end)"],listeners:{"set-fixed-length-range":"onSetFixedLengthRange_","set-range":"onSetRange_","clips-drag-state":"onDragState_"},actionMap:{"yt-clip-creation-visibility-changed":"onVisibilityChangedAction_","yt-clip-creation-disable":"onClipCreationDisable_","yt-clip-creation-enable":"onClipCreationEnable_"},created:function(){this.endHighlightTimeout=this.startHighlightTimeout= 0}, attached:function(){var a=this;KM(this).getPlayerPromise().then(function(b){a.setPlayer(b)}); this.$.start.addEventListener("input",function(b){return a.handleStartInput_(b)}); this.$.end.addEventListener("input",function(b){return a.handleEndInput_(b)}); this.$.start.addEventListener("focusout",function(b){return a.handleStartBlur_(b)}); this.$.end.addEventListener("focusout",function(b){return a.handleEndBlur_(b)})}, setPlayer:function(a){this.set("player_",a)}, onSetFixedLengthRange_:function(a){var b=a.detail;a=b.start;var c=b.duration,d=b.startLimit;b=b.endLimit;d||(d=this.seekableStart_);b||(b=this.seekableEnd_);a=Zcb(a,c,d,b);this.setProperties({start:a.start,end:a.end})}, onSetRange_:function(a){var b=a.detail;a=b.start;var c=b.end,d=b.startLimit;b=b.endLimit;d||(d=this.seekableStart_);b||(b=this.seekableEnd_);(a=$cb(a,c,d,b,this.minLengthSec,this.maxLengthSec))&&this.setProperties({start:a.start,end:a.end})}, updateInputs_:function(a,b){this.$.start.focused||(this.$.start.value=this.formatTime_(a,!0));this.$.end.focused||(this.$.end.value=this.formatTime_(b,!0))}, handleStartInput_:function(a){a=this.parseTime_(a.target.value);if(null===a)this.set("startValid",!1);else{var b=this.end,c=$cb(a,this.end,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec);c?(this.set("endWillUpdate",c.end!==b),this.set("startValid",c.start===a)):this.set("startValid",!1)}}, handleEndInput_:function(a){a=this.parseTime_(a.target.value);if(null===a)this.set("endValid",!1);else{var b=this.start,c=adb(this.start,a,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec);c?(this.set("startWillUpdate",c.start!==b),this.set("endValid",c.end===a)):this.set("endValid",!1)}}, handleStartBlur_:function(a){a=this.parseTime_(a.target.value);null===a?this.$.start.value=this.formatTime_(this.start,!0):this.forceUpdateInputs_($cb(a,this.end,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec))}, handleEndBlur_:function(a){a=this.parseTime_(a.target.value);null===a?this.$.end.value=this.formatTime_(this.end,!0):this.forceUpdateInputs_(adb(this.start,a,this.seekableStart_,this.seekableEnd_,this.minLengthSec,this.maxLengthSec))}, forceUpdateInputs_:function(a){a&&this.setProperties({start:a.start,end:a.end});this.$.start.value=this.formatTime_(this.start,!0);this.$.end.value=this.formatTime_(this.end,!0);this.setProperties({startValid:!0,endValid:!0,endWillUpdate:!1,startWillUpdate:!1})}, initializeClipRange_:function(a,b,c,d){if(!a||!b||null===c||!d)this.set("initialized",!1);else if(!this.initialized){b=a.getCurrentTime();var f=this.getDefaultLengthSec_();a=bdb(1==a.getPlayerState(),b,f,c,d);this.setProperties({start:a.start,end:a.end});this.set("initialized",!0);this.$.start.value=this.formatTime_(this.start,!0);this.$.end.value=this.formatTime_(this.end,!0)}}, onStartChanged_:function(a,b){var c=this;this.fire("start-changed",{start:a});isNaN(b)||(this.set("highlightStart",!0),clearTimeout(this.startHighlightTimeout),this.startHighlightTimeout=setTimeout(function(){c.set("highlightStart",!1);c.startHighlightTimeout=0},3E3))}, onEndChanged_:function(a,b){var c=this;this.fire("end-changed",{end:a});isNaN(b)||(this.set("highlightEnd",!0),clearTimeout(this.endHighlightTimeout),this.endHighlightTimeout=setTimeout(function(){c.set("highlightEnd",!1);c.endHighlightTimeout=0},3E3))}, parseTime_:function(a){var b="hh:mm:ss hh:mm:ss. hh:mm:ss.S mm:ss mm:ss. mm:ss.S sss sss. sss.S .S".split(" ").map(function(c){var d=new AH(c),f=new Date(0);return{num:d.parse(a,f),date:f,pattern:c}}).reduce(function(c,d){return d.num>c.num?d:c},{num:-Infinity, date:null,pattern:null});return b.date?b.date.getTime()/1E3:null}, formatTime_:function(a,b){var c=Math.floor(a/60),d=Math.floor(a)%60;10>d&&(d="0"+d);var f="";(void 0===b?0:b)&&(f="."+Math.round(10*(a-Math.floor(a))));return c+":"+d+f}, onVisibilityChangedAction_:function(a){this.set("visible_",a.visible)}, computeMinLengthSec_:function(a){return a/1E3||5}, computeMaxLengthSec_:function(a){return a/1E3||60}, computeDefaultLengthSec_:function(a){return a/1E3}, getDefaultLengthSec_:function(){return this.defaultLengthSec||30}, computeSeekableStart_:function(a,b){return a&&b?a.getProgressState(1).seekableStart:0}, computeSeekableEnd_:function(a,b){return a&&b?a.getProgressState(1).seekableEnd:0}, onClipCreationDisable_:function(){this.set("disabled",!0)}, onClipCreationEnable_:function(){this.set("disabled",!1)}, onDragState_:function(a){this.set("highlightStart",a.detail.startChanging);this.set("highlightEnd",a.detail.endChanging)}});var hdb;var idb;Polymer({is:"yt-clip-creation-text-input-renderer",_template:function(){if(void 0!==idb)return idb;var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hdb){var d=document.createElement("template");d.innerHTML=""; hdb=d}d=hdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return idb=a}, properties:{data:Object,value:{type:String,value:"",observer:"onValueChanged_"},valid:{type:Boolean,value:!1,observer:"onValidChanged_"},fieldValid:{type:Boolean,computed:"computeFieldValid_(valid, userChangedValue_)"},userChangedValue_:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}},behaviors:[xO.YtActionHandlerBehavior,X.YtRendererBehavior],listeners:{keydown:"handleKeyDown_",input:"handleInput_",blur:"handleBlur_"},actionMap:{"yt-clip-creation-disable":"onClipCreationDisable_","yt-clip-creation-enable":"onClipCreationEnable_", "yt-clip-creation-visibility-changed":"onClipCreationVisibilityChange_"},detached:function(){this.userChangedValue_=!1}, handleInput_:function(){var a=this.$.title.value.replace(/\r|\n/g," ");this.set("value",a);this.$.title.value=a;this.valid=this.$.title.validate();this.userChangedValue_=!0}, handleKeyDown_:function(a){a.keyCode==(ve?kBa(13):xe&&we?lBa(13):13)&&a.preventDefault()}, handleBlur_:function(){this.valid=this.$.title.validate()}, onValueChanged_:function(a){this.fire("title-changed",{title:a})}, onValidChanged_:function(a){this.fire("title-valid-changed",{valid:a})}, computeFieldValid_:function(a,b){return!b||a}, setInput:function(a){(this.shadowRoot||this).querySelector("paper-textarea").value=a;this.handleInput_()}, onClipCreationDisable_:function(){this.set("disabled",!0)}, onClipCreationEnable_:function(){this.set("disabled",!1)}, onClipCreationVisibilityChange_:function(a){var b=this;a.visible?requestAnimationFrame(function(){b.$.title.inputElement.textarea.focus()}):this.setInput("")}});Polymer({is:"yt-clip-creation-renderer",_template:function(){if(void 0!==Ycb)return Ycb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
[[getSimpleString(data.displayName)]]
\n
\n
[[data.publicityLabel]]
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xcb){var d=document.createElement("template");d.innerHTML=""; Xcb=d}d=Xcb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Ycb=a}, properties:{data:Object,titleValue:{type:String,value:""},titleValid:{type:Boolean,value:!1},start:{type:Number,value:0},startValid:{type:Boolean,value:!0},end:{type:Number,value:0},endValid:{type:Boolean,value:!0},videoId:{type:String,value:""},formValid:{type:Boolean,computed:"computeFormValid_(data, titleValid, startValid, endValid)"},submitButton_:{type:Object,computed:"computeSubmitButton_(data.saveButton, isAdPlaying, isLoading_, formValid)"},submitCommand_:{type:Object,computed:"computeSubmitCommand_(data.saveButton.buttonRenderer.command)"}, cancelButton_:{type:Object,computed:"computeCancelButton_(data.cancelButton, isAdPlaying, isLoading_)"},isLoading_:{type:Boolean,value:!1},isAdPlaying:{type:Boolean,value:!1,reflectToAttribute:!0}},behaviors:[W.YtActionSenderBehavior,TP,Z,X.YtRendererBehavior],listeners:{"title-changed":"onTitleChanged_","title-valid-changed":"onTitleValidChanged_","start-changed":"onStartChanged_","start-valid-changed":"onStartValidChanged_","end-changed":"onEndChanged_","end-valid-changed":"onEndValidChanged_"}, stampDom:{submitButton_:{id:"share",mapping:{buttonRenderer:"yt-button-renderer"}},cancelButton_:{id:"cancel",mapping:{buttonRenderer:"yt-button-renderer"}},"data.titleInput":{id:"title-input",mapping:{clipCreationTextInputRenderer:"yt-clip-creation-text-input-renderer"}},"data.scrubber":{id:"scrubber",mapping:{clipCreationScrubberRenderer:"yt-clip-creation-scrubber-renderer"}},"data.adStateOverlay":{id:"ad-state",mapping:{clipAdStateRenderer:"yt-clip-ad-state-renderer"}}},created:function(){this.player_= null;this.playerEvents=new Map;this.playerEvents.set("onAdStart",this.playerAdStartHandler_);this.playerEvents.set("onAdEnd",this.playerAdEndHandler_);this.playerEvents.set("onVideoDataChange",this.onVideoDataChange_)}, attached:function(){var a=this;KM(this).getPlayerPromise().then(function(b){a.setPlayer(b)})}, detached:function(){this.setPlayer(null)}, setPlayer:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.playerEvents);a&&(this.player_=a,this.set("videoId",a.getVideoData().video_id||""),a.getAdState&&1===a.getAdState()&&(this.set("isAdPlaying",!0),this.sendAction("yt-clip-creation-disable")),this.listenToPlayerEvents(a,this.playerEvents))}, ready:function(){this.$.share.addEventListener("tap",this.onSubmit_.bind(this))}, onTitleChanged_:function(a){this.set("titleValue",a.detail.title)}, onStartChanged_:function(a){this.set("start",a.detail.start)}, onEndChanged_:function(a){this.set("end",a.detail.end)}, onTitleValidChanged_:function(a){this.set("titleValid",a.detail.valid)}, onStartValidChanged_:function(a){this.set("startValid",a.detail.valid)}, onEndValidChanged_:function(a){this.set("endValid",a.detail.valid)}, onVideoDataChange_:function(){this.set("videoId",this.player_.getVideoData().video_id||"")}, computeFormValid_:function(a,b,c,d){return!!(a&&b&&c&&d)}, computeCancelButton_:function(a,b,c){if(!a||!a.buttonRenderer)return null;a=Polymer.Base.mixin({},a.buttonRenderer);a.isDisabled=b||c;return{buttonRenderer:a}}, computeSubmitButton_:function(a,b,c){return a&&a.buttonRenderer?(a=Polymer.Base.mixin({},a.buttonRenderer),a.command=void 0,a.isDisabled=!this.formValid||b||c,{buttonRenderer:a}):null}, computeSubmitCommand_:function(a){return a||null}, onSubmit_:function(a){var b=this;a.stopPropagation();a.preventDefault();this.submitCommand_&&(a={},a.comment_text=this.titleValue,a.clip_external_video_id=this.videoId,a.clip_offset_ms=parseInt(1E3*this.start,10),a.clip_duration_ms=parseInt(1E3*(this.end-this.start),10),this.set("isLoading_",!0),this.sendServiceRequestAction([this.submitCommand_,a]).then(function(){b.set("isLoading_",!1)},function(){b.set("isLoading_",!1)}))}, playerAdStartHandler_:function(){this.sendAction("yt-clip-creation-disable");this.set("isAdPlaying",!0)}, playerAdEndHandler_:function(){this.sendAction("yt-clip-creation-enable");this.set("isAdPlaying",!1)}});var jdb;var kdb;Polymer({is:"yt-clip-section-footer-renderer",_template:function(){if(void 0!==kdb)return kdb;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jdb){var d=document.createElement("template");d.innerHTML=""; jdb=d}d=jdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return kdb=a}, properties:{data:Object},behaviors:[Z],stampDom:{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"yt-button-renderer"}}}});var ldb;var mdb;Polymer({is:"yt-clip-section-renderer",_template:function(){if(void 0!==mdb)return mdb;var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ldb){var d=document.createElement("template");d.innerHTML=""; ldb=d}d=ldb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return mdb=a}, behaviors:[W.YtActionSenderBehavior,Z,X.YtRendererBehavior,XO],properties:{data:Object,panelContentVisible:{type:Boolean,reflectToAttribute:!0,observer:"onPanelContentVisibleChanged_"}},stampDom:{"data.contents":{id:"contents",mapping:{clipAttributionRenderer:"yt-clip-attribution-renderer",clipCreationRenderer:"yt-clip-creation-renderer"}},"data.footer":{id:"footer",mapping:{clipSectionFooterRenderer:"yt-clip-section-footer-renderer"}}},onPanelContentVisibleChanged_:function(a){this.data&&this.data.contents&&( this.data.contents.some(function(b){return b.hasOwnProperty("clipCreationRenderer")})&&this.sendAction("yt-clip-creation-visibility-changed",[{visible:!!a}]),a&&this.sendAction("yt-toggle-theater-mode",[!1]))}});var ndb;var odb;var IY=function(){return O.apply(this,arguments)||this}; p(IY,O);IY.prototype.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{merchandiseItemRenderer:"ytd-merch-shelf-item-renderer"}},"data.flaggingMenu":{id:"flagging-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.informationButton":{id:"information-button-container",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; IY.prototype.dataChanged=function(){this.ytdHorizontalListBehavior.reset()}; IY.prototype.updateOffset=function(){this.ytdHorizontalListBehavior.offset_=Math.max(0,Math.min(this.ytdHorizontalListBehavior.offset_,this.items.clientWidth-this.$["scroll-container"].clientWidth));this.ytdHorizontalListBehavior.reposition_()}; g.Object.defineProperties(IY.prototype,{isSingleItem:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.items&&1===this.data.items.length}}}); g.Object.defineProperties(IY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===odb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[data.title]]
\n \n
\n
\n
\n\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ndb){var d=document.createElement("template");d.innerHTML=""; ndb=d}d=ndb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);odb=a}a=odb;return a}}}); var JY=IY;JY.prototype.updateOffset=JY.prototype.updateOffset;JY.prototype.dataChanged=JY.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],JY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],JY.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ.YtdHorizontalListBehavior),x("design:type",Object)],JY.prototype,"ytdHorizontalListBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],JY.prototype,"componentBehavior",void 0); w([R(),x("design:type",Object)],JY.prototype,"data",void 0);w([R({value:6}),x("design:type",Number)],JY.prototype,"initialCount",void 0);w([R({value:"data.items"}),x("design:type",String)],JY.prototype,"itemsPath",void 0);w([CE("#items"),x("design:type",yV)],JY.prototype,"items",void 0);w([BE("data.items"),x("design:type",Object),x("design:paramtypes",[])],JY.prototype,"isSingleItem",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JY.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],JY.prototype,"updateOffset",null);JY=w([V({is:"ytd-merch-shelf-renderer"})],JY);var pdb;var qdb;var KY=function(){return O.apply(this,arguments)||this}; p(KY,O);KY.prototype.configureRendererStamper=function(){return{"data.scrollUpButton":{id:"scroll-up",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.subscribeButton":{id:"subscribe",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; KY.prototype.activate=function(a){a.appendTo(this.player);a.getPlayerPromise().then(function(b){b.setMinimized(!0);b.setUseFastSizingOnWatch(!1)}); this.active=!0}; KY.prototype.deactivate=function(){var a=this.player.firstElementChild;a.getPlayerPromise().then(function(b){b.setMinimized(!1);b.setUseFastSizingOnWatch(!0)}); this.active=!1;return a}; KY.prototype.onScrollUpTap=function(){this.componentBehavior.getInterfaceForTs("ytd-page-manager").getCurrentPage().setScrollTop(0)}; g.Object.defineProperties(KY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qdb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n

[[getSimpleString(data.title)]]

\n
\n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pdb){var d=document.createElement("template");d.innerHTML=""; pdb=d}d=pdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qdb=a}a=qdb;return a}}}); var LY=KY;w([P(X.YtRendererBehavior),x("design:type",Object)],LY.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],LY.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],LY.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],LY.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],LY.prototype,"active",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_while_miniplayer_bar_dark_launch")}}), x("design:type",Boolean)],LY.prototype,"darkLaunch",void 0);w([CE("#player"),x("design:type",HTMLDivElement)],LY.prototype,"player",void 0);LY=w([V({is:"ytd-miniplayer-bar-renderer"})],LY);var rdb;var sdb;var MY=function(){return O.apply(this,arguments)||this}; p(MY,O); MY.prototype.dataChanged=function(a){if(a){var b=this.$.text;a=a.companionLegalText;var c;a=nea(a,null===(c=fh())||void 0===c?void 0:c.createHTML(a));if("script"===b.tagName.toLowerCase())throw Error("Use setTextContent with a SafeScript.");if("style"===b.tagName.toLowerCase())throw Error("Use setTextContent with a SafeStyleSheet.");if(a instanceof mea){var d;if(null===(d=dh())||void 0===d?0:d.isHTML(a))c=a;else if(a instanceof hh)c=a.privateDoNotAccessOrElseWrappedHtml;else throw Error("wrong type")}else c= oc(a);b.innerHTML=c}}; MY.prototype.computeAutoScrollEnabled=function(a,b){return a&&!b}; MY.prototype.expandedChanged=function(){this.expanderIcon=this.expanded?"expand-less":"expand-more"}; MY.prototype.onToggleTap=function(){this.expanded=!this.expanded}; g.Object.defineProperties(MY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sdb){var a=document.createElement("template");a.innerHTML="\n\n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rdb){var d=document.createElement("template");d.innerHTML=""; rdb=d}d=rdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sdb=a}a=sdb;return a}}}); var NY=MY;w([P(X.YtRendererBehavior),x("design:type",Object)],NY.prototype,"ytRendererBehavior",void 0);w([P(n1a),x("design:type",Object)],NY.prototype,"ytdAutoScrollBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],NY.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"expandedChanged",value:!1}),x("design:type",Boolean)],NY.prototype,"expanded",void 0); w([R({computed:"computeAutoScrollEnabled(data.companionLegalTextEnableAutoscroll, expanded)"}),x("design:type",Boolean)],NY.prototype,"autoScrollEnabled",void 0);w([R(),x("design:type",String)],NY.prototype,"expanderIcon",void 0);NY=w([V({is:"ytd-companion-legal-text-renderer"})],NY);var tdb;var udb;var OY,PY=function(){return O.apply(this,arguments)||this}; p(PY,O);e=PY.prototype;e.getOnLayoutVisibleCallback=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.dataChanged=function(){if(this.data){this.set("data.adBadge",OY.DEFAULT_AD_BADGE_RENDERER);var a=this.getOnLayoutVisibleCallback();a&&a()}}; e.getButtonRenderer=function(a){return a.actionButton&&a.actionButton.buttonRenderer?(delete a.actionButton.buttonRenderer.navigationEndpoint,a.actionButton.buttonRenderer):{}}; e.onTap=function(){this.data&&this.data.navigationEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["action-companion",this.getLayoutId()]))}; g.Object.defineProperties(PY.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}, hideBanner:{configurable:!0,enumerable:!0,get:function(){var a=this.data.bannerImage&&this.get("thumbnail.thumbnails.0.url",this.data.bannerImage);return a?-1!==a.indexOf("/default_banner"):!0}}}); g.Object.defineProperties(PY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===udb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n \n
\n
\n [[data.headline.text]]\n
\n
\n
\n \n \n
\n \n [[data.description.text]]\n \n
\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tdb){var d=document.createElement("template");d.innerHTML=""; tdb=d}d=tdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);udb=a}a=udb;return a}}}); var QY=OY=PY;OY.prototype.onTap=OY.prototype.onTap;OY.prototype.dataChanged=OY.prototype.dataChanged;QY.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(X.YtRendererBehavior),x("design:type",Object)],QY.prototype,"rendererBehavior",void 0);w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],QY.prototype,"macroReplacementBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],QY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],QY.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],QY.prototype,"macros",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],QY.prototype,"interactionLoggingClientData",null);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],QY.prototype,"hideBanner",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QY.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],QY.prototype,"onTap",null);QY=OY=w([V({is:"ytd-action-companion-ad-renderer"})],QY);var vdb;var wdb;var xdb={shoppingCompanionCarouselRenderer:"ytd-shopping-companion-renderer",imageCompanionAdRenderer:"ytd-image-companion-renderer",actionCompanionAdRenderer:"ytd-action-companion-ad-renderer"},RY=function(){var a=O.apply(this,arguments)||this;a.updateCompanionDataJobId_=0;a.contentVideoId_=null;a.player_=null;a.actionMap={"yt-companion-ad-clicked":"handleCompanionAdClicked"};return a}; p(RY,O);e=RY.prototype;e.configureRendererStamper=function(){return{oneofRenderer:{id:"companion",mapping:xdb}}}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;var b=KM(this);b&&b.getPlayerPromise().then(function(c){a.getCachedDataAndListen_(c)})}; e.detached=function(){this.player_&&(this.ytPlayerListenerBehavior.unlistenFromPlayerEvent(this.player_,"updateKevlarOrC3Companion",this.receiveCompanionData_),this.player_=null)}; e.updateRendererStamper_=function(){var a={};if(this.data)for(var b in xdb)if(this.data[b]){a[b]=this.data[b];break}if(void 0!=this.oneofRenderer||Object.keys(a).length)this.oneofRenderer=a}; e.getCachedDataAndListen_=function(a){var b=this.retrieveCachedCompanionData_();b&&Object.keys(b).length&&this.receiveCompanionData_(b);this.ytPlayerListenerBehavior.listenToPlayerEvent(a,"updateKevlarOrC3Companion",this.receiveCompanionData_);this.player_=a}; e.retrieveCachedCompanionData_=function(){return t.yt&&t.yt.www&&t.yt.www.ads&&t.yt.www.ads.eventcache&&t.yt.www.ads.eventcache.getLastCompanionData?t.yt.www.ads.eventcache.getLastCompanionData():null}; e.receiveCompanionData_=function(a){a&&Object.keys(a).length&&(this.contentVideoId_=a.contentVideoId);this.setCompanionData_(a)}; e.setCompanionData_=function(a){this.cancelPendingCompanionAdJobs_();if(a){this.updateCompanionDataJobId_=0;for(var b in xdb)this.data[b]=void 0;a.shoppingCompanionCarouselRenderer?this.set("data.shoppingCompanionCarouselRenderer",a.shoppingCompanionCarouselRenderer):a.imageCompanionAdRenderer?this.set("data.imageCompanionAdRenderer",a.imageCompanionAdRenderer):a.actionCompanionAdRenderer&&(this.set("data.actionCompanionAdRenderer",a.actionCompanionAdRenderer),N("enable_offer_suppression")&&this.ytActionSenderBehavior.sendOptionalAction("yt-hide-unlimited-offer-module")); this.updateRendererStamper_()}}; e.dataChanged_=function(){var a=this,b=KM(this);b?b.getPlayerPromise().then(function(c){a.contentVideoId_&&c.getVideoUrl().includes("v="+a.contentVideoId_)||(a.cancelPendingCompanionAdJobs_(),a.updateRendererStamper_())}):vd(Error("Missing PlayerManager"))}; e.cancelPendingCompanionAdJobs_=function(){this.updateCompanionDataJobId_&&(Fk.cancelJob(this.updateCompanionDataJobId_),this.updateCompanionDataJobId_=0)}; e.handleCompanionAdClicked=function(a,b){this.player_.onAdUxClicked(a,b);this.player_.pauseVideo()}; g.Object.defineProperties(RY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wdb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vdb){var d=document.createElement("template");d.innerHTML="";vdb=d}d=vdb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wdb=a}a=wdb;return a}}}); var SY=RY;w([P(kO.YtComponentBehavior),x("design:type",Object)],SY.prototype,"ytComponentBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],SY.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],SY.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],SY.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],SY.prototype,"ytRendererstamperBehavior",void 0); w([P(TP),x("design:type",Object)],SY.prototype,"ytPlayerListenerBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],SY.prototype,"data",void 0);w([R(),x("design:type",Object)],SY.prototype,"oneofRenderer",void 0);SY=w([V({is:"ytd-companion-slot-renderer"})],SY);var ydb;var zdb;var TY=function(){return O.apply(this,arguments)||this}; p(TY,O);e=TY.prototype;e.getOnLayoutVisibleCallback=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.dataChanged=function(){if(this.data){if(this.data.image&&this.data.image.thumbnail&&this.data.image.thumbnail.thumbnails&&this.data.image.thumbnail.thumbnails.length){var a=this.data.image.thumbnail.thumbnails[0];this.imageSrc=a.url?ac(a.url):void 0;this.imageWidth=a.width||0;this.imageHeight=a.height||0}this.data.clickthroughEndpoint&&this.data.clickthroughEndpoint.urlEndpoint&&(a=this.data.clickthroughEndpoint.urlEndpoint.url,N("kevlar_sanitize_image_companion_killswitch")?this.clickThroughUrl= a||"":a?(a=ac(a),this.clickThroughUrl=Xb(a)):this.clickThroughUrl=void 0);(a=this.getOnLayoutVisibleCallback())&&a()}}; e.onTap=function(){var a=this;this.data&&this.data.clickthroughEndpoint&&(this.fire("yt-navigate",{endpoint:this.data.clickthroughEndpoint}),this.data.onClickCommands&&this.data.onClickCommands.forEach(function(b){a.macroReplacementBehavior.sendServiceRequestAction([b])}),this.actionSenderBehavior.sendAction("yt-companion-ad-clicked",["image-companion", this.getLayoutId()]))}; e.onLoad=function(){this.actionSenderBehavior.sendOptionalAction("yt-refit-popups-action")}; g.Object.defineProperties(TY.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}}); g.Object.defineProperties(TY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zdb){var a=document.createElement("template");a.innerHTML="\n
\n \"\"\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ydb){var d=document.createElement("template");d.innerHTML=""; ydb=d}d=ydb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zdb=a}a=zdb;return a}}}); var UY=TY;UY.prototype.onLoad=UY.prototype.onLoad;UY.prototype.onTap=UY.prototype.onTap;UY.prototype.dataChanged=UY.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],UY.prototype,"rendererBehavior",void 0);w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],UY.prototype,"macroReplacementBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],UY.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],UY.prototype,"data",void 0); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],UY.prototype,"macros",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],UY.prototype,"interactionLoggingClientData",null);w([R(),x("design:type",String)],UY.prototype,"clickThroughUrl",void 0);w([R(),x("design:type",Vb)],UY.prototype,"imageSrc",void 0);w([R(),x("design:type",Number)],UY.prototype,"imageWidth",void 0);w([R(),x("design:type",Number)],UY.prototype,"imageHeight",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UY.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],UY.prototype,"onTap",null);w([S("load"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],UY.prototype,"onLoad",null);UY=w([V({is:"ytd-image-companion-renderer"})],UY);var Adb;var Bdb;var VY,WY=function(){return O.apply(this,arguments)||this}; p(WY,O);e=WY.prototype;e.dataChanged=function(){this.set("data.adBadge",VY.DEFAULT_AD_BADGE_RENDERER);if(this.data){var a=this.getOnLayoutVisibleCallback();a&&a()}}; e.getOnLayoutVisibleCallback=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.onLayoutVisibleCallback:null}; e.getLayoutId=function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.layoutId:null}; e.onCompanionClicked=function(a){this.data&&(a.target!==this.shopTitle&&this.sendTrackingPings(this.data.clickTrackingEndpoints),this.ytActionSenderBehavior.sendAction("yt-companion-ad-clicked",["shopping-companion",this.getLayoutId()]))}; e.onShopTextTap=function(){this.data&&this.fire("yt-navigate",{endpoint:this.data.clickToAdvSiteEndpoint})}; e.sendTrackingPings=function(a){a&&0!==a.length&&a[0].loggingUrls&&Yn(a[0].loggingUrls.map(this.getBaseUrl))}; e.getBaseUrl=function(a){return a.baseUrl||""}; g.Object.defineProperties(WY.prototype,{macros:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.macros||{}:{}}}, interactionLoggingClientData:{configurable:!0,enumerable:!0,get:function(){var a=Ka("yt.www.ads.eventcache.getLastCompanionData");return a?(a=a())&&a.interactionLoggingClientData:null}}}); g.Object.defineProperties(WY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bdb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n
\n
\n [[getSimpleString(data.shopText)]]\n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Adb){var d=document.createElement("template");d.innerHTML=""; Adb=d}d=Adb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bdb=a}a=Bdb;return a}}}); var XY=VY=WY;VY.prototype.onCompanionClicked=VY.prototype.onCompanionClicked;VY.prototype.dataChanged=VY.prototype.dataChanged;XY.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(W.YtActionSenderBehavior),x("design:type",Object)],XY.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],XY.prototype,"ytRendererBehavior",void 0); w([P(sV.YtMacroReplacementBehavior),x("design:type",Object)],XY.prototype,"macroReplacementBehavior",void 0);w([R(),x("design:type",Object)],XY.prototype,"data",void 0);w([CE("#title"),x("design:type",HTMLElement)],XY.prototype,"shopTitle",void 0);w([U("data.impressionEndpoints"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],XY.prototype,"dataChanged",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],XY.prototype,"macros",null); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],XY.prototype,"interactionLoggingClientData",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],XY.prototype,"onCompanionClicked",null);XY=VY=w([V({is:"ytd-shopping-companion-renderer"})],XY);var Cdb;var Ddb;var YY=function(){return O.apply(this,arguments)||this}; p(YY,O);YY.prototype.dataChanged=function(){this.companionSlotData=N("kevlar_disable_companions")?void 0:{hack:!0}}; g.Object.defineProperties(YY,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ddb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cdb){var d=document.createElement("template");d.innerHTML="";Cdb=d}d=Cdb;c.call(b, d.content.cloneNode(!0),a.content.firstChild);Ddb=a}a=Ddb;return a}}}); var ZY=YY;ZY.prototype.dataChanged=ZY.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],ZY.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],ZY.prototype,"data",void 0);w([R(),x("design:type",Object)],ZY.prototype,"companionSlotData",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],ZY.prototype,"dataChanged",null);ZY=w([V({is:"ytd-player-legacy-desktop-watch-ads-renderer"})],ZY);var Edb;var Fdb;var $Y=function(){var a=O.apply(this,arguments)||this;a.COMPACT_EVENT_COUNT=4;a.onShelfToggleButtonTap=function(){a.logTap(a.data);a.showingMore=!a.showingMore}; a.onShelfToggleButtonFocus=function(){a.showingMore||(a.logTap(a.data),a.showingMore=!0,Polymer.RenderStatus.afterNextRender(a,function(){a.$$("#event-"+(a.COMPACT_EVENT_COUNT-1)).focus()}))}; return a}; p($Y,O);e=$Y.prototype;e.attached=function(){this.shelfToggleButton.addEventListener("tap",this.onShelfToggleButtonTap);this.shelfToggleButton.addEventListener("focus",this.onShelfToggleButtonFocus);this.addInfoTooltipListeners()}; e.detached=function(){this.shelfToggleButton.removeEventListener("tap",this.onShelfToggleButtonTap);this.shelfToggleButton.removeEventListener("focus",this.onShelfToggleButtonFocus);this.removeInfoTooltipListeners()}; e.addInfoTooltipListeners=function(){this.infoTooltip.listen(this.infoContainer,"tap","show");this.infoTooltip.listen(this.infoContainer,"mouseenter","show");this.infoTooltip.listen(this.infoContainer,"focus","show");this.infoTooltip.listen(this.infoContainer,"mouseleave","hide");this.infoTooltip.listen(this.infoContainer,"blur","hide")}; e.removeInfoTooltipListeners=function(){this.infoTooltip.unlisten(this.infoContainer,"tap","show");this.infoTooltip.unlisten(this.infoContainer,"mouseenter","show");this.infoTooltip.unlisten(this.infoContainer,"focus","show");this.infoTooltip.unlisten(this.infoContainer,"mouseleave","hide");this.infoTooltip.unlisten(this.infoContainer,"blur","hide")}; e.dataChanged=function(){this.firstEvent=this.get("data.events.0.ticketEventRenderer");this.data&&this.data.events&&(this.canShowMore=this.data.events.length>this.COMPACT_EVENT_COUNT,this.$.separator.style.visibility=1
\n

[[firstEvent.title]]

\n\n \n \n \n \n \n
[[data.informationText]]
\n
\n
\n
\n
\n \n\n \n\n
\n
\n [[data.title]]\n
[[firstEvent.subtitle1]]
\n \n \n
\n \n [[firstEvent.buttonText]]\n \n \n
\n
\n\n
\n\n
\n
\n \n \n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Edb){var d=document.createElement("template");d.innerHTML=""; Edb=d}d=Edb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fdb=a}a=Fdb;return a}}}); var aZ=$Y;aZ.prototype.showingMoreChanged=aZ.prototype.showingMoreChanged;aZ.prototype.dataChanged=aZ.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],aZ.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],aZ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],aZ.prototype,"data",void 0);w([R(),x("design:type",Object)],aZ.prototype,"firstEvent",void 0); w([R(),x("design:type",Object)],aZ.prototype,"restEvents",void 0);w([R(),x("design:type",String)],aZ.prototype,"imageUrl",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],aZ.prototype,"showingMore",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],aZ.prototype,"canShowMore",void 0);w([R({reflectToAttribute:!0,value:N("kevlar_fixie_watch_layout")}),x("design:type",Boolean)],aZ.prototype,"fixie",void 0); w([R({value:N("kevlar_autofocus_menu_on_keyboard_nav")}),x("design:type",Boolean)],aZ.prototype,"focusOnFirstMenuItemOnKeyboardNav",void 0);w([R(),x("design:type",HTMLElement)],aZ.prototype,"popupPositionTarget",void 0);w([CE("#banner-info-tooltip"),x("design:type",Object)],aZ.prototype,"infoTooltip",void 0);w([CE("#info-container"),x("design:type",HTMLElement)],aZ.prototype,"infoContainer",void 0);w([CE("#shelf-toggler"),x("design:type",HTMLElement)],aZ.prototype,"shelfToggleButton",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],aZ.prototype,"dataChanged",null);w([U("showingMore"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],aZ.prototype,"showingMoreChanged",null);aZ=w([V({is:"ytd-ticket-shelf-renderer"})],aZ);var Gdb;var bZ=function(){return O.apply(this,arguments)||this}; p(bZ,O);bZ.prototype.dataChanged=function(){this.$$("#scriptTag")&&this.root.removeChild(this.$$("#scriptTag"));var a=document.createElement("script");a.setAttribute("type","application/ld+json");a.setAttribute("id","scriptTag");var b=JSON.stringify(this.getPlayerMicroformatData()).replace(/";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);Gdb=a}a=Gdb;return a}}}); var Hdb=bZ;w([R({observer:"dataChanged"}),x("design:type",Object)],Hdb.prototype,"data",void 0);Hdb=w([V({is:"ytd-player-microformat-renderer"})],Hdb);var Idb;var Jdb;Polymer({is:"yt-alert-renderer",_template:function(){if(void 0!==Jdb)return Jdb;var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Idb){var d=document.createElement("template");d.innerHTML=""; Idb=d}d=Idb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Jdb=a}, properties:{data:Object}});var Kdb=function(a,b){return a.SHARED_RENDERERS_.hasOwnProperty(b)?"yt":a.prefix},cZ={DIALOG:{component:"paper-dialog", properties:{withBackdrop:!0},preventAutonav:!0},FULLSCREEN_OVERLAY:{component:null,properties:{withBackdrop:!0}},DROPDOWN:{component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0},HINT:{component:"iron-dropdown",properties:{allowOutsideScroll:!0,dynamicAlign:!1,horizontalAlign:"center",noOverlap:!0,scrollAction:"refit",verticalAlign:"bottom",verticalOffset:15,withBackdrop:!1}, positionalProperties:{OPEN_POPUP_POSITION_TOPLEFT:{horizontalAlign:"right",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_TOPRIGHT:{horizontalAlign:"left",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"bottom",verticalOffset:15},OPEN_POPUP_POSITION_LEFT:{horizontalAlign:"right",horizontalOffset:12,verticalAlign:"middle",verticalOffset:0},OPEN_POPUP_POSITION_RIGHT:{horizontalAlign:"left",horizontalOffset:12,verticalAlign:"middle", verticalOffset:0},OPEN_POPUP_POSITION_BOTTOM:{horizontalAlign:"center",horizontalOffset:0,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMLEFT:{horizontalAlign:"right",horizontalOffset:12,shiftedHorizontalOffset:24,verticalAlign:"top",verticalOffset:12},OPEN_POPUP_POSITION_BOTTOMRIGHT:{horizontalAlign:"left",horizontalOffset:-12,shiftedHorizontalOffset:24,verticalAlign:"top",verticalOffset:12}},forceCloseOnOutsideClick:!0,forceFocus:!0,slotName:"dropdown-content"},LOCKED_OVERLAY_DIALOG:{component:"paper-dialog", properties:{restoreFocusOnClose:!0,scrollAction:"lock",withBackdrop:!0},preventAutonav:!0}};cZ.MEALBAR={component:"paper-dialog",properties:{keepBelowPlayer:!N("kevlar_mealbar_above_player"),noAutoFocus:!0,noCancelOnOutsideClick:!0,withBackdrop:!1},styles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",margin:"16px"},rtlStyles:{position:"fixed",top:"auto",right:"0",left:"auto",bottom:"0",margin:"16px"}};cZ.MODAL={component:"paper-dialog",properties:{modal:!0},forceFocus:!0,preventAutonav:!0}; cZ.MOLE={component:null,styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0",zIndex:"var(--ytd-z-index-miniplayer)"}}; cZ.NOTIFICATION={component:null,styles:{position:"fixed",top:"0",left:"auto",right:"0",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},rtlStyles:{position:"fixed",top:"0",left:"0",right:"auto",bottom:"auto",marginTop:"60px",zIndex:"var(--ytd-z-index-notification)"},preventAutonav:!0};cZ.OVERLAY_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!1,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0}; cZ.RESPONSIVE_DROPDOWN={component:"iron-dropdown",properties:{noOverlap:!0,horizontalAlign:"auto",verticalAlign:"top",dynamicAlign:!0,withBackdrop:!1},narrowProperties:{horizontalAlign:null,verticalAlign:null,dynamicAlign:!1,withBackdrop:!0},forceFocus:!0,slotName:"dropdown-content",preventAutonav:!0}; cZ.SURVEY={component:"paper-dialog",properties:{withBackdrop:!1,noCancelOnOutsideClick:!0,noAutoFocus:!0},styles:{position:"fixed",top:"auto",left:"auto",right:"0",bottom:"0"},rtlStyles:{position:"fixed",top:"auto",left:"0",right:"auto",bottom:"0"},preventAutonav:N("web_survey_popup_prevent_autonav")};cZ.TOP_ALIGNED_DIALOG={component:"paper-dialog",properties:{withBackdrop:!0,verticalAlign:"top",horizontalAlign:"center"},styles:{margin:"8px 0 0 0"},targetContainer:!0};cZ.TOAST={component:null,properties:{}};var Ldb=new function(a,b,c){this.supportedPopups=a;this.navigationEndpointPopupMap=b;this.popupTypeMap=c}({aboutThisAdRenderer:!0, adFeedbackRenderer:!0,adInfoDialogRenderer:!0,addToPlaylistRenderer:!0,backstagePostDialogPopupRenderer:!0,bubbleHintRenderer:!0,channelCreationDialogRenderer:!0,channelWarmWelcomeRenderer:!0,channelWarmWelcomeContRenderer:!0,checkboxSurveyRenderer:!0,confirmDialogRenderer:!0,dismissalFollowUpRenderer:!0,fancyDismissibleDialogRenderer:!0,formPopupRenderer:!0,gamingAccountLinkConfirmDialogRenderer:!0,gamingAccountLinkSettingRenderer:!0,gamingMultipleAccountLinkDialogRenderer:!0,hotkeyDialogRenderer:!0, sponsorshipConfirmCancelRenderer:!0,modalWithTitleAndButtonRenderer:!0,notificationActionRenderer:!0,reportFormModalRenderer:!0,searchSuggestionReportDialog:!0,sharingRenderer:!0,sharingEmbedRenderer:!0,menuPopupRenderer:!0,queueToPlayDialogRenderer:!0,singleOptionSurveyRenderer:!0,surveyFollowUpRenderer:!0,unifiedSharePanelRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,ypcUpgradeDialogRenderer:!0,ypcOffersOverlayRenderer:!0, redCancelSurveyRenderer:!0,conversationSectionController:!0,conversationHighPriorityNotificationContentRenderer:!0},{adFeedbackEndpoint:"adFeedbackEndpoint.content",adInfoDialogEndpoint:"adInfoDialogEndpoint.dialog",createBackstagePostDialogEndpoint:"createBackstagePostDialogEndpoint.dialog",confirmDialogEndpoint:"confirmDialogEndpoint.content",managePurchaseEndpoint:"managePurchaseEndpoint.content",modalEndpoint:"modalEndpoint.modal",shareEndpoint:"shareEndpoint",shareEntityEndpoint:"shareEntityEndpoint", unlimitedFamilyFlowEndpoint:"unlimitedFamilyFlowEndpoint.unlimitedFamilyFlowEndpointSupportedRenderers",openPopupAction:"openPopupAction.popup",ypcCancelSurveyEndpoint:"ypcCancelSurveyEndpoint.surveySupportedRenderers"},{aboutThisAdRenderer:"DIALOG",adFeedbackRenderer:"DIALOG",adInfoDialogRenderer:"RESPONSIVE_DROPDOWN",addToPlaylistRenderer:N("desktop_add_to_playlist_renderer_dialog_popup")?"DIALOG":"RESPONSIVE_DROPDOWN",backstagePostDialogPopupRenderer:"DIALOG",bubbleHintRenderer:"HINT",checkboxSurveyRenderer:"SURVEY", confirmDialogRenderer:"DIALOG",dismissalFollowUpRenderer:"DIALOG",fancyDismissibleDialogRenderer:"DIALOG",gamingAccountLinkConfirmDialogRenderer:"DIALOG",gamingAccountLinkSettingRenderer:"DIALOG",gamingMultipleAccountLinkDialogRenderer:"DIALOG",queueToPlayDialogRenderer:"DIALOG",hotkeyDialogRenderer:"DIALOG",sponsorshipConfirmCancelRenderer:"DIALOG",menuPopupRenderer:"RESPONSIVE_DROPDOWN",modalWithTitleAndButtonRenderer:"RESPONSIVE_DROPDOWN",notificationActionRenderer:"TOAST",reportFormModalRenderer:"DIALOG", searchSuggestionReportDialog:"DIALOG",sharingEmbedRenderer:"DIALOG",sharingRenderer:"RESPONSIVE_DROPDOWN",singleOptionSurveyRenderer:"SURVEY",surveyFollowUpRenderer:"SURVEY",unifiedSharePanelRenderer:"DIALOG",unlimitedFamilyMessageInterstitialRenderer:"DIALOG",unlimitedFamilyProfileInterstitialRenderer:"DIALOG",unpluggedPauseMembershipDialogRenderer:"DIALOG",ypcOffersOverlayRenderer:"DIALOG",ypcUpgradeDialogRenderer:"DIALOG",redCancelSurveyRenderer:"DIALOG",conversationSectionController:"MOLE",conversationHighPriorityNotificationContentRenderer:"NOTIFICATION"}), Mdb=new function(){this.popupConfig=cZ;this.forwardedEvents="yt-action yt-navigate yt-popup-canceled yt-popup-closed yt-popup-opened yt-service-request-completed yt-service-request-error yt-service-request-sent yt-lockup-requested".split(" ");this.prefix="ytd";this.SHARED_RENDERERS_={aboutThisAdRenderer:!0,bubbleHintRenderer:!0,confirmDialogRenderer:!0,fancyDismissibleDialogRenderer:!0,notificationActionRenderer:!0,reportDetailsFormRenderer:!0,reportFormModalRenderer:!0,sharingEmbedRenderer:!0,sharingRenderer:!0, sortFilterSubMenuPopupRenderer:!0,tooltipRenderer:!0,unlimitedFamilyMessageInterstitialRenderer:!0,unlimitedFamilyProfileInterstitialRenderer:!0,unpluggedPauseMembershipDialogRenderer:!0,upsellDialogRenderer:!0,ypcOffersModalRenderer:!0,ypcUpgradeDialogRenderer:!0,loadingRenderer:!0}};var dZ=[5,10,15,20,30,40],Ndb=function(){this.sessionType="NEW";this.currentPartitionIndex=0},Odb=function(a,b,c){a=Object.assign({survival_status:a, partition_min:b,session_type:c},eo());dZ.includes(b)||delete a.partition_min;return a},Pdb=function(a){return 0<=a.currentPartitionIndex&&a.currentPartitionIndexc&&(c=0);a.intervalId=Fk.addJob(function(){Qdb(a);Rdb(a);Sdb(a)},3,6E4*(b-c)); a.currentPartitionIndex+=1}}; Ndb.prototype.shutdown=function(){if(void 0!==this.intervalId){Fk.cancelJob(this.intervalId);this.intervalId=void 0;--this.currentPartitionIndex;var a=Pdb(this);0d?0:1E3*b<=d&&1E3*c>d?1:2}else b=3;a.yoodleVisibilityChangedCallback(1===b);deb(a,b)},deb=function(a,b){if(2!==b&&3!==b){var c=new Date().getTime(); b=0===b?1E3*ik("yoodle_start_time_utc")-c:1E3*ik("yoodle_end_time_utc")-c;b+=Math.floor(300*Math.random());a.currentJobId&&Fk.cancelJob(a.currentJobId);a.currentJobId=Ck(Fk,function(){beb(a)},b)}};Polymer({is:"yt-guide-manager",provides:vQ,behaviors:[Polymer.IronResizableBehavior,xO.YtActionHandlerBehavior,kO.YtComponentBehavior,CQ],properties:{data:Object,disabled:Boolean,guidePersistentAndVisible:{type:Boolean,notify:!0,observer:"guidePersistentAndVisibleChanged_"},miniGuideVisible:{type:Boolean,value:!1,notify:!0,observer:"miniGuideVisibleChanged_"},forceMiniGuideClose_:Boolean,activeEndpoint:{type:Object,notify:!0,observer:"activeEndpointChanged_"},renderGuide:{type:Boolean,notify:!0}, guideOpened_:{type:Boolean,observer:"guideOpenedChanged_"},guidePersistent_:{type:Boolean,notify:!0},guideUserStateOpened_:{type:Boolean,value:!0},pageUrl_:{type:String,observer:"pageUrlChanged_"},pageType_:String,cachedClientWidth_:{type:Number,observer:"cachedClientWidthChanged_"},guideElement:{type:Object,observer:"onGuideElementChanged_"}},observers:["computeGuidePersistentAndVisible_(guideOpened_, guidePersistent_)","observeForMiniGuideVisible_(guidePersistentAndVisible, pageUrl_, cachedClientWidth_)"], listeners:{"iron-resize":"onResize_"},actionMap:{"player-update-pre":"prePlayerUpdate_"},factoryImpl:function(){}, created:function(){this.persistentGuideWidthThreshold=ik("kevlar_persistent_guide_width_threshold",1312);this.miniGuideWidthThreshold=ik("kevlar_mini_guide_width_threshold",791);this.persistentGuideBlockedPages_="/clip /musicpremium /new /premium /red /watch".split(" ");this.animationTransitionDuration_=0;this.lateDataResolver_=Ui();this.serviceEndpoint_={signalServiceEndpoint:{signal:"LOAD_GUIDE"},commandMetadata:{webCommandMetadata:{apiUrl:"/youtubei/v1/guide"}}};this.initialGuideDataFetchFailed_= !1}, attached:function(){var a=this;this.cachedClientWidth_=A("initialBodyClientWidth",void 0)||document.body.clientWidth;this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");this.listen(document,"yt-guide-toggle","onYtGuideToggle_");this.listen(document,"yt-guide-close","onYtGuideClose_");Polymer.RenderStatus.afterNextRender(this,function(){a.animationTransitionDuration_=200})}, detached:function(){this.unlisten(document,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(document,"yt-guide-toggle","onYtGuideToggle_");this.unlisten(document,"yt-guide-close","onYtGuideClose_");this.guideElement&&(this.unlisten(this.guideElement,"opened-changed","onDrawerOpenedChanged_"),this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitioned_"),this.unlisten(this.guideElement,"app-drawer-transitioned","onAppDrawerTransitionedFromKeyInput_"))}, load:function(){return Za(this,function b(){var c=this,d,f,h,l;return za(b,function(m){switch(m.nextAddress){case 1:if(!window.ytInitialGuideData&&window.ytInitialGuideDataPresent)return window.loadGuideDataHook=c.lateDataResolver_.resolve.bind(c),m.return(c.lateDataResolver_.promise);if(window.ytInitialGuideData)return d=Ui(),d.resolve(window.ytInitialGuideData),m.return(d.promise);h=!1;ta(m,2);return q(m,c.fetchGuideData(),4);case 4:f=m.yieldResult;ua(m,3);break;case 2:l=va(m),"Returned error"=== l.message&&(h=!0);case 3:if(f)return m.return(f);c.onYtGuideClose_();h||(c.initialGuideDataFetchFailed_=!0);return m.return(c.lateDataResolver_.promise);}})})}, fetchGuideData:function(){var a;return Za(this,function c(){var d=this,f,h;return za(c,function(l){if(1==l.nextAddress)return q(l,d.sendServiceRequestAction([d.serviceEndpoint_]),2);f=l.yieldResult;h=jQ.instance;N("kevlar_guide_store")&&h&&(null===f||void 0===f?0:f.data)&&0!==(null===(a=f.data.responseContext)||void 0===a?void 0:a.maxAgeSeconds)&&h.put("service:guide:fallback",new hQ({innertubeResponse:f.data}));return l.return(f.data)})})}, initializeGuideDataIfEmpty:function(){return Za(this,function b(){var c=this,d,f;return za(b,function(h){if(1==h.nextAddress){if(!c.initialGuideDataFetchFailed_||c.data)return h.return();ta(h,2);return q(h,c.fetchGuideData(),4)}if(2!=h.nextAddress)return(d=h.yieldResult)&&c.lateDataResolver_.resolve(d),ua(h,0);f=va(h);Am(f);ra(h)})})}, initializeGuideData_:function(){return Za(this,function b(){var c,d=this,f;return za(b,function(h){switch(h.nextAddress){case 1:return N("kevlar_enable_slis")&&(c=new qka,c.recordStart(eo())),ta(h,2),q(h,d.load(),4);case 4:d.data=h.yieldResult;ua(h,3);break;case 2:va(h),c&&c.recordEnd("FAILURE");case 3:c&&(f=d.data&&d.data.items&&0this.persistentGuideWidthThreshold}, canFitMiniGuide_:function(a){return-1===this.miniGuideWidthThreshold?!1:a>this.miniGuideWidthThreshold}, onResize_:function(){var a=this;this.debounce("calculateGuideState",function(){return a.onResizeDebounced_()})}, onResizeDebounced_:function(){this.cachedClientWidth_=document.body.clientWidth}, disableGuideAnimation_:function(){this.guideElement.transitionDuration=0}, enableGuideAnimation_:function(){this.guideElement.transitionDuration=this.animationTransitionDuration_}});var eeb;function iZ(a,b){if(N("handle_service_request_actions"))tL(b,a,b);else{a=k(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.commandExecutorCommand&&c.commandExecutorCommand.commands?iZ(c.commandExecutorCommand.commands,b):c.signalServiceEndpoint&&c.signalServiceEndpoint.actions?iZ(c.signalServiceEndpoint.actions,b):c.commandMetadata&&c.commandMetadata.webCommandMetadata&&c.commandMetadata.webCommandMetadata.sendPost?uL(b,[c]):tL(b,[c],b)}} var jZ=function(){var a=O.apply(this,arguments)||this;a.lastCallback=null;a.getAccountLinkPromises={};a.gpgCommand=null;a.actionMap={"yt-service-request":"handleServiceRequest","yt-initialize-third-party":"handleInitializeRequest","yt-link-third-party":"handleLinkRequest","yt-account-link-command":"handleAccountLinkCommand","yt-account-unlink-command":"handleAccountUnlinkCommand","yt-signal-service-endpoint":"handleSignalServiceEndpoint","yt-create-gpg-profile-command":"handleCreateGPGProfileCommand"}; return a}; p(jZ,O);e=jZ.prototype;e.created=function(){var a=new nz(A("LINK_GAL_DOMAIN",void 0),A("LINK_GAL_DOMAIN",void 0)).withApiKey(A("LINK_API_KEY",void 0)).withAuthUser(A("SESSION_INDEX",void 0)||0);a.supportedFlows=new Set([4]);this.galConfig=a.build()}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.handleServiceRequest=function(a,b){b&&((a=this.get("signalServiceEndpoint.actions.0.openPopupAction.popup",b))&&a.gamingAccountLinkSettingRenderer&&(a=a.gamingAccountLinkSettingRenderer.thirdPartyId)&&this.handleInitializeRequest(a),b.accountLinkCommand?this.handleLinkRequest(b.accountLinkCommand):b.accountUnlinkCommand&&this.handleUnlinkRequest(b.accountUnlinkCommand))}; e.handleSignalServiceEndpoint=function(a,b){var c=this,d=this.get("signalServiceEndpoint.actions.0",a);a=["ytd-gaming-account-link-confirm-dialog-renderer","ytd-gaming-account-link-setting-renderer"].find(function(f){return b.className.includes(f)}); d&&a&&(this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[a,this]),Polymer.RenderStatus.afterNextRender(this,function(){c.ytActionSenderBehavior.sendAction("yt-open-popup-action",[d,c])}))}; e.handleInitializeRequest=function(a){var b=Awa(this.galConfig);this.getAccountLinkPromises[a]=b.startLinkingSession({serviceId:a})}; e.handleAccountLinkCommand=function(a){a.accountLinkCommand&&this.handleLinkRequest(a.accountLinkCommand)}; e.handleLinkRequest=function(a){var b=this,c=a.thirdPartyId;if(c){this.logLinkStarted(c);var d=function(){b.logLinkFailed(c);b.closeAndFire("ytd-gaming-account-link-setting-renderer",a.onFailureCommand)},f=function(){b.logLinkSucceeded(c); b.closeAndFire("ytd-gaming-account-link-setting-renderer",a.onSuccessCommand)}; this.lastCallback=f;this.getAccountLinkPromises[c].then(function(h){ewa(h).then(function(l){1===l.statusCode?f():d()})}).catch(function(){d()})}}; e.closeAndFire=function(a,b){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",[a]);b&&iZ([b],this)}; e.handleAccountUnlinkCommand=function(a){a.accountUnlinkCommand&&this.handleUnlinkRequest(a.accountUnlinkCommand)}; e.handleUnlinkRequest=function(a){var b=this,c=a.thirdPartyId;if(c){this.logUnlinkStarted(c);var d=function(){b.logUnlinkFailed(c);b.closeAndFire("ytd-gaming-account-link-confirm-dialog-renderer",a.onFailureCommand)},f=function(){b.logUnlinkSucceeded(c); b.closeAndFire("ytd-gaming-account-link-confirm-dialog-renderer",a.onSuccessCommand)}; this.lastCallback=f;var h=Awa(this.galConfig);this.unlinkUserGal(h,c).then(function(l){1===l.statusCode?f():d()}).catch(function(){d()})}}; e.unlinkUserGal=function(a,b){return a.deleteLink(b)}; e.onServiceRequestCompleted=function(a,b){this.handleServiceRequestActions(b)}; e.handleServiceRequestActions=function(a){if(a=a.actions)for(var b=0;b";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);eeb=a}a=eeb;return a}}}); var kZ=jZ;kZ.prototype.onServiceRequestCompleted=kZ.prototype.onServiceRequestCompleted;w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],kZ.prototype,"ytOpenPopupBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],kZ.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],kZ.prototype,"ytActionSenderBehavior",void 0); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],kZ.prototype,"onServiceRequestCompleted",null);kZ=w([V({is:"ytd-third-party-manager"})],kZ);var feb;var geb;var lZ=function(){var a=O.apply(this,arguments)||this;a.responsivePlaylist=N("kevlar_playlist_responsive");a.attachedPlayers_=N("kevlar_channel_trailer_multi_attach")?[]:void 0;a.player_=null;a.actionMap={"yt-alert-command":"handleAlertCommand_","yt-playlist-deletion-redirect-command":"handleYtPlaylistDeletionRedirect_"};return a}; p(lZ,O);e=lZ.prototype; e.configureRendererStamper=function(){return{mastheadAdData:{id:"masthead-ad",mapping:{bannerPromoRenderer:{component:"ytd-banner-promo-renderer",noInjection:!0},videoMastheadAdV3Renderer:{component:"ytd-video-masthead-ad-v3-renderer",noInjection:!0}},reuseComponents:!1},alertBannerData_:{id:"alert-banner",mapping:{alertWithActionsRenderer:{component:"yt-alert-with-actions-renderer",noInjection:!0}}},"data.alerts":{id:"alerts",mapping:{alertRenderer:{component:"yt-alert-renderer",noInjection:!0}, unlimitedUserNotificationRenderer:{component:"yt-unlimited-user-notification-renderer",noInjection:!0},alertWithButtonRenderer:{component:"ytd-alert-with-button-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.survey":{id:"survey",mapping:{surveyTriggerRenderer:{component:"ytd-survey-trigger-renderer",noInjection:!0}},initialRenderPriority:3,waitForSignal:"eocs"},"data.metadata":{id:"metadata",mapping:{channelMetadataRenderer:{component:"ytd-channel-metadata-renderer", noInjection:!0}}},"data.header":{id:"header",mapping:{c4TabbedHeaderRenderer:{component:"ytd-c4-tabbed-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},interactiveTabbedHeaderRenderer:{component:"ytd-interactive-tabbed-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},carouselHeaderRenderer:{component:"ytd-carousel-header-renderer",properties:{active:"[[active]]", disableGridStateAware:"[[richGrid_]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0},hashtagHeaderRenderer:{component:"ytd-hashtag-header-renderer",properties:{active:"[[active]]",tabs:"[[data.contents.twoColumnBrowseResultsRenderer.tabs]]"},noInjection:!0}}},"data.footer":{id:"footer",mapping:{pageFooterRenderer:{component:"ytd-page-footer-renderer",noInjection:!0}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.created=function(){this.ytRendererBehavior.monitorScroll=!0;this.pageDisposeJobs=[this.disposeMastheadAd_.bind(this)]}; e.activeChanged_=function(){var a=this.ytPageBehavior.active,b=this.$.header;b&&b.firstChild&&(b.firstChild.active=a)}; e.tabsChanged_=function(){var a,b,c,d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.contents)||void 0===b?void 0:b.twoColumnBrowseResultsRenderer)||void 0===c?void 0:c.tabs,f=this.$.header;f&&f.firstChild&&(f.firstChild.tabs=d)}; e.loadPage_=function(a){this.initCsi_();a&&(this.data=a);this.updateTitle_(this.data);this.updateAdditionalFont_(this.data);this.setMastheadAd_(this.data)}; e.getTitle_=function(a){return"home"==this.pageSubtype?"":this.get("microformat.microformatDataRenderer.title",a)?this.get("microformat.microformatDataRenderer.title",a):this.get("header.c4TabbedHeaderRenderer.title",a)?this.get("header.c4TabbedHeaderRenderer.title",a):this.get("header.feedTabbedHeaderRenderer.title",a)?nL(this.get("header.feedTabbedHeaderRenderer.title",a)):this.get("header.interactiveTabbedHeaderRenderer.title",a)?this.get("header.interactiveTabbedHeaderRenderer.title",a):this.get("header.hashtagHeaderRenderer.hashtag", a)?nL(this.get("header.hashtagHeaderRenderer.hashtag",a)):""}; e.updateTitle_=function(a){this.fire("yt-update-title",this.getTitle_(a))}; e.updateAdditionalFont_=function(a){var b=new pVa;a=this.get("responseContext.webResponseContextExtensionData.webFontData.fontFamilies",a);var c=document.head.querySelectorAll("link[name=www-webfont]");c[0]&&sg(c[0]);a&&0a||this.attachedPlayers_.splice(a,1)):this.player_=null}; e.getServiceTrackingParams=function(){var a,b;return(null===(b=null===(a=this.data)||void 0===a?void 0:a.responseContext)||void 0===b?void 0:b.serviceTrackingParams)||[]}; e.setMastheadAd_=function(a){a&&a.mastheadAd&&(this.mastheadAdData=void 0);this.mastheadAdData=a&&a.mastheadAd}; e.dataChanged=function(){var a=this,b=this.data;b.onResponseReceivedActions&&b.onResponseReceivedActions.length&&this.ytActionSenderBehavior.sendInnerTubeActions(b.onResponseReceivedActions,this);var c=this.get("onResponseReceivedEndpoints",b);if(c){for(var d=0;d
\n
\n
\n
\n\n\n\n\n\n\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===feb){var d=document.createElement("template");d.innerHTML=""; feb=d}d=feb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);geb=a}a=geb;return a}}}); var mZ=lZ;mZ.prototype.dataChanged=mZ.prototype.dataChanged;mZ.prototype.onPlayerDetached_=mZ.prototype.onPlayerDetached_;mZ.prototype.onPlayerAttached_=mZ.prototype.onPlayerAttached_;mZ.prototype.tabsChanged_=mZ.prototype.tabsChanged_;mZ.prototype.activeChanged_=mZ.prototype.activeChanged_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],mZ.prototype,"ytActionHandlerBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],mZ.prototype,"ytdOpenPopupBehavior",void 0); w([P(Z),x("design:type",Object)],mZ.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],mZ.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],mZ.prototype,"ytRendererBehavior",void 0);w([P(z2a),x("design:type",Object)],mZ.prototype,"ytPageBehavior",void 0);w([P(xQ),x("design:type",Object)],mZ.prototype,"ytdGuideStateAwareBehavior",void 0);w([R(),x("design:type",Object)],mZ.prototype,"data",void 0); w([R(),x("design:type",Object)],mZ.prototype,"mastheadAdData",void 0);w([R({readOnly:!0,computed:"computeAlertBannerData_(data.alerts.*)"}),x("design:type",Object)],mZ.prototype,"alertBannerData_",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],mZ.prototype,"pageSubtype",void 0);w([R({computed:"computeHasSidebar_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],mZ.prototype,"hasSidebar_",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],mZ.prototype,"responsivePlaylist",void 0);w([R({computed:"computeRichGridValue_(data)"}),x("design:type",Boolean)],mZ.prototype,"richGrid_",void 0);w([U("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mZ.prototype,"activeChanged_",null); w([U("data.contents.twoColumnBrowseResultsRenderer.tabs"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mZ.prototype,"tabsChanged_",null);w([S("yt-player-attached"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],mZ.prototype,"onPlayerAttached_",null); w([S("yt-player-detached"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],mZ.prototype,"onPlayerDetached_",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],mZ.prototype,"dataChanged",null);mZ=w([V({is:"ytd-browse"})],mZ);var heb=function(){return O.apply(this,arguments)||this}; p(heb,O);var ieb=heb;ieb=w([V({is:"ytd-browse-items"})],ieb);var jeb;var keb;var nZ=function(){return O.apply(this,arguments)||this}; p(nZ,O);nZ.prototype.onTap=function(a){a.preventDefault();this.data&&(a=!this.data.checked,this.set("data.checked",a),this.fire("ytd-checkbox-survey-option-changed",{checked:a,value:this.data.value}))}; g.Object.defineProperties(nZ.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.responseText?this.ytRendererBehavior.getSimpleString(this.data.responseText):""}}}); g.Object.defineProperties(nZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===keb){var a=document.createElement("template");a.innerHTML="\n [[label]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jeb){var d=document.createElement("template");d.innerHTML=""; jeb=d}d=jeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);keb=a}a=keb;return a}}}); var oZ=nZ;w([P(X.YtRendererBehavior),x("design:type",Object)],oZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],oZ.prototype,"data",void 0);w([BE("data.responseText"),x("design:type",String),x("design:paramtypes",[])],oZ.prototype,"label",null);oZ=w([V({is:"ytd-checkbox-survey-option-renderer"})],oZ);var leb;var meb;var pZ=function(){var a=O.apply(this,arguments)||this;a.followUpSurveyCommand=null;a.selectedRatingEndpoint=null;a.actionMap={"ytd-inline-survey-rating-select-action":"handleInlineSurveyRatingSelect"};return a}; p(pZ,O);e=pZ.prototype; e.configureRendererStamper=function(){return{"data.inlineContent":{id:"inline-survey-compact-video-renderer",mapping:{compactVideoRenderer:{component:"ytd-compact-video-renderer"}}},"data.response.expandableSurveyResponseRenderer.options":{id:"rating-survey",mapping:{ratingSurveyRenderer:{component:"ytd-rating-survey-renderer"}}},"followUpSurveyCommand.followUpOptions":{id:"follow-up-survey-options",mapping:{checkboxSurveyOptionRenderer:{component:"ytd-checkbox-survey-option-renderer"}}},dismissedRenderer:{id:"dismissed", mapping:{messageRenderer:"ytd-message-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.selectedRatingEndpoint=this.followUpSurveyCommand=null;this.expanded=!1}; e.handleRequestCompletion=function(){this.hidden&&this.fire("yt-dismissable-item-dismissed")}; e.handleInlineSurveyRatingSelect=function(a,b){var c=this;this.selectedRatingEndpoint=a;this.followUpSurveyCommand=b;this.expanded=!!a;this.getOptionRenderers().forEach(function(d,f){c.notifyPath("followUpSurveyCommand.followUpOptions."+f+".checkboxSurveyOptionRenderer.checked");c.set("followUpSurveyCommand.followUpOptions."+f+".checkboxSurveyOptionRenderer.checked",!1)})}; e.onDismissTap=function(){this.hidden=!0;this.actionSenderBehavior.sendServiceRequestAction([this.get("data.dismissalEndpoint")])}; e.onSubmitTap=function(){this.selectedRatingEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.selectedRatingEndpoint]),this.followUpSurveyCommand&&this.submitFollowUpResponses())}; e.submitFollowUpResponses=function(){var a=this.getOptionRenderers().filter(function(c){return c.checked}); if(a.length){a=a.map(function(c){return c.responseEndpoint}); var b=[];a.forEach(function(c,d){0!==d&&c&&c.feedbackEndpoint&&c.feedbackEndpoint.feedbackToken&&b.push(c.feedbackEndpoint.feedbackToken)}); a=[a[0]];b.length&&a.push({extra_feedback_tokens:b});this.actionSenderBehavior.sendServiceRequestAction(a)}}; e.getOptionRenderers=function(){return this.followUpSurveyCommand&&this.followUpSurveyCommand.followUpOptions?this.get("followUpSurveyCommand.followUpOptions").map(function(a){return a.checkboxSurveyOptionRenderer}):[]}; g.Object.defineProperties(pZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===meb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n

\n [[getSimpleString(data.title)]]\n [[getSimpleString(data.subtitle)]]\n

\n \n
\n
\n
\n
\n \n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===leb){var d=document.createElement("template");d.innerHTML=""; leb=d}d=leb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);meb=a}a=meb;return a}}}); var qZ=pZ;qZ.prototype.handleRequestCompletion=qZ.prototype.handleRequestCompletion;qZ.prototype.dataChanged=qZ.prototype.dataChanged;w([P(Z),x("design:type",Object)],qZ.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],qZ.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],qZ.prototype,"actionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],qZ.prototype,"ytRendererBehavior",void 0);w([P(cQ),x("design:type",Object)],qZ.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],qZ.prototype,"data",void 0);w([R(),x("design:type",Object)],qZ.prototype,"followUpSurveyCommand",void 0);w([R(),x("design:type",Object)],qZ.prototype,"selectedRatingEndpoint",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],qZ.prototype,"expanded",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],qZ.prototype,"dataChanged",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],qZ.prototype,"handleRequestCompletion",null);qZ=w([V({is:"ytd-inline-survey-renderer"})],qZ);var neb;var oeb;var rZ=function(){return O.apply(this,arguments)||this}; p(rZ,O);rZ.prototype.onTap=function(a){a.preventDefault();this.data&&this.fire("ytd-rating-survey-option-changed",this.data)}; g.Object.defineProperties(rZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===oeb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===neb){var d=document.createElement("template");d.innerHTML=""; neb=d}d=neb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);oeb=a}a=oeb;return a}}}); var sZ=rZ;w([P(X.YtRendererBehavior),x("design:type",Object)],sZ.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],sZ.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],sZ.prototype,"data",void 0);sZ=w([V({is:"ytd-rating-survey-option-renderer"})],sZ);var peb;var qeb;var tZ=function(){var a=O.apply(this,arguments)||this;a.selectedOptionText=null;a.selectedNonStarOption=null;a.notSureSelected=!1;a.hideOptions=!1;return a}; p(tZ,O);e=tZ.prototype;e.configureRendererStamper=function(){return{"data.ratings":{id:"ratings",mapping:{ratingSurveyOptionRenderer:"ytd-rating-survey-option-renderer"}}}}; e.dataChanged=function(){this.resetComponent()}; e.onOptionChange=function(a,b){var c=this;if(b.onStateIcon&&b.defaultStateIcon&&b.onStateIcon.iconType===b.defaultStateIcon.iconType)this.selectedNonStarOption=b,this.selectedOptionText=b.responseText,this.hideOptions=!0;else{var d=this.ytRendererBehavior.getSimpleString(b.responseText),f=!0;this.set("notSureSelected",!1);this.getOptionRenderers().forEach(function(l,m){c.setSurveyOptionValue(m,f,"checked");c.setSurveyOptionValue(m,!1,"selected");c.ytRendererBehavior.getSimpleString(l.responseText)=== d&&(f=!1,c.setSurveyOptionValue(m,!0,"selected"),c.selectedOptionText=l.responseText)})}a=b.responseEndpoint; if(b.followUpCommand)var h=b.followUpCommand.addFollowUpSurveyCommand;this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,h])}; e.getOptionRenderers=function(){return this.data&&this.data.ratings?this.data.ratings.map(function(a){return a.ratingSurveyOptionRenderer}):[]}; e.onNotSureClick=function(){this.hideOptions=this.notSureSelected=!0;this.selectedNonStarOption=null;this.selectedOptionText=this.get("data.notSureButton.buttonRenderer.text");var a=this.get("data.notSureEndpoint"),b=this.get("data.notSureButton.buttonRenderer.command.addFollowUpSurveyCommand");this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[a,b])}; e.onUndoClick=function(){this.resetComponent();this.actionSenderBehavior.sendAction("ytd-inline-survey-rating-select-action",[null,null])}; e.setSurveyOptionValue=function(a,b,c){this.notifyPath("data.ratings."+a+".ratingSurveyOptionRenderer."+c);this.set("data.ratings."+a+".ratingSurveyOptionRenderer."+c,b)}; e.resetComponent=function(){var a=this;this.selectedNonStarOption=this.selectedOptionText=null;this.hideOptions=this.notSureSelected=!1;this.getOptionRenderers().forEach(function(b,c){a.setSurveyOptionValue(c,!1,"checked");a.setSurveyOptionValue(c,!1,"selected")})}; g.Object.defineProperties(tZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qeb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===peb){var d=document.createElement("template");d.innerHTML=""; peb=d}d=peb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qeb=a}a=qeb;return a}}}); var uZ=tZ;uZ.prototype.onOptionChange=uZ.prototype.onOptionChange;uZ.prototype.dataChanged=uZ.prototype.dataChanged;w([P(Z),x("design:type",Object)],uZ.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],uZ.prototype,"actionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],uZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],uZ.prototype,"data",void 0); w([R(),x("design:type",Object)],uZ.prototype,"selectedOptionText",void 0);w([R(),x("design:type",Object)],uZ.prototype,"selectedNonStarOption",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],uZ.prototype,"notSureSelected",void 0);w([R(),x("design:type",Object)],uZ.prototype,"hideOptions",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],uZ.prototype,"dataChanged",null); w([S("ytd-rating-survey-option-changed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],uZ.prototype,"onOptionChange",null);uZ=w([V({is:"ytd-rating-survey-renderer"})],uZ);var reb;var seb;var vZ=function(){var a=O.apply(this,arguments)||this;a.componentStyle="NON_CENTERED_PROFILE";return a}; p(vZ,O);vZ.prototype.configureRendererStamper=function(){return{"data.reportStats":{id:"report-stats",mapping:{profileColumnRenderer:{component:"ytd-profile-column-renderer",properties:{componentStyle:"[[componentStyle]]"}}}}}}; vZ.prototype.getIcon=function(a){return a?"settings:"+a.toLowerCase():null}; g.Object.defineProperties(vZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===seb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[getSimpleString(data.pageTitle)]]
\n
[[getSimpleString(data.headerText)]]
\n \n \n \n \n \n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===reb){var d=document.createElement("template");d.innerHTML=""; reb=d}d=reb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);seb=a}a=seb;return a}}}); var wZ=vZ;w([P(X.YtRendererBehavior),x("design:type",Object)],wZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],wZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],wZ.prototype,"data",void 0);wZ=w([V({is:"ytd-page-introduction-renderer"})],wZ);var teb;var ueb;var xZ=function(){return O.apply(this,arguments)||this}; p(xZ,O);xZ.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsRenderer:{component:"ytd-profile-column-stats-renderer",noInjection:!0},profileColumnUserInfoRenderer:{component:"ytd-profile-column-user-info-renderer",noInjection:!0,properties:{componentStyle:"[[componentStyle]]"}}}}}}; g.Object.defineProperties(xZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ueb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===teb){var d=document.createElement("template");d.innerHTML=""; teb=d}d=teb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ueb=a}a=ueb;return a}}}); var yZ=xZ;w([P(X.YtRendererBehavior),x("design:type",Object)],yZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],yZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],yZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],yZ.prototype,"componentStyle",void 0);yZ=w([V({is:"ytd-profile-column-renderer"})],yZ);var veb;var web;var xeb=function(){return O.apply(this,arguments)||this}; p(xeb,O); g.Object.defineProperties(xeb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===web){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.label)]]
\n
[[getSimpleString(data.value)]]
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===veb){var d=document.createElement("template");d.innerHTML=""; veb=d}d=veb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);web=a}a=web;return a}}}); var zZ=xeb;w([P(X.YtRendererBehavior),x("design:type",Object)],zZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],zZ.prototype,"data",void 0);zZ=w([V({is:"ytd-profile-column-stats-entry-renderer"})],zZ);var yeb;var zeb;var AZ=function(){return O.apply(this,arguments)||this}; p(AZ,O);AZ.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{profileColumnStatsEntryRenderer:{component:"ytd-profile-column-stats-entry-renderer",noInjection:!0}}}}}; g.Object.defineProperties(AZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zeb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yeb){var d=document.createElement("template");d.innerHTML=""; yeb=d}d=yeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zeb=a}a=zeb;return a}}}); var BZ=AZ;w([P(Z),x("design:type",Object)],BZ.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],BZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],BZ.prototype,"data",void 0);BZ=w([V({is:"ytd-profile-column-stats-renderer"})],BZ);var Aeb;var Beb;var CZ=function(){return O.apply(this,arguments)||this}; p(CZ,O);g.Object.defineProperties(CZ.prototype,{thumbnailWidth:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null===(a=this.data)||void 0===a||!a.useThumbnailSize)return 80;var f=null===(c=null===(b=this.data)||void 0===b?void 0:b.thumbnail)||void 0===c?void 0:c.thumbnails;return f&&(null===(d=f[0])||void 0===d?void 0:d.width)||80}}, thumbnailHeight:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;if(null===(a=this.data)||void 0===a||!a.useThumbnailSize)return 80;var f=null===(c=null===(b=this.data)||void 0===b?void 0:b.thumbnail)||void 0===c?void 0:c.thumbnails;return f&&(null===(d=f[0])||void 0===d?void 0:d.height)||80}}}); g.Object.defineProperties(CZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Beb){var a=document.createElement("template");a.innerHTML="\n\n
[[getSimpleString(data.title)]]
\n
[[getSimpleString(data.subtitle)]]
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Aeb){var d=document.createElement("template");d.innerHTML=""; Aeb=d}d=Aeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Beb=a}a=Beb;return a}}}); var DZ=CZ;w([P(X.YtRendererBehavior),x("design:type",Object)],DZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],DZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],DZ.prototype,"componentStyle",void 0);w([BE("data.useThumbnailSize"),x("design:type",Object),x("design:paramtypes",[])],DZ.prototype,"thumbnailWidth",null);w([BE("data.useThumbnailSize"),x("design:type",Object),x("design:paramtypes",[])],DZ.prototype,"thumbnailHeight",null); DZ=w([V({is:"ytd-profile-column-user-info-renderer"})],DZ);var Ceb;var Deb;var EZ=function(){return O.apply(this,arguments)||this}; p(EZ,O);EZ.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; g.Object.defineProperties(EZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Deb){var a=document.createElement("template");a.innerHTML="
\n

[[getSimpleString(data.title)]]

\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ceb){var d=document.createElement("template");d.innerHTML=""; Ceb=d}d=Ceb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Deb=a}a=Deb;return a}}}); var FZ=EZ;w([P(X.YtRendererBehavior),x("design:type",Object)],FZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],FZ.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],FZ.prototype,"data",void 0);FZ=w([V({is:"ytd-labs-edit-renderer"})],FZ);var Eeb;var Feb;var GZ=function(){var a=O.apply(this,arguments)||this;a.headerBackgroundLight="https://www.gstatic.com/youtube/img/labs/early_access_header_light.png";a.headerBackgroundDark="https://www.gstatic.com/youtube/img/labs/early_access_header_dark.png";a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(GZ,O);e=GZ.prototype;e.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.ready=function(){this.setBackgroundImage(document.documentElement.hasAttribute("dark"))}; e.onDarkModeToggledAction=function(a){this.setBackgroundImage(a)}; e.setBackgroundImage=function(a){this.updateStyles({"--yt-labs-header-background":"url("+(a?this.headerBackgroundDark:this.headerBackgroundLight)+")"})}; g.Object.defineProperties(GZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Feb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.text)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eeb){var d=document.createElement("template");d.innerHTML=""; Eeb=d}d=Eeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Feb=a}a=Feb;return a}}}); var HZ=GZ;w([P(X.YtRendererBehavior),x("design:type",Object)],HZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],HZ.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],HZ.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],HZ.prototype,"data",void 0);HZ=w([V({is:"ytd-labs-header-renderer"})],HZ);var Geb;var Heb;var IZ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-check-labs-opted-in-state":"onCheckLabsOptedInState","yt-manage-labs-state-command":"onManageLabsState"};return a}; p(IZ,O);IZ.prototype.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{buttonSize:"size-large"}}}},"data.feedbackButton":{id:"feedback-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{buttonSize:"size-large"}}}}}}; IZ.prototype.onYtToggleButton=function(a){this.notifyPath("data.primaryButton.toggleButtonRenderer.isToggled",a.detail.toggled)}; IZ.prototype.onManageLabsState=function(a){a.manageLabsStateCommand&&("LABS_STATE_TYPE_OVERRIDE_OPT_IN"===a.manageLabsStateCommand.stateChange&&this.data?a.manageLabsStateCommand.labsItemId!==this.data.labsItemId?this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1):this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0):this.data&&a.manageLabsStateCommand.labsItemId===this.data.labsItemId&&("LABS_STATE_TYPE_OPT_IN"===a.manageLabsStateCommand.stateChange?this.ytActionSenderBehavior.sendAction("yt-check-labs-opted-in-state").some(function(b){return b})? this.data.confirmationDialogCommand&&this.ytActionSenderBehavior.sendInnerTubeActions([this.data.confirmationDialogCommand],this):(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optInCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!0)):"LABS_STATE_TYPE_OPT_OUT"===a.manageLabsStateCommand.stateChange&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.optOutCommand]),this.set("data.primaryButton.toggleButtonRenderer.isToggled",!1))))}; IZ.prototype.onCheckLabsOptedInState=function(){var a=this.get("data.primaryButton.toggleButtonRenderer");return a?a.isToggled:!1}; g.Object.defineProperties(IZ.prototype,{itemStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.itemStyle}}}); g.Object.defineProperties(IZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Heb){var a=document.createElement("template");a.innerHTML="
\n
\n \n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.expirationDate)]]
\n \n
\n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Geb){var d=document.createElement("template");d.innerHTML=""; Geb=d}d=Geb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Heb=a}a=Heb;return a}}}); var JZ=IZ;JZ.prototype.onYtToggleButton=JZ.prototype.onYtToggleButton;w([P(X.YtRendererBehavior),x("design:type",Object)],JZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],JZ.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],JZ.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],JZ.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],JZ.prototype,"data",void 0);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Object),x("design:paramtypes",[])],JZ.prototype,"itemStyle",null);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],JZ.prototype,"onYtToggleButton",null);JZ=w([V({is:"ytd-labs-item-renderer"})],JZ);var Ieb;var Jeb;var KZ=function(){return O.apply(this,arguments)||this}; p(KZ,O);KZ.prototype.configureRendererStamper=function(){return{"data.deleteButton":{id:"delete-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.chip":{id:"chips",mapping:{liveChatHistorySuperChatChipRenderer:"ytd-live-chat-history-super-chat-chip-renderer",liveChatHistoryNewSponsorChipRenderer:"ytd-live-chat-history-new-sponsor-chip-renderer"}}}}; g.Object.defineProperties(KZ.prototype,{hideMessageBlock:{configurable:!0,enumerable:!0,get:function(){return!!this.data&&!this.data.charityName&&!!this.data.chip}}}); g.Object.defineProperties(KZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jeb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n \n \n
\n
\n \n
\n [[getSimpleString(data.timestamp)]]\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ieb){var d=document.createElement("template");d.innerHTML=""; Ieb=d}d=Ieb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jeb=a}a=Jeb;return a}}}); var LZ=KZ;w([P(X.YtRendererBehavior),x("design:type",Object)],LZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],LZ.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],LZ.prototype,"ytdDismissableItemBehavior",void 0);w([R(),x("design:type",Object)],LZ.prototype,"data",void 0);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],LZ.prototype,"hideMessageBlock",null);LZ=w([V({is:"ytd-live-chat-history-entry-renderer"})],LZ);var Keb;var Leb;var Meb=function(){return O.apply(this,arguments)||this}; p(Meb,O); g.Object.defineProperties(Meb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Leb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Keb){var d=document.createElement("template");d.innerHTML=""; Keb=d}d=Keb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Leb=a}a=Leb;return a}}}); var MZ=Meb;w([P(X.YtRendererBehavior),x("design:type",Object)],MZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],MZ.prototype,"data",void 0);MZ=w([V({is:"ytd-live-chat-history-new-sponsor-chip-renderer"})],MZ);var Neb;var Oeb;var NZ=function(){return O.apply(this,arguments)||this}; p(NZ,O);NZ.prototype.observeSuperchatChip=function(a){a&&(a={"--yt-live-chat-history-super-chat-chip-renderer-background-color":this.colorFromDecimal(a.backgroundColor),"--yt-live-chat-history-super-chat-chip-renderer-text-color":this.colorFromDecimal(a.textColor)},this.updateStyles(a))}; NZ.prototype.colorFromDecimal=function(a){return QN(Number(a||0))}; g.Object.defineProperties(NZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Oeb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Neb){var d=document.createElement("template");d.innerHTML=""; Neb=d}d=Neb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Oeb=a}a=Oeb;return a}}}); var OZ=NZ;OZ.prototype.observeSuperchatChip=OZ.prototype.observeSuperchatChip;w([P(X.YtRendererBehavior),x("design:type",Object)],OZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],OZ.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],OZ.prototype,"observeSuperchatChip",null);OZ=w([V({is:"ytd-live-chat-history-super-chat-chip-renderer"})],OZ);var Peb;var Qeb;TO("itemSectionRenderer","factCheckRenderer","ytd-fact-check-renderer");var PZ=function(){return O.apply(this,arguments)||this}; p(PZ,O);PZ.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; g.Object.defineProperties(PZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qeb){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n \n
\n
\n \n \n \n \n
\n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Peb){var d=document.createElement("template");d.innerHTML=""; Peb=d}d=Peb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qeb=a}a=Qeb;return a}}}); var QZ=PZ;w([P(Z),x("design:type",Object)],QZ.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],QZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],QZ.prototype,"data",void 0);QZ=w([V({is:"ytd-fact-check-renderer"})],QZ);var Reb;var Seb;var RZ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-text-command":"handleUpdateTextCommand"};return a}; p(RZ,O);RZ.prototype.configureRendererStamper=function(){return{"data.connectButton":{id:"connect-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer",accountLinkButtonRenderer:"ytd-account-link-button-renderer"}}}}; RZ.prototype.handleUpdateTextCommand=function(a){a.settingsUpdateTextCommand&&this.data&&this.data.id===a.settingsUpdateTextCommand.id&&this.set("data",a.settingsUpdateTextCommand)}; RZ.prototype.computeConnectedAppStyle=function(a){return a.style?a.style.toLowerCase().replace(/_/g,"-"):""}; g.Object.defineProperties(RZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Seb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
[[getSimpleString(data.title)]]
\n \n \n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Reb){var d=document.createElement("template");d.innerHTML=""; Reb=d}d=Reb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Seb=a}a=Seb;return a}}}); var SZ=RZ;w([P(Z),x("design:type",Object)],SZ.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],SZ.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],SZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],SZ.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeConnectedAppStyle(data)"}),x("design:type",String)],SZ.prototype,"connectedAppStyle",void 0); SZ=w([V({is:"ytd-connected-app-renderer"})],SZ);var Teb;var Ueb;var TZ=function(){return O.apply(this,arguments)||this}; p(TZ,O);TZ.prototype.onSelect=function(){this.data&&this.data.onSelectCommand&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.onSelectCommand])}; g.Object.defineProperties(TZ.prototype,{label:{configurable:!0,enumerable:!0,get:function(){return this.ytRendererBehavior.getSimpleString(this.data.label)}}, value:{configurable:!0,enumerable:!0,get:function(){if(this.data&&("string"===typeof this.data.stringValue||"number"===typeof this.data.int32Value))return this.data.stringValue?this.data.stringValue:this.data.int32Value}}}); g.Object.defineProperties(TZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ueb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Teb){var d=document.createElement("template");d.innerHTML=""; Teb=d}d=Teb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ueb=a}a=Ueb;return a}}}); var UZ=TZ;w([P(X.YtRendererBehavior),x("design:type",Object)],UZ.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],UZ.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],UZ.prototype,"data",void 0);w([BE("data.label"),x("design:type",String),x("design:paramtypes",[])],UZ.prototype,"label",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],UZ.prototype,"value",null);UZ=w([V({is:"ytd-dropdown-item-renderer"})],UZ);var Veb;var Web;var VZ=function(){var a=O.apply(this,arguments)||this;a.value="";a.noLabelFloat=!1;a.noUnderline=!1;a.hasBackground=!1;a.verticalAlign="top";a.autosize=!1;a.minAutosizeWidth=100;a.autosizeFont="14px Roboto";return a}; p(VZ,O);e=VZ.prototype;e.configureRendererStamper=function(){return{"data.entries":{id:"entries",mapping:{dropdownItemRenderer:"ytd-dropdown-item-renderer",privacyDropdownItemRenderer:"ytd-privacy-dropdown-item-renderer",navigationDropdownItemRenderer:"ytd-navigation-dropdown-item-renderer"}}}}; e.reset=function(){this.entries.selected=-1;this.entries.forceSynchronousItemUpdate();this.entries.select(this.getSelectedItem())}; e.dataChanged=function(){this.reset()}; e.stopPropagation=function(a){a.stopPropagation()}; e.autoSizeLabel=function(){if(this.autosizeFont&&this.autosize){this.canvas||(this.canvas=document.createElement("canvas"));var a=this.canvas.getContext("2d");a&&(a.font=this.autosizeFont,this.inputEl.style.width=Math.max(this.minAutosizeWidth,Number(a.measureText(this.inputEl.value).width)+24)+"px")}}; e.getSelectedItem=function(){if(!this.data||!this.data.entries)return null;for(var a=0,b=this.data.entries.length;a\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Veb){var d=document.createElement("template");d.innerHTML=""; Veb=d}d=Veb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Web=a}a=Web;return a}}}); var WZ=VZ;WZ.prototype.autoSizeLabel=WZ.prototype.autoSizeLabel;WZ.prototype.stopPropagation=WZ.prototype.stopPropagation;WZ.prototype.dataChanged=WZ.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],WZ.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],WZ.prototype,"ytRendererStamperBehavior",void 0);w([R(),x("design:type",Object)],WZ.prototype,"data",void 0);w([R({notify:!0}),x("design:type",Object)],WZ.prototype,"value",void 0); w([R(),x("design:type",Object)],WZ.prototype,"noLabelFloat",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WZ.prototype,"noUnderline",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],WZ.prototype,"hasBackground",void 0);w([R(),x("design:type",Object)],WZ.prototype,"verticalAlign",void 0);w([R(),x("design:type",Object)],WZ.prototype,"autosize",void 0);w([R(),x("design:type",Object)],WZ.prototype,"minAutosizeWidth",void 0); w([R(),x("design:type",Object)],WZ.prototype,"autosizeFont",void 0);w([CE("#entries"),x("design:type",Object)],WZ.prototype,"entries",void 0);w([CE("#input"),x("design:type",Object)],WZ.prototype,"inputEl",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WZ.prototype,"dataChanged",null); w([S("iron-overlay-opened"),S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],WZ.prototype,"stopPropagation",null);w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],WZ.prototype,"autoSizeLabel",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],WZ.prototype,"label",null);WZ=w([V({is:"ytd-dropdown-renderer"})],WZ);var Xeb;var Yeb;var Zeb=function(){return O.apply(this,arguments)||this}; p(Zeb,O); g.Object.defineProperties(Zeb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Yeb){var a=document.createElement("template");a.innerHTML=" \n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xeb){var d=document.createElement("template");d.innerHTML=""; Xeb=d}d=Xeb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yeb=a}a=Yeb;return a}}}); var XZ=Zeb;w([P(X.YtRendererBehavior),x("design:type",Object)],XZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],XZ.prototype,"data",void 0);w([R({computed:"getSimpleString(data.label)"}),x("design:type",String)],XZ.prototype,"label",void 0);XZ=w([V({is:"ytd-navigation-dropdown-item-renderer"})],XZ);var $eb;var afb;var bfb=function(){return O.apply(this,arguments)||this}; p(bfb,O); g.Object.defineProperties(bfb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===afb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$eb){var d=document.createElement("template");d.innerHTML=""; $eb=d}d=$eb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);afb=a}a=afb;return a}}}); var YZ=bfb;w([P(X.YtRendererBehavior),x("design:type",Object)],YZ.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],YZ.prototype,"data",void 0);YZ=w([V({is:"ytd-channel-options-renderer"})],YZ);var cfb;var dfb;var ZZ=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-checkbox-command":"handleUpdateCheckboxCommand"};return a}; p(ZZ,O);ZZ.prototype.onCheckboxChange=function(a){this.data&&(a=Polymer.dom(a).rootTarget.checked?this.data.enableServiceEndpoint:this.data.disableServiceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; ZZ.prototype.handleUpdateCheckboxCommand=function(a){a.settingsUpdateCheckboxCommand&&this.data&&this.data.id===a.settingsUpdateCheckboxCommand.id&&(this.set("data.disabled",a.settingsUpdateCheckboxCommand.disabled),this.set("data.title",a.settingsUpdateCheckboxCommand.title))}; g.Object.defineProperties(ZZ,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dfb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cfb){var d=document.createElement("template");d.innerHTML=""; cfb=d}d=cfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dfb=a}a=dfb;return a}}}); var $Z=ZZ;w([P(X.YtRendererBehavior),x("design:type",Object)],$Z.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],$Z.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],$Z.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],$Z.prototype,"data",void 0); w([R({reflectToAttribute:!0,value:N("desktop_adjust_touch_target")}),x("design:type",Boolean)],$Z.prototype,"increasedTooltipTarget",void 0);w([R({value:function(){return N("desktop_adjust_touch_target")?0:500}}), x("design:type",Number)],$Z.prototype,"animationDelay",void 0);$Z=w([V({is:"ytd-settings-checkbox-renderer"})],$Z);var efb;var ffb;var a_=function(){return O.apply(this,arguments)||this}; p(a_,O);a_.prototype.configureRendererStamper=function(){return{"data.resumeButton":{id:"resume-button",mapping:{buttonRenderer:"ytd-button-renderer",toggleButtonRenderer:"ytd-toggle-button-renderer"}}}}; g.Object.defineProperties(a_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ffb){var a=document.createElement("template");a.innerHTML="
\n \n
[[getSimpleString(data.title)]]
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===efb){var d=document.createElement("template");d.innerHTML=""; efb=d}d=efb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ffb=a}a=ffb;return a}}}); var b_=a_;w([P(X.YtRendererBehavior),x("design:type",Object)],b_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],b_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],b_.prototype,"data",void 0);b_=w([V({is:"ytd-settings-email-item-renderer"})],b_);var gfb;var hfb;var c_=function(){return O.apply(this,arguments)||this}; p(c_,O);c_.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{settingsEmailItemRenderer:{component:"ytd-settings-email-item-renderer",noInjection:!0}}},"data.resumeButton":{id:"resume-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; c_.prototype.getExpansionIcon=function(a){return a?"arrow_drop_up":"arrow_drop_down"}; c_.prototype.onToggleListExpansion=function(){this.expanded=!this.expanded}; g.Object.defineProperties(c_.prototype,{emailListExpanded:{configurable:!0,enumerable:!0,get:function(){return this.expanded?"true":"false"}}}); g.Object.defineProperties(c_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hfb){var a=document.createElement("template");a.innerHTML="
\n \n
[[getSimpleString(data.title)]]
\n \n \n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gfb){var d=document.createElement("template");d.innerHTML=""; gfb=d}d=gfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hfb=a}a=hfb;return a}}}); var d_=c_;w([P(X.YtRendererBehavior),x("design:type",Object)],d_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],d_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],d_.prototype,"data",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],d_.prototype,"expanded",void 0);w([BE("expanded"),x("design:type",String),x("design:paramtypes",[])],d_.prototype,"emailListExpanded",null); w([CE("#options"),x("design:type",b_)],d_.prototype,"options",void 0);d_=w([V({is:"ytd-settings-email-list-renderer"})],d_);var ifb;var jfb;var kfb;var lfb;var e_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-refresh-form-command":"onYtRefreshFormCommand"};return a}; p(e_,O);e=e_.prototype;e.configureRendererStamper=function(){return{"data.fields":{id:"fields",mapping:{textInputFormFieldRenderer:{component:"yt-text-input-form-field-renderer",params:{required:!0},properties:{hideLabel:"[[data.hideLabels]]"}},toggleFormFieldRenderer:{component:"yt-toggle-form-field-renderer"},optionsRenderer:"yt-options-renderer",contactSectionRenderer:"yt-contact-section-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.onYtRefreshFormCommand=function(a){var b,c;(null===(c=null===(b=a.refreshFormCommand)||void 0===b?void 0:b.formRenderer)||void 0===c?0:c.formRenderer)&&this.set("data",a.refreshFormCommand.formRenderer.formRenderer)}; e.reset=function(){for(var a=this.$.fields.children,b=0;b
\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===kfb){var d=document.createElement("template");d.innerHTML="";kfb=d}d=kfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lfb=a}a=lfb;return a}}}); var f_=e_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],f_.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],f_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],f_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],f_.prototype,"data",void 0);f_=w([fO({is:"yt-form-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],f_);var g_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm"};return a}; p(g_,O);g_.prototype.configureRendererStamper=function(){return{"data.form":{id:"username-password-form",mapping:{formRenderer:"yt-form-renderer"}},"data.claimButton":{id:"claim-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g_.prototype.handleSignalActionSubmitForm=function(){var a,b=null===(a=this.formRenderer)||void 0===a?void 0:a.getForm();b&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint,b])}; g.Object.defineProperties(g_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jfb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ifb){var d=document.createElement("template");d.innerHTML=""; ifb=d}d=ifb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jfb=a}a=jfb;return a}}}); var h_=g_;w([P(X.YtRendererBehavior),x("design:type",Object)],h_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],h_.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],h_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],h_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],h_.prototype,"data",void 0); w([CE("yt-form-renderer"),x("design:type",f_)],h_.prototype,"formRenderer",void 0);h_=w([V({is:"ytd-settings-gaia-link-renderer"})],h_);var mfb;var nfb;var i_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-options-command":"handleUpdateOptionsCommand"};return a}; p(i_,O);i_.prototype.dataChanged=function(){this.data&&this.data.id&&"SETTINGS_OPTIONS_ID_TYPE_AV1_OPTIONS"===this.data.id&&kUa()&&this.set("data.hidden",!1)}; i_.prototype.onSwitchReady=function(){var a=this;this.data&&this.data.id&&"SETTINGS_OPTIONS_ID_TYPE_PUSH_NOTIFICATIONS_ENABLED"===this.data.id&&N("service_worker_push_enabled")&&navigator.serviceWorker.ready.then(function(){vVa().then(function(b){b&&("default"===Notification.permission?a.set("data.hidden",!1):"granted"===Notification.permission&&KN("NotificationsDisabled").then(function(c){c||a.ytActionSenderBehavior.sendAction("yt-toggle-settings-switch",[a.data.id]);a.set("data.hidden",!1)}).catch(function(){}))})})}; i_.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{channelOptionsRenderer:{component:"ytd-channel-options-renderer",noInjection:!0},copyLinkRenderer:{component:"yt-copy-link-renderer",noInjection:!0},dropdownRenderer:{component:"ytd-dropdown-renderer",params:{hasBackground:!0,verticalAlign:"bottom",noUnderline:!0},noInjection:!0},settingsCheckboxRenderer:{component:"ytd-settings-checkbox-renderer",noInjection:!0},settingsEmailListRenderer:{component:"ytd-settings-email-list-renderer", noInjection:!0},settingsGaiaLinkRenderer:{component:"ytd-settings-gaia-link-renderer",noInjection:!0},settingsRadioOptionRenderer:{component:"ytd-settings-radio-option-renderer",noInjection:!0},settingsSwitchRenderer:{component:"ytd-settings-switch-renderer",noInjection:!0},connectedAppRenderer:{component:"ytd-connected-app-renderer",noInjection:!0}}}}}; i_.prototype.handleUpdateOptionsCommand=function(a){a.settingsUpdateOptionsCommand&&this.data&&this.data.id===a.settingsUpdateOptionsCommand.id&&(this.set("data.hidden",a.settingsUpdateOptionsCommand.hidden),void 0!==a.settingsUpdateOptionsCommand.text&&this.set("data.text",a.settingsUpdateOptionsCommand.text),a.settingsUpdateOptionsCommand.clearOptions&&this.set("data.options",[]))}; g.Object.defineProperties(i_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nfb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mfb){var d=document.createElement("template");d.innerHTML=""; mfb=d}d=mfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nfb=a}a=nfb;return a}}}); var j_=i_;j_.prototype.onSwitchReady=j_.prototype.onSwitchReady;j_.prototype.dataChanged=j_.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],j_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],j_.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],j_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],j_.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],j_.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],j_.prototype,"dataChanged",null);w([S("yt-settings-switch-ready"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],j_.prototype,"onSwitchReady",null);j_=w([V({is:"ytd-settings-options-renderer"})],j_);var ofb;var pfb;var k_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-select-settings-radio-option":"onSelectOption"};return a}; p(k_,O); k_.prototype.dataChanged=function(){if(!this.data||!this.data.id||"SETTINGS_OPTIONS_ID_TYPE_AV1_SD"!==this.data.id||kUa()&&window.SourceBuffer&&window.SourceBuffer.prototype.changeType){var a;if(a=this.data&&this.data.id){a=this.data.id;if(window.localStorage&&window.localStorage["yt-player-av1-pref"]){var b=window.localStorage["yt-player-av1-pref"];b="480"===b?"SETTINGS_OPTIONS_ID_TYPE_AV1_SD":"8192"===b?"SETTINGS_OPTIONS_ID_TYPE_AV1_ALWAYS":"SETTINGS_OPTIONS_ID_TYPE_UNKNOWN"}else b="SETTINGS_OPTIONS_ID_TYPE_AV1_AUTO";a= a===b||a===lUa()}a&&this.ytActionSenderBehavior.sendAction("yt-select-settings-radio-option",[this.data.id])}else this.set("data.hidden",!0)}; k_.prototype.onButtonChanged=function(a){Polymer.dom(a).rootTarget.checked?this.data&&this.data.id&&(this.data.serviceEndpoint&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),this.ytActionSenderBehavior.sendAction("yt-select-settings-radio-option",[this.data.id])):this.$.radio.setAttribute("checked","")}; k_.prototype.onSelectOption=function(a){this.data&&this.data.id&&(this.data.id===a?this.$.radio.setAttribute("checked",""):this.$.radio.removeAttribute("checked"))}; g.Object.defineProperties(k_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pfb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ofb){var d=document.createElement("template");d.innerHTML=""; ofb=d}d=ofb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pfb=a}a=pfb;return a}}}); var l_=k_;l_.prototype.dataChanged=l_.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],l_.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],l_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],l_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],l_.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],l_.prototype,"dataChanged",null);w([R({reflectToAttribute:!0,value:N("desktop_adjust_touch_target")}),x("design:type",Boolean)],l_.prototype,"increasedTooltipTarget",void 0);w([R({value:function(){return N("desktop_adjust_touch_target")?0:500}}), x("design:type",Number)],l_.prototype,"animationDelay",void 0);l_=w([V({is:"ytd-settings-radio-option-renderer"})],l_);var qfb;var rfb;var m_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-settings-update-switch-command":"handleUpdateSettingsSwitch","yt-toggle-settings-switch":"onToggleSettingsSwitch"};return a}; p(m_,O);e=m_.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.fire("yt-settings-switch-ready")}; e.onSwitchChange=function(a){this.data&&(a=Polymer.dom(a).rootTarget.checked?this.data.enableServiceEndpoint:this.data.disableServiceEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.handleUpdateSettingsSwitch=function(a){a.settingsUpdateSwitchCommand&&this.data&&this.data.id===a.settingsUpdateSwitchCommand.id&&(a.settingsUpdateSwitchCommand.enabled?this.$.toggle.setAttribute("checked",""):this.$.toggle.removeAttribute("checked"))}; e.onToggleSettingsSwitch=function(a){this.data&&this.data.id===a&&(this.$.toggle.hasAttribute("checked")?this.$.toggle.removeAttribute("checked"):this.$.toggle.setAttribute("checked",""))}; g.Object.defineProperties(m_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rfb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qfb){var d=document.createElement("template");d.innerHTML=""; qfb=d}d=qfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rfb=a}a=rfb;return a}}}); var n_=m_;n_.prototype.dataChanged=n_.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],n_.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],n_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],n_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],n_.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],n_.prototype,"dataChanged",null);n_=w([V({is:"ytd-settings-switch-renderer"})],n_);var sfb;var tfb;var ufb;var vfb;var o_=function(){return O.apply(this,arguments)||this}; p(o_,O);o_.prototype.attached=function(){var a=this;this.root.addEventListener("click",function(){a.handleSelection()})}; o_.prototype.onKeyDown=function(a){a=a.keyCode;13!==a&&32!==a||this.handleSelection()}; o_.prototype.handleSelection=function(){this.data&&this.fire("ytd-product-details-thumbnail-renderer-selected",this.data.index)}; g.Object.defineProperties(o_.prototype,{isSelected:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.isSelected}}}); g.Object.defineProperties(o_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vfb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ufb){var d=document.createElement("template");d.innerHTML=""; ufb=d}d=ufb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vfb=a}a=vfb;return a}}}); var p_=o_;w([P(X.YtRendererBehavior),x("design:type",Object)],p_.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],p_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],p_.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],p_.prototype,"isSelected",null);p_=w([V({is:"ytd-product-details-thumbnail-renderer"})],p_);var wfb;var xfb;var q_=function(){return O.apply(this,arguments)||this}; p(q_,O);q_.prototype.ready=function(){this.addEventListener("mouseenter",this.onMouseEnterImage);this.addEventListener("mouseleave",this.onMouseLeaveImage)}; q_.prototype.onMouseEnterImage=function(){this.isImageButton&&this.ytActionSenderBehavior.sendOptionalAction("ytd-product-details-variant-image-select",[this.data])}; q_.prototype.onMouseLeaveImage=function(){this.isImageButton&&this.ytActionSenderBehavior.sendOptionalAction("ytd-product-details-variant-image-unselect")}; g.Object.defineProperties(q_.prototype,{isImageButton:{configurable:!0,enumerable:!0,get:function(){return"VARIANT_ATTRIBUTE_DISPLAY_TYPE_IMAGE"===this.displayType}}, isPillButton:{configurable:!0,enumerable:!0,get:function(){return"VARIANT_ATTRIBUTE_DISPLAY_TYPE_PILL"===this.displayType||"VARIANT_ATTRIBUTE_DISPLAY_TYPE_DROPDOWN_LIST"===this.displayType}}, isActive:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_OPTION_STATE_SELECTED"===(null===(a=this.data)||void 0===a?void 0:a.variantOptionState)}}, isSubstitute:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_OPTION_STATE_OTHER_ATTRIBUTE_WILL_CHANGE"===(null===(a=this.data)||void 0===a?void 0:a.variantOptionState)}}, hasNoOffers:{configurable:!0,enumerable:!0,get:function(){var a;return"VARIANT_AVAILABILITY_NO_OFFERS"===(null===(a=this.data)||void 0===a?void 0:a.variantAvailability)}}}); g.Object.defineProperties(q_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xfb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wfb){var d=document.createElement("template");d.innerHTML=""; wfb=d}d=wfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xfb=a}a=xfb;return a}}}); var r_=q_;w([P(X.YtRendererBehavior),x("design:type",Object)],r_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],r_.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],r_.prototype,"componentBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],r_.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],r_.prototype,"data",void 0); w([R(),x("design:type",String)],r_.prototype,"displayType",void 0);w([BE("displayType","data"),x("design:type",Boolean),x("design:paramtypes",[])],r_.prototype,"isImageButton",null);w([BE("displayType","data"),x("design:type",Boolean),x("design:paramtypes",[])],r_.prototype,"isPillButton",null);w([BE("data"),R({reflectToAttribute:!0}),x("design:type",Boolean),x("design:paramtypes",[])],r_.prototype,"isActive",null); w([BE("data"),R({reflectToAttribute:!0}),x("design:type",Boolean),x("design:paramtypes",[])],r_.prototype,"isSubstitute",null);w([BE("data"),R({reflectToAttribute:!0}),x("design:type",Boolean),x("design:paramtypes",[])],r_.prototype,"hasNoOffers",null);r_=w([V({is:"ytd-product-details-variant-option-renderer"})],r_);var s_=function(){var a=O.apply(this,arguments)||this;var b={};a.actionMap=(b["ytd-product-details-variant-image-select"]="handleVariantImageSelect",b["ytd-product-details-variant-image-unselect"]="handleVariantImageDeselect",b);a.selectedThumbnailIndex=0;a.selectItem=function(c){c.target.onKeyDown(c)}; return a}; p(s_,O);e=s_.prototype;e.handleVariantImageSelect=function(a){this.hoverUrl=a.imageUrl}; e.handleVariantImageDeselect=function(){this.hoverUrl=void 0}; e.configureRendererStamper=function(){return{"populatedData.imageRenderer":{id:"items",mapping:{productDetailsThumbnailRenderer:{component:"ytd-product-details-thumbnail-renderer",attributes:{role:"option"}}}}}}; e.onThumbnailSelected=function(a,b){this.selectedThumbnailIndex=b}; e.dataChanged=function(){this.ytdHorizontalListBehavior.reset()}; e.updateOffset=function(){this.ytdHorizontalListBehavior.offset_=Math.max(0,Math.min(this.ytdHorizontalListBehavior.offset_,this.items.clientWidth-this.$["scroll-container"].clientWidth));this.ytdHorizontalListBehavior.reposition_()}; g.Object.defineProperties(s_.prototype,{showThumbnails:{configurable:!0,enumerable:!0,get:function(){var a,b,c;return(null===(a=this.data)||void 0===a?0:a.imageRenderer)?1<(null===(c=null===(b=this.data)||void 0===b?void 0:b.imageRenderer)||void 0===c?void 0:c.length):!1}}, thumbnailDetails:{configurable:!0,enumerable:!0,get:function(){var a,b,c;if(this.hoverUrl)return{thumbnails:[{url:this.hoverUrl}]};if(null===(a=this.data)||void 0===a?0:a.imageRenderer)return null===(c=null===(b=this.data.imageRenderer[this.selectedThumbnailIndex])||void 0===b?void 0:b.productDetailsThumbnailRenderer)||void 0===c?void 0:c.thumbnailDetails}}, populatedData:{configurable:!0,enumerable:!0,get:function(){var a=this,b,c,d,f=null!==(d=null===(c=null===(b=this.data)||void 0===b?void 0:b.imageRenderer)||void 0===c?void 0:c.map(function(h,l){return{productDetailsThumbnailRenderer:Object.assign(Object.assign({},h.productDetailsThumbnailRenderer),{index:l,isSelected:l===a.selectedThumbnailIndex})}}))&&void 0!==d?d:[]; return Object.assign(Object.assign({},this.data),{imageRenderer:f})}}}); g.Object.defineProperties(s_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tfb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sfb){var d=document.createElement("template");d.innerHTML=""; sfb=d}d=sfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tfb=a}a=tfb;return a}}}); var t_=s_;t_.prototype.updateOffset=t_.prototype.updateOffset;t_.prototype.dataChanged=t_.prototype.dataChanged;t_.prototype.onThumbnailSelected=t_.prototype.onThumbnailSelected;w([P(X.YtRendererBehavior),x("design:type",Object)],t_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],t_.prototype,"ytRendererstamperBehavior",void 0);w([P(IQ.YtdHorizontalListBehavior),x("design:type",Object)],t_.prototype,"ytdHorizontalListBehavior",void 0); w([P(kO.YtComponentBehavior),x("design:type",Object)],t_.prototype,"componentBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],t_.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],t_.prototype,"data",void 0);w([R({value:"$.items.children"}),x("design:type",String)],t_.prototype,"itemsPath",void 0);w([R({value:3}),x("design:type",Number)],t_.prototype,"initialCount",void 0);w([CE("#items"),x("design:type",p_)],t_.prototype,"items",void 0); w([R(),x("design:type",Object)],t_.prototype,"selectedThumbnailIndex",void 0);w([R(),x("design:type",String)],t_.prototype,"hoverUrl",void 0);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],t_.prototype,"showThumbnails",null);w([S("ytd-product-details-thumbnail-renderer-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Number]),x("design:returntype",void 0)],t_.prototype,"onThumbnailSelected",null); w([BE("data","selectedThumbnailIndex","hoverUrl"),x("design:type",Object),x("design:paramtypes",[])],t_.prototype,"thumbnailDetails",null);w([BE("data","selectedThumbnailIndex"),x("design:type",Object),x("design:paramtypes",[])],t_.prototype,"populatedData",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],t_.prototype,"dataChanged",null); w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],t_.prototype,"updateOffset",null);t_=w([V({is:"ytd-product-details-image-carousel-renderer"})],t_);var yfb;var zfb;var Afb=function(){return O.apply(this,arguments)||this}; p(Afb,O); g.Object.defineProperties(Afb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zfb){var a=document.createElement("template");a.innerHTML="
\n \n
\n [[data.vendorName]]\n [[data.offerTags]]\n
\n
\n \n [[data.additionalFeesText]]\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yfb){var d=document.createElement("template");d.innerHTML=""; yfb=d}d=yfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zfb=a}a=zfb;return a}}}); var u_=Afb;w([P(X.YtRendererBehavior),x("design:type",Object)],u_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],u_.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],u_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],u_.prototype,"data",void 0);u_=w([V({is:"ytd-product-details-offer-renderer"})],u_);var Bfb;var Cfb;var v_=function(){var a=O.apply(this,arguments)||this;a.isOffersHidden=!0;return a}; p(v_,O);v_.prototype.toggleOffers=function(){this.isOffersHidden=!this.isOffersHidden}; v_.prototype.configureRendererStamper=function(){return{"data.offers":{id:"offer",mapping:{productDetailsOfferRenderer:"ytd-product-details-offer-renderer"}}}}; g.Object.defineProperties(v_.prototype,{getFirstVendorLogoUrl:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d;return null===(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.offers)||void 0===b?void 0:b[0])||void 0===c?void 0:c.productDetailsOfferRenderer)||void 0===d?void 0:d.vendorLogoUrl}}}); g.Object.defineProperties(v_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cfb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bfb){var d=document.createElement("template");d.innerHTML=""; Bfb=d}d=Bfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cfb=a}a=Cfb;return a}}}); var w_=v_;w([P(X.YtRendererBehavior),x("design:type",Object)],w_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],w_.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],w_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],w_.prototype,"data",void 0);w([R(),x("design:type",Object)],w_.prototype,"isOffersHidden",void 0); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],w_.prototype,"getFirstVendorLogoUrl",null);w_=w([V({is:"ytd-product-details-offers-container-renderer"})],w_);var Dfb;var Efb;var Ffb;var Gfb;var x_=function(){var a=O.apply(this,arguments)||this;a.variantsExpanded=!1;a.hideShowMoreLessVariantButton=!0;a.initialized=!1;a.computeVariantsDebouncer=null;a.computeVariants=function(){var b;if("VARIANT_ATTRIBUTE_DISPLAY_TYPE_IMAGE"!==(null===(b=a.data)||void 0===b?void 0:b.displayType))if(a.variantsExpanded)for(var c=k(a.items.children),d=c.next();!d.done;d=c.next())d.value.hidden=!1;else a.showOptionPills();a.initialized=!0}; return a}; p(x_,O);e=x_.prototype;e.ready=function(){var a=this;setTimeout(function(){a.showOptionPills()||(a.variantsExpanded=!0);a.computeVariants()})}; e.showOptionPills=function(){for(var a=k(this.items.children),b=a.next();!b.done;b=a.next())b.value.hidden=!0;var c=this.container.getBoundingClientRect().width,d=0,f=a=0,h=!1,l=k(this.items.children);for(b=l.next();!b.done;b=l.next()){b=b.value;b.hidden=!1;var m=b.getBoundingClientRect().width+8;if(d+m++f)d=m;else break;a+=1;b.hasAttribute("is-active")&&(h=!0)}for(c=a;c
\n
\n
[[data.title]]
[[selectedOptionName]]
\n
\n
\n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ffb){var d=document.createElement("template");d.innerHTML=""; Ffb=d}d=Ffb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gfb=a}a=Gfb;return a}}}); var y_=x_;y_.prototype.debouncedComputeVariants=y_.prototype.debouncedComputeVariants;w([P(X.YtRendererBehavior),x("design:type",Object)],y_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],y_.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],y_.prototype,"componentBehavior",void 0);w([P(TH),x("design:type",Object)],y_.prototype,"ironResizableBehavior",void 0);w([R(),x("design:type",Object)],y_.prototype,"data",void 0); w([R(),x("design:type",Object)],y_.prototype,"variantsExpanded",void 0);w([R(),x("design:type",Object)],y_.prototype,"hideShowMoreLessVariantButton",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y_.prototype,"initialized",void 0);w([CE("#items"),x("design:type",HTMLDivElement)],y_.prototype,"items",void 0);w([CE("#container"),x("design:type",HTMLDivElement)],y_.prototype,"container",void 0); w([CE("#more-variants-button"),x("design:type",HTMLElement)],y_.prototype,"moreVariantsButton",void 0);w([BE("data"),x("design:type",String),x("design:paramtypes",[])],y_.prototype,"selectedOptionName",null);w([U("data","variantsExpanded"),S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y_.prototype,"debouncedComputeVariants",null);w([BE("data"),x("design:type",String),x("design:paramtypes",[])],y_.prototype,"displayType",null); w([BE("displayType"),x("design:type",Object),x("design:paramtypes",[])],y_.prototype,"variantItemsClassname",null);y_=w([V({is:"ytd-product-details-variant-renderer"})],y_);var z_=function(){return O.apply(this,arguments)||this}; p(z_,O);z_.prototype.dataChanged=function(){""!==this.data.additionalFeesText&&(this.showAdditionalFees=!0)}; z_.prototype.configureRendererStamper=function(){return{"data.imageCarouselRenderer":{id:"image-carousel-renderer",mapping:{productDetailsImageCarouselRenderer:"ytd-product-details-image-carousel-renderer"}},"data.variants":{id:"variants",mapping:{productDetailsVariantRenderer:"ytd-product-details-variant-renderer"}},"data.offersContainerRenderer":{id:"offers",mapping:{productDetailsOffersContainerRenderer:"ytd-product-details-offers-container-renderer"}},"data.informationButton":{id:"information-button", mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(z_.prototype,{showPurchaseData:{configurable:!0,enumerable:!0,get:function(){var a,b;return!(null===(a=this.data)||void 0===a||!a.formattedFromMerchantText)&&!(null===(b=this.data)||void 0===b||!b.primaryPurchaseButtonRenderer)}}, showBrandText:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.formattedByBrandText)}}, showBrandLogo:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.brandLogoUrl)}}, showOffers:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.offersContainerRenderer)}}, showBuySeparator:{configurable:!0,enumerable:!0,get:function(){return this.showOffers&&this.showPurchaseData}}, showBuyCard:{configurable:!0,enumerable:!0,get:function(){return this.showOffers||this.showPurchaseData}}, heroOfferPrice:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d,f,h=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.offersContainerRenderer)||void 0===b?void 0:b.productDetailsOffersContainerRenderer)||void 0===c?void 0:c.offers;return h&&0
\n
\n \n
\n
\n
\n
[[getSimpleString(data.title)]]
\n
\n
\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dfb){var d=document.createElement("template");d.innerHTML=""; Dfb=d}d=Dfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Efb=a}a=Efb;return a}}}); var A_=z_;A_.prototype.dataChanged=A_.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],A_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],A_.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],A_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],A_.prototype,"data",void 0);w([R(),x("design:type",Boolean)],A_.prototype,"showAdditionalFees",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A_.prototype,"dataChanged",null);w([CE("#image-carousel-renderer"),x("design:type",t_)],A_.prototype,"imageCarouselRenderer",void 0);w([CE("#variants"),x("design:type",y_)],A_.prototype,"productDetailsVariantRenderer",void 0);w([CE("#offersContainerRenderer"),x("design:type",w_)],A_.prototype,"productDetailsOffersContainerRenderer",void 0); w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showPurchaseData",null);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showBrandText",null);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showBrandLogo",null);w([BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showOffers",null); w([BE("showOffers","showPurchaseData"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showBuySeparator",null);w([BE("showOffers","showPurchaseData"),x("design:type",Boolean),x("design:paramtypes",[])],A_.prototype,"showBuyCard",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],A_.prototype,"heroOfferPrice",null);A_=w([V({is:"ytd-product-details-renderer"})],A_);var Hfb;var Ifb;TO("vcBalanceRenderer","vcBalanceRenderer","ytd-vc-balance-renderer");var B_=function(){return O.apply(this,arguments)||this}; p(B_,O);g.Object.defineProperties(B_.prototype,{formattedAmount:{configurable:!0,enumerable:!0,get:function(){return this.vcBalanceEntity&&this.vcBalanceEntity.formattedAmount?this.vcBalanceEntity.formattedAmount:""}}, vcBalanceAriaLabel:{configurable:!0,enumerable:!0,get:function(){return this.vcBalanceEntity&&this.vcBalanceEntity.accessibilityFormattedAmount?this.vcBalanceEntity.accessibilityFormattedAmount:""}}}); g.Object.defineProperties(B_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ifb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hfb){var d=document.createElement("template");d.innerHTML="";Hfb=d}d=Hfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ifb=a}a=Ifb; return a}}}); var C_=B_;w([P(X.YtRendererBehavior),x("design:type",Object)],C_.prototype,"ytRendererBehavior",void 0);w([P(CQ),x("design:type",Object)],C_.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],C_.prototype,"data",void 0);w([R({selectorArgs:["data.vcBalanceEntityKey"],selector:function(a,b){return ML(a.entities,"vcBalanceEntity",b)}}), x("design:type",Object)],C_.prototype,"vcBalanceEntity",void 0);w([BE("vcBalanceEntity"),x("design:type",String),x("design:paramtypes",[])],C_.prototype,"formattedAmount",null);w([BE("vcBalanceEntity"),x("design:type",String),x("design:paramtypes",[])],C_.prototype,"vcBalanceAriaLabel",null);C_=w([V({is:"ytd-vc-balance-renderer"})],C_);var Jfb;var Kfb;var D_=function(){return O.apply(this,arguments)||this}; p(D_,O);D_.prototype.configureRendererStamper=function(){return{"data.vcIcon":{id:"vc-icon",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}}}}; g.Object.defineProperties(D_.prototype,{vcBalanceWidgetStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style:"VC_BALANCE_WIDGET_STYLE_UNKNOWN"}}}); g.Object.defineProperties(D_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kfb){var a=document.createElement("template");a.innerHTML="
\n
\n

[[formattedAmount]]

\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jfb){var d=document.createElement("template");d.innerHTML=""; Jfb=d}d=Jfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kfb=a}a=Kfb;return a}}}); var E_=D_;w([P(X.YtRendererBehavior),x("design:type",Object)],E_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],E_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],E_.prototype,"data",void 0);w([R(),x("design:type",String)],E_.prototype,"formattedAmount",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],E_.prototype,"ariaLabel",void 0); w([R({reflectToAttribute:!0}),BE("data.style"),x("design:type",String),x("design:paramtypes",[])],E_.prototype,"vcBalanceWidgetStyle",null);E_=w([fO({is:"yt-vc-balance-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],E_);var Lfb;var Mfb;var F_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-ad-primary-video-renderer-playing":"onPlayerReady_"};return a}; p(F_,O);e=F_.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more_vert"}}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.updateChannelBanner_()}; e.dataChanged_=function(){this.updateChannelBanner_()}; e.updateChannelBanner_=function(){if(this.data&&this.data.channelBanner){var a=wO(this.data.channelBanner.thumbnails,this.clientWidth);a&&(a.startsWith("//")&&(a="https:"+a),this.classList.add("channel-banner"),this.updateStyles({"--ytvmh-channel-banner":"url("+a+")"}))}}; e.onPlayerReady_=function(){this.onIronResize_()}; e.onIronResize_=function(){211>this.clientWidth?this.classList.add("no-thumbnail"):this.classList.remove("no-thumbnail");var a=this.$$("#banner");a&&(a.style.height=602>this.clientWidth?vh(.273*a.clientWidth,!0):vh(.165*a.clientWidth,!0))}; g.Object.defineProperties(F_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mfb){var a=document.createElement("template");a.innerHTML="\n\n
\n
\n \n \n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lfb){var d=document.createElement("template");d.innerHTML=""; Lfb=d}d=Lfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mfb=a}a=Mfb;return a}}}); var G_=F_;G_.prototype.onIronResize_=G_.prototype.onIronResize_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],G_.prototype,"ironResizableBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],G_.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],G_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],G_.prototype,"ytRendererstamperBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],G_.prototype,"data",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G_.prototype,"onIronResize_",null);G_=w([V({is:"ytd-video-masthead-ad-advertiser-info-renderer"})],G_);var Nfb;var Ofb;var H_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"};a.isLocked_=!1;return a}; p(H_,O);e=H_.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.maybeExpand_=function(){this.isLocked_||this.expanded||(this.expanded=!0)}; e.onExpandedChanged_=function(){this.expanded&&this.ytActionSenderBehavior.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this])}; e.onMouseOver_=function(){this.maybeExpand_()}; e.onTap_=function(){this.maybeExpand_()}; e.onExpandableTileExpanding_=function(a){a!=this&&(this.expanded=!1)}; e.onExpandableTileLockAndCollapse_=function(a){this.isLocked_=!0;a!=this&&(this.expanded=!1)}; e.onExpandableTileUnlock_=function(){this.isLocked_=!1}; g.Object.defineProperties(H_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ofb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nfb){var d=document.createElement("template");d.innerHTML=""; Nfb=d}d=Nfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ofb=a}a=Ofb;return a}}}); var I_=H_;I_.prototype.onTap_=I_.prototype.onTap_;I_.prototype.onMouseOver_=I_.prototype.onMouseOver_;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],I_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],I_.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],I_.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],I_.prototype,"data",void 0); w([R({observer:"onExpandedChanged_",reflectToAttribute:!0}),x("design:type",Object)],I_.prototype,"expanded",void 0);w([S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],I_.prototype,"onMouseOver_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],I_.prototype,"onTap_",null);I_=w([V({is:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer"})],I_);var Pfb;var Qfb;var J_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-video-masthead-expandable-tile-expanding":"onExpandableTileExpanding_","ytd-video-masthead-expandable-tile-lock-and-collapse":"onExpandableTileLockAndCollapse_","ytd-video-masthead-expandable-tile-unlock":"onExpandableTileUnlock_"};a.playbackFinished_=!1;return a}; p(J_,O);e=J_.prototype;e.configureRendererStamper=function(){return{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.created=function(){this.playerManager_=new TN}; e.ready=function(){var a=this;kVa(this.playerManager_,this.$.player,function(){return a.onPlaybackEnded()}); this.$["replay-button"].addEventListener("click",function(){var b;(null===(b=a.data)||void 0===b?0:b.navigationEndpoint)&&a.fire("yt-navigate",{endpoint:a.data.navigationEndpoint})})}; e.onPlaybackEnded=function(){this.classList.remove("video-playing");this.classList.add("video-ended");this.unlockExpandableTiles_();this.playbackFinished_=!0}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.async(function(){return a.maybePlayVideo_()})}; e.maybePlayVideo_=function(){this.expanded&&this.isAttached&&this.data&&this.data.videoId&&!this.playbackFinished_&&(this.classList.add("video-playing"),this.lockAndCollapseExpandableTiles_(),this.playerManager_.playVideo())}; e.dataChanged_=function(){this.data&&(lVa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs,this.data.playerParams),this.maybePlayVideo_())}; e.getPlayerPromise=function(){return this.playerManager_.getPlayerPromise()}; e.onYtToggleButton_=function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()}; e.onYtNavigate_=function(a){var b=mVa(a.detail.endpoint),c=nVa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:cJ(b,c,ik("desktop_polymer_video_masthead_session_tempdata_ttl")))}; e.maybeExpand_=function(){this.isLocked_||this.expanded||(this.expanded=!0)}; e.onExpandedChanged_=function(){this.expanded?(this.ytActionSenderBehavior.sendOptionalAction("ytd-video-masthead-expandable-tile-expanding",[this]),this.maybePlayVideo_()):this.playerManager_.stopVideo()}; e.onMouseOver_=function(){this.maybeExpand_()}; e.onTap_=function(){this.maybeExpand_()}; e.onExpandableTileExpanding_=function(a){a!=this&&(this.playerManager_.stopVideo(),this.expanded=!1)}; e.onExpandableTileLockAndCollapse_=function(a){a!=this&&(this.isLocked_=!0,this.expanded=!1)}; e.onExpandableTileUnlock_=function(){this.isLocked_=!1}; e.lockAndCollapseExpandableTiles_=function(){this.ytActionSenderBehavior.sendAction("ytd-video-masthead-expandable-tile-lock-and-collapse",[this])}; e.unlockExpandableTiles_=function(){this.ytActionSenderBehavior.sendAction("ytd-video-masthead-expandable-tile-unlock")}; g.Object.defineProperties(J_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qfb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pfb){var d=document.createElement("template");d.innerHTML=""; Pfb=d}d=Pfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qfb=a}a=Qfb;return a}}}); var K_=J_;K_.prototype.onTap_=K_.prototype.onTap_;K_.prototype.onMouseOver_=K_.prototype.onMouseOver_;K_.prototype.onYtNavigate_=K_.prototype.onYtNavigate_;K_.prototype.onYtToggleButton_=K_.prototype.onYtToggleButton_;w([P(Z),x("design:type",Object)],K_.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],K_.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],K_.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],K_.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],K_.prototype,"data",void 0);w([R({observer:"onExpandedChanged_",reflectToAttribute:!0}),x("design:type",Object)],K_.prototype,"expanded",void 0);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],K_.prototype,"onYtToggleButton_",null); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K_.prototype,"onYtNavigate_",null);w([S("mouseover"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K_.prototype,"onMouseOver_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K_.prototype,"onTap_",null);K_=w([V({is:"ytd-video-masthead-ad-expandable-video-tile-renderer"})],K_);var Rfb;var Sfb;var L_=function(){return O.apply(this,arguments)||this}; p(L_,O);L_.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; g.Object.defineProperties(L_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sfb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n \n \n \n \n
\n
\n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rfb){var d=document.createElement("template");d.innerHTML=""; Rfb=d}d=Rfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sfb=a}a=Sfb;return a}}}); var M_=L_;w([P(X.YtRendererBehavior),x("design:type",Object)],M_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],M_.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],M_.prototype,"data",void 0);M_=w([V({is:"ytd-video-masthead-ad-primary-video-overlay-renderer"})],M_);var Tfb;var Ufb;var N_=function(){return O.apply(this,arguments)||this}; p(N_,O);e=N_.prototype;e.configureRendererStamper=function(){return{"data.muteButton":{id:"mute-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer"}},"data.replayButton":{id:"replay-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.thumbnailOverlays":{id:"thumbnail-overlays",mapping:{thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer"}}}}; e.created=function(){this.playerManager_=new TN}; e.ready=function(){var a=this;kVa(this.playerManager_,this.$.player,function(){return a.onPlaybackEnded()}); this.$["replay-button"].addEventListener("click",function(){a.data&&a.data.navigationEndpoint&&a.fire("yt-navigate",{endpoint:a.data.navigationEndpoint})})}; e.onPlaybackEnded=function(){this.classList.remove("video-playing");this.classList.add("video-ended")}; e.dataChanged_=function(){var a=this;this.data&&("string"===typeof this.data.videoId&&(lVa(this.playerManager_,this.data.videoId,this.data.playbackStartMs,this.data.playbackDurationMs,this.data.playerParams||void 0),this.playerManager_.playVideo(),this.classList.add("video-playing"),this.getPlayerPromise().then(function(){a.ytActionSenderBehavior.sendAction("ytd-video-masthead-ad-primary-video-renderer-playing")})),this.data.isWidescreen&&this.$["player-container"].classList.add("widescreen"))}; e.getPlayerPromise=function(){return this.playerManager_.getPlayerPromise()}; e.onYtToggleButton_=function(a){a.detail.toggled?this.playerManager_.mute():this.playerManager_.unMute()}; e.onYtNavigate_=function(a){var b=mVa(a.detail.endpoint),c=nVa(this.data.clickthroughReportingData);b&&c&&(a.detail.endpoint.watchEndpoint?a.detail.tempData=c:cJ(b,c,ik("desktop_polymer_video_masthead_session_tempdata_ttl")))}; g.Object.defineProperties(N_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ufb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tfb){var d=document.createElement("template");d.innerHTML=""; Tfb=d}d=Tfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ufb=a}a=Ufb;return a}}}); var O_=N_;O_.prototype.onYtNavigate_=O_.prototype.onYtNavigate_;O_.prototype.onYtToggleButton_=O_.prototype.onYtToggleButton_;w([P(Z),x("design:type",Object)],O_.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],O_.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],O_.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],O_.prototype,"data",void 0); w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],O_.prototype,"onYtToggleButton_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],O_.prototype,"onYtNavigate_",null);O_=w([V({is:"ytd-video-masthead-ad-primary-video-renderer"})],O_);var Vfb;var Wfb;var P_=function(){var a=O.apply(this,arguments)||this;a.collapsed=!1;a.isServerSideContext_=!1;a.impressionResolver_=Ui();a.activeViewMeasurementDataResolver_=Ui();a.MASTHEAD_PREF_KEY_="HIDDEN_MASTHEAD_ID";a.actionMap={"yt-mute-ad-action":"handleMuteAd_"};return a}; p(P_,O);e=P_.prototype;e.configureRendererStamper=function(){return{"data.expandableTiles":{id:"expandable-tile-container",mapping:{videoMastheadAdExpandableThumbnailTileRenderer:"ytd-video-masthead-ad-expandable-thumbnail-tile-renderer",videoMastheadAdExpandableVideoTileRenderer:"ytd-video-masthead-ad-expandable-video-tile-renderer"}},"data.showAdRenderer":{id:"show-ad",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.ready=function(){var a=this;this.$["show-ad"].addEventListener("click",this.expandAd_.bind(this));this.addEventListener("yt-action",function(b){if("yt-service-request"==b.detail.actionName){var c=b.detail.args[1];c.videoMastheadAdMuteCommand&&(a.collapseAd_(c.videoMastheadAdMuteCommand.encryptedMastheadId),b.stopPropagation())}}); this.isServerSideContext_=!this.classList.contains("client-side")}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.async(this.ironResizableBehavior.notifyResize);this.impressionResolver_.promise.then(function(b){a.collapsed||(b.forEach(function(c){Xn(c.baseUrl)}),a.data.impressionCommand=void 0)}); this.activeViewMeasurementDataResolver_.promise.then(function(b){UP(a.ytdActiveViewBehavior,b,14)})}; e.dataChanged_=function(){var a,b;(null===(a=this.data.impressionCommand)||void 0===a?0:a.loggingUrls)&&this.impressionResolver_.resolve(this.data.impressionCommand.loggingUrls);(null===(b=this.data)||void 0===b?0:b.activeView)&&this.activeViewMeasurementDataResolver_.resolve(this.data.activeView);var c=this.get("data.showAdRenderer.buttonRenderer.command.videoMastheadAdMuteCommand");c&&this.restoreCollapsedState_(c.encryptedMastheadId);this.collapsed&&(this.data.primaryVideo&&(this.data.primaryVideo= void 0),this.data.expandableTiles&&(this.data.expandableTiles=void 0))}; e.computeWidescreen_=function(a){return!!(a&&a.videoMastheadAdPrimaryVideoRenderer&&a.videoMastheadAdPrimaryVideoRenderer.isWidescreen)}; e.computeExpandable_=function(a){return!!(a&&0
\n
\n \n \n
\n \n
\n
\n \n \n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(MV().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vfb){var d=document.createElement("template");d.innerHTML=""; Vfb=d}d=Vfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wfb=a}a=Wfb;return a}}}); var Q_=P_;Q_.prototype.onIronResize_=Q_.prototype.onIronResize_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],Q_.prototype,"ironResizableBehavior",void 0);w([P(VP),x("design:type",Object)],Q_.prototype,"ytdActiveViewBehavior",void 0);w([P(uQ),x("design:type",Object)],Q_.prototype,"ytdGridStateAwareBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],Q_.prototype,"ytActionHandlerBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],Q_.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],Q_.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],Q_.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeWidescreen_(data.primaryVideo)"}),x("design:type",Boolean)],Q_.prototype,"widescreen",void 0); w([R({reflectToAttribute:!0,computed:"computeExpandable_(data.expandableTiles)"}),x("design:type",Boolean)],Q_.prototype,"expandable",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],Q_.prototype,"collapsed",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q_.prototype,"onIronResize_",null);Q_=w([V({is:"ytd-video-masthead-ad-v3-renderer"})],Q_);var Xfb;var Yfb;var R_=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-button-refresh-action":"handleButtonRefreshAction_","yt-insert-channel-tab-command":"handleInsertTabCommand_","ytd-refresh-channel-tab-action":"handleRefreshChannelTabAction_","yt-unsubscribe-action":"handleUnsubscribeAction_"};return a}; p(R_,O);e=R_.prototype; e.configureRendererStamper=function(){return{"data.purchaseButton":{id:"purchase-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.sponsorButton":{id:"sponsor-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}},"data.editChannelButtons":{id:"edit-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}, "data.otherButtons":{id:"other-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.bannerEditor":{id:"banner-editor",mapping:{channelBannerEditorRenderer:"ytd-channel-banner-editor-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.data&&this.dataChanged_(this.data)}; e.handleButtonRefreshAction_=function(a){a.buttonRefreshAction&&this.set("data.sponsorButton",a.buttonRefreshAction.membershipButton)}; e.handleInsertTabCommand_=function(a){if(a.insertChannelTabCommand){var b=a.insertChannelTabCommand;b.externalChannelId==this.data.channelId&&(b.tabIdentifier&&this.ytdTabbedHeaderBehavior.tabs.some(function(c){return c.tabRenderer&&c.tabRenderer.tabIdentifier==b.tabIdentifier})||this.splice("tabs",b.tabIndex||-1,0,b.tab))}}; e.handleRefreshChannelTabAction_=function(a){this.ytdTabbedHeaderBehavior.selected&&this.ytdTabbedHeaderBehavior.tabs[this.ytdTabbedHeaderBehavior.selected].tabRenderer.tabIdentifier==a&&this.fire("yt-navigate",{endpoint:this.ytdGuideStateAwareBehavior.activeEndpoint})}; e.dataChanged_=function(){var a=this.hasChannelArt;this.hasChannelArt=!1;if(this.data&&this.data.banner){var b=wO(this.data.banner.thumbnails,this.clientWidth);b&&(0==b.indexOf("//")&&(b="https:"+b),this.hasChannelArt=!0,this.updateStyles({"--yt-channel-banner":"url("+b+")"}))}this.hasChannelArt!=a&&this.$.header.fire("iron-resize")}; e.onBannerUpdated_=function(a,b){a=1
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xfb){var d=document.createElement("template");d.innerHTML=""; Xfb=d}d=Xfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yfb=a}a=Yfb;return a}}}); var S_=R_;S_.prototype.observeLightsourcePalette_=S_.prototype.observeLightsourcePalette_;S_.prototype.onBannerUpdated_=S_.prototype.onBannerUpdated_;w([P(s2a),x("design:type",Object)],S_.prototype,"ytdTabbedHeaderBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],S_.prototype,"ytActionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],S_.prototype,"ytRendererstamperBehavior",void 0);w([P(xQ),x("design:type",Object)],S_.prototype,"ytdGuideStateAwareBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],S_.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],S_.prototype,"hasChannelArt",void 0);w([S("yt-banner-updated"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],S_.prototype,"onBannerUpdated_",null); w([U("data.headerColorPalette.lightsourceColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S_.prototype,"observeLightsourcePalette_",null);S_=w([V({is:"ytd-c4-tabbed-header-renderer"})],S_);var Zfb;var $fb;var agb=function(a,b,c,d,f,h,l,m,n){this.minWidth_=a;this.minHeight_=b;this.recommendedWidth_=c;this.recommendedHeight_=d;this.maxFileSize_=f;this.title_=h;this.bannerGalleryTitle_=l;this.cropMode_="ytcb";this.channelId_=m;this.pickerToken_=n;a=ZTa("yt-banner");b=a.addView;c=new oE("youtubebanner").addUploadMetadata("silo_id","19");c.opts.ytMaxFileSize=this.maxFileSize_;d=this.recommendedHeight_;c.opts.ytRecWidth=this.recommendedWidth_;c.opts.ytRecHeight=d;b.call(a,c);a.addView(new gD);a.addView(new gD().setType("ytbanner").setLabel(this.bannerGalleryTitle_)); b=a.setTitle(this.title_).setSize(1E3);b.urlParamMap_.set("thumbs","orig");b.setMinSize(this.minWidth_,this.minHeight_).urlParamMap_.set("cropMode",this.cropMode_);this.pickerToken_&&a.setSecretToken(this.pickerToken_);this.builder_=a;this.picker_=null}; agb.prototype.open=function(){var a=this;return new Oi(function(b,c){a.builder_.setCallback(function(d){"picked"==d.action?b(d):"cancel"==d.action&&c(Error("banner image edit cancel"))}); a.picker_&&a.picker_.dispose();a.picker_=a.builder_.build();a.picker_.setVisible(!0)})}; agb.prototype.dispose=function(){this.picker_&&(this.picker_.dispose(),this.picker_=null)};function T_(a,b,c,d){return window.spf?bgb(a,b,c,void 0===d?!1:d):cgb(a,b)} function bgb(a,b,c,d){var f=null,h=new Oi(function(m,n){var r={};if(b){r.method=b.method;var v=b.postParams||{};aia(a,b)&&(v[A("XSRF_FIELD_NAME",void 0)]=A("XSRF_TOKEN",void 0));r.postData=Hd(v);b.type&&(r.type=b.type);v=b.headers}r.headers=Sha(a,v);N("debug_forward_web_query_parameters")&&(a=ul(a));r.experimental_headers=r.headers;r.onError=function(z){z.err&&z.xhr&&(z.err.params={url:z.xhr.responseURL,response:z.xhr.responseText.substr(0,64)});n(z.err)}; r.onPartDone=function(z){c&&c.call(null,z.part)}; r.onDone=function(z){var C=dgb(z.response,"xsrf_token");Fd(window.location.href,a)&&C&&rd("XSRF_TOKEN",C);if(C=dgb(z.response,"service_worker_killswitch"))rd("SERVICE_WORKER_KILLSWITCH",C),PVa();m(z.response)}; f=spf.request(a,r)}),l=h.then(egb); Xi(l,function(m){var n=m instanceof Yi;d&&n&&h.cancel("canceled requestPromise");var r=m&&m.hasOwnProperty("params")&&m.params.response?m.params.response:"";if(m instanceof Error)if(r){if(n)m.sampleWeight=0;else if(")]}'\n{\"reload\":\"now\"}"==r)m.sampleWeight=0;else{n=m.message||"";var v={original:n,url:a},z=n.match(/position:?\s*(\d+)/);if(z){z=z&&Number(z[1])?Number(z[1]):0;var C=Math.max(z-25,0);v.position=z;v.response=r.substring(C,z+25)}else v.response=r.substring(0,50);an(m,v);n=0<=n.indexOf("<")|| 0<=n.indexOf("end of ")||0<=n.indexOf("Unterminated string")||n.indexOf("Unexpected EOF");try{m.message="JSON parse error"}catch(J){}if(!n)for(v=r.length,z=!1,C=0;CMath.random()&&(m=Error("No timing found"),m.params=l,Am(m)),l={responseStart:-1}):l={responseStart:0},n.timing=n.timing||{},Wa(n.timing,l),f(n))}else h(Error("HTTP error: "+l.status))}; (c=vl(a,b))||h(Error("HTTP error: "+c.status))}); N("cancel_pending_navs")&&Xi(d,function(){c.abort()}); return d} function dgb(a,b){var c=a[b],d=a.parts;"multipart"==a.type&&d&&(c=(a=d.find(function(f){return b in f}))&&a[b]); return c} ;var fgb=function(a){this.channelId_=a}; fgb.prototype.upload=function(a){var b="";a.viewToken&&(b=a.viewToken[2].type);var c=a.docs[0];a=c.crop;b={channel_id:this.channelId_,fife_url:c.thumbnails[0].url,photo_id:c.id,is_gallery_image:"ytbanner"==b};a&&(b.crop_top=a.top,b.crop_right=a.right,b.crop_bottom=a.bottom,b.crop_left=a.left);return T_("/channels_profile_ajax?action_update_banner_image=1",{method:"POST",postParams:b})};var U_=function(){return O.apply(this,arguments)||this}; p(U_,O);e=U_.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","button");this.hasAttribute("tabindex")||this.setAttribute("tabindex","0")}; e.detached=function(){this.picker&&this.picker.dispose()}; e.dataChanged=function(){this.uploader=this.picker=this.message=null}; e.computeAriaLabel=function(a){return a}; e.onTap=function(){var a;null!==(a=this.data)&&void 0!==a&&a.editBannerCommand||(this.message=null,this.picker||(this.picker=new agb(this.data.bannerMinWidth||0,this.data.bannerMinHeight||0,this.data.bannerRecommendedWidth||0,this.data.bannerRecommendedHeight||0,this.data.bannerMaxFileSizeInMegabytes||0,this.data.editorTitle||"",this.data.galleryViewTitle||"",this.data.channelId||"",this.data.onepickToken||"")),this.picker.open().then(this.handleBannerPicked.bind(this),La))}; e.handleBannerPicked=function(a){this.uploader||(this.uploader=new fgb(this.data.channelId||""));this.message=this.data.uploadingText;this.uploader.upload(a).then(this.handleBannerUploadSucceeded.bind(this),this.handleBannerUploadFailed.bind(this))}; e.handleBannerUploadSucceeded=function(a){a&&a.errors?this.handleBannerUploadFailed(a):(this.fire("yt-banner-updated",a),this.message=null)}; e.handleBannerUploadFailed=function(a){this.message=a&&a.errors&&a.errors.length?a.errors[0]:null}; g.Object.defineProperties(U_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$fb){var a=document.createElement("template");a.innerHTML="\n \n [[ariaLabel]]\n
[[message]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zfb){var d=document.createElement("template");d.innerHTML=""; Zfb=d}d=Zfb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$fb=a}a=$fb;return a}}}); var V_=U_;w([P(W.YtActionSenderBehavior),x("design:type",Object)],V_.prototype,"ytActionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],V_.prototype,"componentBehavior",void 0);w([P(Polymer.IronButtonState),x("design:type",Object)],V_.prototype,"ironButtonState",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],V_.prototype,"data",void 0); w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel(data.buttonLabel)"}),x("design:type",String)],V_.prototype,"ariaLabel",void 0);w([R(),x("design:type",Object)],V_.prototype,"message",void 0);w([R(),x("design:type",Object)],V_.prototype,"picker",void 0);w([R(),x("design:type",Object)],V_.prototype,"uploader",void 0);V_=w([V({is:"ytd-channel-banner-editor-renderer"})],V_);var ggb;var igb;var W_=function(){return O.apply(this,arguments)||this}; p(W_,O);e=W_.prototype;e.ready=function(){this.$.form.addEventListener("submit",this.onSubmit.bind(this))}; e.onDataChanged=function(){var a;(null===(a=this.data)||void 0===a?0:a.selected)&&this.ytdExpandableInputBehavior.setShowInput(!0)}; e.closeOnOutsideClickHandler=function(){this.set("data.expandedText","")}; e.openOnClickHandler=function(){this.$.input.focus()}; e.onSubmit=function(a){a.preventDefault();return!1}; e.submitOnEnterKeyUp=function(a){var b,c;if(13===a.keyCode){a=this.data.endpoint;var d=y.unsafeClone(a);(null===(c=null===(b=null===d||void 0===d?void 0:d.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?(d.commandMetadata.webCommandMetadata.url=Md(d.commandMetadata.webCommandMetadata.url,"query",this.data.expandedText),d.browseEndpoint&&(d.browseEndpoint.query=this.data.expandedText),this.fire("yt-navigate",{endpoint:d})):Zm(new Ul("Error: Trying to navigate to an endpoint without url", a))}}; g.Object.defineProperties(W_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===igb){var a=document.createElement("template");a.innerHTML="\n \n\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ggb){var d=document.createElement("template");d.innerHTML=""; ggb=d}d=ggb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);igb=a}a=igb;return a}}}); var X_=W_;X_.prototype.onDataChanged=X_.prototype.onDataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],X_.prototype,"ytRendererBehavior",void 0);w([P(j2a.YtdExpandableInputBehavior),x("design:type",Object)],X_.prototype,"ytdExpandableInputBehavior",void 0);w([R(),x("design:type",Object)],X_.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X_.prototype,"onDataChanged",null); X_=w([V({is:"ytd-expandable-tab-renderer"})],X_);var jgb;var kgb;var Y_=function(){var a=O.apply(this,arguments)||this;a.ariaLabel=YK("EDIT_AVATAR_LABEL",void 0,"Edit channel icon");return a}; p(Y_,O);Y_.prototype.attached=function(){this.setAttribute("role","button");this.setAttribute("tabindex","0")}; Y_.prototype.computeHref=function(a){var b;return(null===(b=null===a||void 0===a?void 0:a.urlEndpoint)||void 0===b?0:b.url)?this.componentBehavior.computeHref_(a):null}; Y_.prototype.onTap=function(){var a,b;null===(a=this.data)||void 0===a||!a.editAvatarServiceEndpoint||(null===(b=this.data.editAvatarServiceEndpoint.urlEndpoint)||void 0===b?0:b.url)||this.ytActionSenderBehavior.sendServiceRequestAction([this.data.editAvatarServiceEndpoint])}; g.Object.defineProperties(Y_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kgb){var a=document.createElement("template");a.innerHTML="\n \n \n [[ariaLabel]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jgb){var d=document.createElement("template");d.innerHTML=""; jgb=d}d=jgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kgb=a}a=kgb;return a}}}); var Z_=Y_;w([P(Polymer.IronButtonState),x("design:type",Object)],Z_.prototype,"ironButtonState",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],Z_.prototype,"ytActionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],Z_.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],Z_.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],Z_.prototype,"ariaLabel",void 0);Z_=w([V({is:"ytd-channel-avatar-editor"})],Z_);var lgb;var mgb;var $_=function(){return O.apply(this,arguments)||this}; p($_,O);$_.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; $_.prototype.dataChanged=function(){if(this.data){var a=this.hasBannerArt;this.hasBannerArt=!1;if(this.data&&this.data.banner){var b=wO(this.data.banner.thumbnails,this.clientWidth);b&&(0===b.indexOf("//")&&(b="https:"+b),this.hasBannerArt=!0,this.updateStyles({"--ytd-interactive-tabbed-header-renderer-banner-url":"url("+b+")"}))}this.hasBannerArt!==a&&this.$.header.fire("iron-resize")}}; g.Object.defineProperties($_,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mgb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
[[getSimpleString(data.description)]]
[[getSimpleString(data.metadata)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lgb){var d=document.createElement("template");d.innerHTML=""; lgb=d}d=lgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mgb=a}a=mgb;return a}}}); var a0=$_;a0.prototype.dataChanged=a0.prototype.dataChanged;w([P(s2a),x("design:type",Object)],a0.prototype,"ytdTabbedHeaderBehavior",void 0);w([P(Z),x("design:type",Object)],a0.prototype,"ytRendererstamperBehavior",void 0);w([P(uQ),x("design:type",Object)],a0.prototype,"ytdGridStateAwareBehavior",void 0);w([P(xQ),x("design:type",Object)],a0.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],a0.prototype,"componentBehavior",void 0); w([R(),x("design:type",Object)],a0.prototype,"data",void 0);w([R(),x("design:type",Number)],a0.prototype,"selected",void 0);w([R(),x("design:type",Boolean)],a0.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],a0.prototype,"hasBannerArt",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a0.prototype,"dataChanged",null);a0=w([V({is:"ytd-interactive-tabbed-header-renderer"})],a0);var ngb;var ogb;var b0=function(){return O.apply(this,arguments)||this}; p(b0,O);b0.prototype.configureRendererStamper=function(){return{"data.leftActions":{id:"left-actions",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(b0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ogb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ngb){var d=document.createElement("template");d.innerHTML=""; ngb=d}d=ngb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ogb=a}a=ogb;return a}}}); var c0=b0;w([P(X.YtRendererBehavior),x("design:type",Object)],c0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],c0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],c0.prototype,"data",void 0);c0=w([V({is:"ytd-page-footer-renderer"})],c0);var pgb;var qgb;var d0=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-open-one-pick-add-video-modal-command":"onYtOnePickerAddVideoCommand"};a.responsive=N("kevlar_playlist_responsive");return a}; p(d0,O); d0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{playlistSidebarPrimaryInfoRenderer:{component:"ytd-playlist-sidebar-primary-info-renderer",noInjection:!0},playlistSidebarSecondaryInfoRenderer:{component:"ytd-playlist-sidebar-secondary-info-renderer",noInjection:!0},playlistSidebarTertiaryInfoRenderer:{component:"ytd-playlist-sidebar-tertiary-info-renderer",noInjection:!0},channelLegalInfoRenderer:{component:"ytd-channel-legal-info-renderer",params:{isCompact:!0},noInjection:!0}}}}}; d0.prototype.onYtOnePickerAddVideoCommand=function(a){a.openOnePickAddVideoModalCommand&&new aUa(a.openOnePickAddVideoModalCommand).show()}; g.Object.defineProperties(d0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qgb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pgb){var d=document.createElement("template");d.innerHTML=""; pgb=d}d=pgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qgb=a}a=qgb;return a}}}); var e0=d0;w([P(X.YtRendererBehavior),x("design:type",Object)],e0.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],e0.prototype,"ytActionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],e0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],e0.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],e0.prototype,"responsive",void 0);e0=w([V({is:"ytd-playlist-sidebar-renderer"})],e0);var rgb;var sgb;var f0=function(){var a=O.apply(this,arguments)||this;a.isEditing=!1;a.isMultiline=!1;return a}; p(f0,O);e=f0.prototype;e.onKeydown_=function(a){if(13===a.keyCode&&!this.isMultiline)this.onSave_();else if(27===a.keyCode)this.onCancel_()}; e.computeComponentStyle_=function(a){return a.style?a.style:"INLINE_FORM_STYLE_UNKNOWN"}; e.computeisMultiline=function(a){return a.formField&&a.formField.textInputFormFieldRenderer&&a.formField.textInputFormFieldRenderer.isMultiline?a.formField.textInputFormFieldRenderer.isMultiline:!1}; e.computeTextDisplayed=function(a,b){if(a)return a;if(b)return b}; e.onEdit_=function(){this.isEditing=!0;this.$["text-form"].focusTextInput()}; e.onSave_=function(){var a;if(this.$["text-form"].validate()){this.$["text-form"].save();var b=this.$["text-form"].value;b?this.set("data.textDisplayed",kL(b)):(null===(a=this.data)||void 0===a?0:a.placeholder)&&this.set("data.textDisplayed",this.data.placeholder);this.isEditing=!1}}; e.onCancel_=function(){var a=nL(this.data.textDisplayed);a==this.data.placeholder?this.$["text-form"].reset(""):this.$["text-form"].reset(a);this.isEditing=!1}; g.Object.defineProperties(f0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sgb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rgb){var d=document.createElement("template");d.innerHTML=""; rgb=d}d=rgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sgb=a}a=sgb;return a}}}); var g0=f0;g0.prototype.onKeydown_=g0.prototype.onKeydown_;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],g0.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],g0.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],g0.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],g0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g0.prototype,"data",void 0); w([R(),x("design:type",Object)],g0.prototype,"isEditing",void 0);w([R({reflectToAttribute:!0,computed:"computeComponentStyle_(data)"}),x("design:type",String)],g0.prototype,"componentStyle",void 0);w([R({computed:"computeisMultiline(data)"}),x("design:type",Object)],g0.prototype,"isMultiline",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],g0.prototype,"onKeydown_",null);g0=w([V({is:"ytd-inline-form-renderer"})],g0);var tgb;var ugb;var h0=function(){var a=O.apply(this,arguments)||this;a.hideCharCounter=!1;a.hideLabel=!1;a.noLabelFloat=!1;a.autoValidate=!0;a.invalid=!1;a.actionMap={"yt-update-text-input-form-field-renderer-command":"handleUpdateTextInputFormFieldRendererCommand"};return a}; p(h0,O);e=h0.prototype;e.reset=function(a){this.value=a&&this.data?this.data.value=a:"";this.input.invalid=!1;this.input.autoValidate=!1}; e.save=function(){this.data&&this.ytRendererBehavior.sendServiceRequestAction([this.data.onChange])}; e.focusTextInput=function(){this.input.focus()}; e.validate=function(){var a;if(!this.autoValidate)return!this.invalid;if(!this.input)return!1;if(N("web_show_regex_error_textarea")&&(null===(a=this.data)||void 0===a?0:a.isMultiline)&&null!=this.value&&this.data.validValueRegexp&&!RegExp("^"+this.data.validValueRegexp+"$").test(this.input.value))return this.input.autoValidate=!1,this.invalid=!0,!1;this.input.autoValidate=!0;return this.input.validate()}; e.valueChanged=function(a){N("web_show_regex_error_textarea")&&(this.invalid=!1);a||""===a?this.value=a:void 0!==a||this.value||(this.value="")}; e.computeLabel=function(a,b){return b?"":nL(a)}; e.computeAriaLabel=function(a,b){return b?nL(a):""}; e.computeErrorMessage=function(a,b,c,d){!a&&b?a=c||this.strings.REQUIRED_LABEL:(a=nL(d),a=Rb(a,"&")?"document"in t?Dba(a):Eba(a):a);return a}; e.computeType=function(a){return"TEXT_INPUT_FORM_FIELD_TYPE_PASSWORD"===a?"password":null}; e.onTextValueChanged=function(){this.validate()&&this.data&&this.data.key&&this.data.onChange&&this.set(this.data.key,this.input.value,this.data.onChange)}; e.handleUpdateTextInputFormFieldRendererCommand=function(a){(a=a.updateTextInputFormFieldRendererCommand)&&this.data&&this.data.id===a.id&&(void 0!==a.invalid&&(this.invalid=a.invalid),void 0!==a.invalidValueErrorMessage&&this.set("data.invalidValueErrorMessage",a.invalidValueErrorMessage))}; g.Object.defineProperties(h0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ugb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tgb){var d=document.createElement("template");d.innerHTML=""; tgb=d}d=tgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ugb=a}a=ugb;return a}}}); var i0=h0;i0.prototype.valueChanged=i0.prototype.valueChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],i0.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],i0.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],i0.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],i0.prototype,"value",void 0);w([R(),x("design:type",String)],i0.prototype,"pattern",void 0); w([R(),x("design:type",String)],i0.prototype,"errorMessage",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],i0.prototype,"componentStyle",void 0);w([R(),x("design:type",Object)],i0.prototype,"hideCharCounter",void 0);w([R(),x("design:type",Object)],i0.prototype,"hideLabel",void 0);w([R(),x("design:type",Object)],i0.prototype,"noLabelFloat",void 0);w([R(),x("design:type",Object)],i0.prototype,"autoValidate",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],i0.prototype,"invalid",void 0);w([R({value:{REQUIRED_LABEL:YK("REQUIRED_LABEL",void 0,"Required")}}),x("design:type",Object)],i0.prototype,"strings",void 0);w([CE("#input"),x("design:type",Object)],i0.prototype,"input",void 0);w([U("data.value"),x("design:type",Function),x("design:paramtypes",[String]),x("design:returntype",void 0)],i0.prototype,"valueChanged",null); i0=w([fO({is:"yt-text-input-form-field-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],i0);var vgb;var wgb;var j0=function(){var a=O.apply(this,arguments)||this;a.previousSelectValue=void 0;return a}; p(j0,O);j0.prototype.detached=function(){this.previousSelectValue=void 0}; j0.prototype.selectedValueChanged=function(){var a;-1!==this.selectedValue&&(void 0===this.previousSelectValue?this.previousSelectValue=this.selectedValue:this.previousSelectValue!==this.selectedValue&&null!==(a=this.data)&&void 0!==a&&a.key&&this.data.onChange&&(this.set(this.data.key,this.selectedValue,this.data.onChange),this.ytRendererBehavior.sendServiceRequestAction([this.data.onChange]),this.previousSelectValue=this.selectedValue))}; g.Object.defineProperties(j0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wgb){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vgb){var d=document.createElement("template");d.innerHTML="";vgb=d}d=vgb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);wgb=a}a=wgb;return a}}}); var k0=j0;k0.prototype.selectedValueChanged=k0.prototype.selectedValueChanged;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],k0.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],k0.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],k0.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],k0.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],k0.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Number)],k0.prototype,"selectedValue",void 0);w([U("selectedValue"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],k0.prototype,"selectedValueChanged",null);k0=w([V({is:"ytd-dropdown-form-field-renderer"})],k0);var xgb;var ygb;var l0=function(){var a=O.apply(this,arguments)||this;a.responsive=N("kevlar_playlist_responsive");a.actionMap={"yt-update-playlist-action":"onUpdatePlaylistAction_"};return a}; p(l0,O);e=l0.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{icon:"yt-icons:more"}}}},"data.playButtons":{id:"play-buttons",mapping:{buttonRenderer:{component:"ytd-button-renderer"},toggleButtonRenderer:{component:"ytd-toggle-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeIsCustomThumbnail_=function(a){return a?!!a.playlistCustomThumbnailRenderer:!1}; e.onYtNavigate_=function(a,b){if(b&&b.actions&&-1

"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xgb){var d=document.createElement("template");d.innerHTML=""; xgb=d}d=xgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ygb=a}a=ygb;return a}}}); var m0=l0;m0.prototype.onYtNavigate_=m0.prototype.onYtNavigate_;w([P(Z),x("design:type",Object)],m0.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],m0.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],m0.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],m0.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],m0.prototype,"data",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],m0.prototype,"responsive",void 0);w([R({reflectToAttribute:!0,computed:"computeIsCustomThumbnail_(data.thumbnailRenderer)"}),x("design:type",Boolean)],m0.prototype,"isCustomThumbnail",void 0);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[Event,Object]),x("design:returntype",void 0)],m0.prototype,"onYtNavigate_",null);m0=w([V({is:"ytd-playlist-sidebar-primary-info-renderer"})],m0);var zgb;var Agb;var n0=function(){return O.apply(this,arguments)||this}; p(n0,O);n0.prototype.computeOwnerVisibility=function(a){return!(!a.videoOwner&&!a.button)}; n0.prototype.configureRendererStamper=function(){return{"data.videoOwner":{id:"video-owner",mapping:{videoOwnerRenderer:"ytd-video-owner-renderer"}},"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; g.Object.defineProperties(n0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Agb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zgb){var d=document.createElement("template");d.innerHTML=""; zgb=d}d=zgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Agb=a}a=Agb;return a}}}); var o0=n0;w([P(X.YtRendererBehavior),x("design:type",Object)],o0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],o0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],o0.prototype,"data",void 0);o0=w([V({is:"ytd-playlist-sidebar-secondary-info-renderer"})],o0);var Bgb;var Cgb;var p0=function(){return O.apply(this,arguments)||this}; p(p0,O);p0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{gridShowRenderer:"ytd-grid-show-renderer"}}}}; g.Object.defineProperties(p0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cgb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bgb){var d=document.createElement("template");d.innerHTML=""; Bgb=d}d=Bgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cgb=a}a=Cgb;return a}}}); var q0=p0;w([P(X.YtRendererBehavior),x("design:type",Object)],q0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],q0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],q0.prototype,"data",void 0);q0=w([V({is:"ytd-playlist-sidebar-tertiary-info-renderer"})],q0);var Dgb;var Egb;var r0=function(){var a=O.apply(this,arguments)||this;a.expanded=!1;a.isCompact=!1;return a}; p(r0,O);e=r0.prototype;e.attached=function(){this.ytdAutoScrollBehavior.scrollTarget=this.$.text}; e.dataChanged_=function(a){a&&(Polymer.dom(this.$.text.root).innerHTML=nL(a.text||null))}; e.computeAutoScrollEnabled_=function(a,b){return a&&!b}; e.expandedChanged_=function(){this.$["expander-icon"].icon="yt-icons:expand-"+(this.expanded?"less":"more")}; e.toggleOnTap_=function(){this.expanded=!this.expanded}; g.Object.defineProperties(r0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Egb){var a=document.createElement("template");a.innerHTML="\n\n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dgb){var d=document.createElement("template");d.innerHTML=""; Dgb=d}d=Dgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Egb=a}a=Egb;return a}}}); var s0=r0;w([P(n1a),x("design:type",Object)],s0.prototype,"ytdAutoScrollBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],s0.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],s0.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"expandedChanged_"}),x("design:type",Object)],s0.prototype,"expanded",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],s0.prototype,"isCompact",void 0); w([R({computed:"computeAutoScrollEnabled_(data.autoscroll, expanded)"}),x("design:type",Boolean)],s0.prototype,"autoScrollEnabled",void 0);s0=w([V({is:"ytd-channel-legal-info-renderer"})],s0);var Fgb;var Ggb;var t0=function(){var a=O.apply(this,arguments)||this;a.canvas=null;return a}; p(t0,O);e=t0.prototype;e.dataChanged=function(a,b){b&&b.style&&this.classList.remove(this.getCssClass(b.style.styleType));a&&a.style&&this.classList.add(this.getCssClass(a.style.styleType));a&&a.title&&this.updateTextSizeClass(a.title)}; e.getCssClass=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.computeUrlImg=function(a){if(a)return vO(a.thumbnails,Number.MAX_VALUE)}; e.computeBackgroundImgStyle=function(a,b){if(!this.computeUseInlineImg(a))return ec({"background-image":this.computeUrlImg(b)||null})}; e.computeLogoHeight=function(a){if("BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"===a)return 24}; e.computeUseInlineImg=function(a){return"BANNER_PROMO_STYLE_TYPE_MASTHEAD_V2"===a}; e.sendImpressionEndpoints=function(a){a.impressionEndpoints&&this.ytActionSenderBehavior.sendServiceRequestAction(a.impressionEndpoints)}; e.observeBasicPalette=function(){var a,b,c=null===(b=null===(a=this.data)||void 0===a?void 0:a.colorData)||void 0===b?void 0:b.basicColorPaletteData;c?QO(this,c):QO(this,{})}; e.observeDataForCounterfactual=function(){var a;N("kevlar_banner_cf_extra_logging")&&((null===(a=this.data)||void 0===a?0:a.isVisible)||this.sendImpressionEndpoints(this.data))}; e.onDismissClick=function(){this.classList.add("dismissed")}; e.updateTextSizeClass=function(a){if(a){var b="";if(a.simpleText)b=a.simpleText;else if(a.runs)b=a.runs.reduce(function(h,l){return h+(l.text||"")},"");else return;this.canvas||(this.canvas=document.createElement("canvas"));a=this.canvas.getContext("2d");a.font=N(" kevlar_update_youtube_sans")?"42px YouTube Sans":"42px YT Sans";b=b.split(" ");for(var c=1,d="",f=0;f\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fgb){var d=document.createElement("template");d.innerHTML=""; Fgb=d}d=Fgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ggb=a}a=Ggb;return a}}}); var u0=t0;u0.prototype.observeDataForCounterfactual=u0.prototype.observeDataForCounterfactual;u0.prototype.observeBasicPalette=u0.prototype.observeBasicPalette;u0.prototype.dataChanged=u0.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],u0.prototype,"ytRendererBehavior",void 0);w([P(xQ),x("design:type",Object)],u0.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],u0.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],u0.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object,Object]),x("design:returntype",void 0)],u0.prototype,"dataChanged",null);w([U("data.colorData.basicColorPaletteData"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u0.prototype,"observeBasicPalette",null); w([U("data.isVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u0.prototype,"observeDataForCounterfactual",null);u0=w([V({is:"ytd-banner-promo-renderer"})],u0);var Hgb;var Igb;var v0=function(){return O.apply(this,arguments)||this}; p(v0,O);v0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{compactLinkRenderer:{component:"ytd-compact-link-renderer",noInjection:!0}}}}}; g.Object.defineProperties(v0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Igb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hgb){var d=document.createElement("template");d.innerHTML=""; Hgb=d}d=Hgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Igb=a}a=Igb;return a}}}); var w0=v0;w([P(Z),x("design:type",Object)],w0.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],w0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],w0.prototype,"data",void 0);w0=w([V({is:"ytd-settings-sidebar-renderer"})],w0);var Jgb;var Kgb;var x0=function(){return O.apply(this,arguments)||this}; p(x0,O);e=x0.prototype;e.computeUrlImg=function(a){return a?wO(a.thumbnails,Number.MAX_VALUE):null}; e.computeBackgroundColorAndImage_=function(a){var b=Polymer.dom(this.root).querySelector("#background"),c=Polymer.dom(this.root).querySelector("#background-image");b&&c&&(a.backgroundColor&&(b.style.backgroundColor=PN(a.backgroundColor)),a.backgroundImage&&(a=this.computeUrlImg(a.backgroundImage)))&&(c.style.backgroundImage="url("+a+")")}; e.shouldHideHashtagInfo_=function(a){return!a.hashtagInfoText&&this.shouldHideAvatarFacepile_(a.avatarFacepile)}; e.shouldHideAvatarFacepile_=function(a){return!a||5>a.length}; e.processThumbnails_=function(a){return!a||5>a.length?[]:5<=a.length&&9>a.length?a.slice(0,5).reverse():a.reverse()}; g.Object.defineProperties(x0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kgb){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jgb){var d=document.createElement("template");d.innerHTML=""; Jgb=d}d=Jgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kgb=a}a=Kgb;return a}}}); var y0=x0;y0.prototype.computeBackgroundColorAndImage_=y0.prototype.computeBackgroundColorAndImage_;w([P(X.YtRendererBehavior),x("design:type",Object)],y0.prototype,"rendererBehaviors",void 0);w([R(),x("design:type",Object)],y0.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],y0.prototype,"computeBackgroundColorAndImage_",null);y0=w([V({is:"ytd-hashtag-header-renderer"})],y0);var Lgb;var Mgb;var z0=function(){var a=O.apply(this,arguments)||this;a.enableTopicChannelTabs=N("enable_topic_channel_tabs");return a}; p(z0,O);z0.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer"}}}}; z0.prototype.onSearchNavigate=function(){this.selected=void 0}; z0.prototype.onTabsChange=function(a){a=null===a||void 0===a?void 0:a.findIndex(function(b){var c;return null===(c=null===b||void 0===b?void 0:b.tabRenderer)||void 0===c?void 0:c.selected}); void 0!==a&&(this.selected=a)}; z0.prototype.onTabsActive=function(a){var b,c;void 0!==this.tabs&&(a=null===(c=null===(b=this.tabs[a.detail.selected])||void 0===b?void 0:b.tabRenderer)||void 0===c?void 0:c.endpoint)&&this.fire("yt-navigate",{endpoint:a})}; g.Object.defineProperties(z0.prototype,{tabsEnabled:{configurable:!0,enumerable:!0,get:function(){return void 0!==this.tabs&&1
\n \n \n
\n"; a.content.insertBefore(MV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lgb){var d=document.createElement("template");d.innerHTML=""; Lgb=d}d=Lgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mgb=a}a=Mgb;return a}}}); var A0=z0;A0.prototype.onTabsChange=A0.prototype.onTabsChange;w([P(Z),x("design:type",Object)],A0.prototype,"ytRendererstamperBehavior",void 0);w([P(uQ),x("design:type",Object)],A0.prototype,"ytdGridStateAwareBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],A0.prototype,"ytRendererBehavior",void 0);w([P(xQ),x("design:type",Object)],A0.prototype,"ytdGuideStateAwareBehavior",void 0);w([R(),x("design:type",Object)],A0.prototype,"data",void 0); w([R(),x("design:type",Array)],A0.prototype,"tabs",void 0);w([R(),x("design:type",Number)],A0.prototype,"selected",void 0);w([R(),x("design:type",Object)],A0.prototype,"enableTopicChannelTabs",void 0);w([BE("enableTopicChannelTabs","tabs"),x("design:type",Boolean),x("design:paramtypes",[])],A0.prototype,"tabsEnabled",null);w([U("tabs"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],A0.prototype,"onTabsChange",null); A0=w([V({is:"ytd-topic-channel-details-renderer"})],A0);var Ngb;var Ogb;var B0=function(){var a=O.apply(this,arguments)||this;a.disableGridStateAware=!1;return a}; p(B0,O);B0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{topicChannelDetailsRenderer:{component:"ytd-topic-channel-details-renderer",properties:{disableGridStateAware:"[[disableGridStateAware]]",tabs:"[[tabs]]"}},carouselItemRenderer:{component:"ytd-carousel-item-renderer",attributes:{"has-animation":!0},properties:{disableGridStateAware:"[[disableGridStateAware]]"}}}}}}; B0.prototype.activeChanged=function(a){this.carousel&&(this.carousel.active=a)}; B0.prototype.updateCssVars=function(){this.updateStyles({"--ytd-rich-grid-max-width":this.richGridItemsPerRow*((this.richGridMiniMode?320:360)+16)-16+"px"})}; g.Object.defineProperties(B0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ogb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ngb){var d=document.createElement("template");d.innerHTML=""; Ngb=d}d=Ngb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ogb=a}a=Ogb;return a}}}); var C0=B0;w([P(xQ),x("design:type",Object)],C0.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(CQ),x("design:type",Object)],C0.prototype,"ytdReduxBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],C0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],C0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],C0.prototype,"data",void 0);w([R(),x("design:type",Array)],C0.prototype,"tabs",void 0); w([R({observer:"activeChanged"}),x("design:type",Object)],C0.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],C0.prototype,"disableGridStateAware",void 0);w([R({selector:q6a,observer:"updateCssVars"}),x("design:type",Number)],C0.prototype,"richGridItemsPerRow",void 0);w([R({selector:qT,observer:"updateCssVars"}),x("design:type",Boolean)],C0.prototype,"richGridMiniMode",void 0);w([CE("ytd-carousel-item-renderer"),x("design:type",Object)],C0.prototype,"carousel",void 0); C0=w([V({is:"ytd-carousel-header-renderer"})],C0);var Pgb;var Qgb;var D0=function(){var a=O.apply(this,arguments)||this;a.scriptAnalyticsAdded=!1;return a}; p(D0,O);D0.prototype.dataChanged=function(){this.data&&this.data.analyticsId&&this.sendGoogleAnalyticsPageview(this.data.analyticsId)}; D0.prototype.sendGoogleAnalyticsPageview=function(a){this.scriptAnalyticsAdded||this.appendAnalyticsScript();window.ga=window.ga||function(c){for(var d=[],f=0;f\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pgb){var d=document.createElement("template");d.innerHTML="";Pgb=d}d=Pgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); Qgb=a}a=Qgb;return a}}}); var E0=D0;E0.prototype.dataChanged=E0.prototype.dataChanged;w([R(),x("design:type",Object)],E0.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],E0.prototype,"dataChanged",null);E0=w([V({is:"ytd-channel-metadata-renderer"})],E0);var Rgb;var Sgb;var F0=function(){return O.apply(this,arguments)||this}; p(F0,O);F0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0},searchBoxRenderer:{component:"ytd-search-box-renderer",noInjection:!0},subFeedSelectorRenderer:{component:"ytd-sub-feed-selector-renderer",noInjection:!0},toggleButtonRenderer:{component:"ytd-toggle-button-renderer",noInjection:!0},compactLinkRenderer:{component:"ytd-compact-link-renderer",noInjection:!0}}}}}; g.Object.defineProperties(F0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sgb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rgb){var d=document.createElement("template");d.innerHTML=""; Rgb=d}d=Rgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sgb=a}a=Sgb;return a}}}); var G0=F0;w([P(X.YtRendererBehavior),x("design:type",Object)],G0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],G0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],G0.prototype,"data",void 0);G0=w([V({is:"ytd-browse-feed-actions-renderer"})],G0);var Tgb;var Ugb;var Vgb=function(){return O.apply(this,arguments)||this}; p(Vgb,O); g.Object.defineProperties(Vgb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ugb){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tgb){var d=document.createElement("template");d.innerHTML=""; Tgb=d}d=Tgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ugb=a}a=Ugb;return a}}}); var H0=Vgb;w([P(X.YtRendererBehavior),x("design:type",Object)],H0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],H0.prototype,"data",void 0);H0=w([V({is:"ytd-sub-feed-option-renderer"})],H0);var Wgb;var Xgb;var I0=function(){return O.apply(this,arguments)||this}; p(I0,O);I0.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{subFeedOptionRenderer:{component:"ytd-sub-feed-option-renderer",noInjection:!0}}}}}; g.Object.defineProperties(I0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xgb){var a=document.createElement("template");a.innerHTML="

\n [[getSimpleString(data.title)]]\n

\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wgb){var d=document.createElement("template");d.innerHTML=""; Wgb=d}d=Wgb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xgb=a}a=Xgb;return a}}}); var J0=I0;w([P(X.YtRendererBehavior),x("design:type",Object)],J0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],J0.prototype,"ytRendererStamperBehavior",void 0);w([R(),x("design:type",Object)],J0.prototype,"data",void 0);J0=w([V({is:"ytd-sub-feed-selector-renderer"})],J0);var Ygb;var Zgb;var K0=function(){return O.apply(this,arguments)||this}; p(K0,O);K0.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{verticalChannelSectionRenderer:{component:"ytd-vertical-channel-section-renderer",noInjection:!0}}}}}; g.Object.defineProperties(K0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zgb){var a=document.createElement("template");a.innerHTML="
\n
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ygb){var d=document.createElement("template");d.innerHTML=""; Ygb=d}d=Ygb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zgb=a}a=Zgb;return a}}}); var L0=K0;w([P(X.YtRendererBehavior),x("design:type",Object)],L0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],L0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],L0.prototype,"data",void 0);L0=w([V({is:"ytd-browse-secondary-contents-renderer"})],L0);var $gb;var ahb;var M0=function(){return O.apply(this,arguments)||this}; p(M0,O);M0.prototype.configureRendererStamper=function(){return{"data.subscribeButton":{id:"subscribe",mapping:{subscribeButtonRenderer:"ytd-subscribe-button-renderer",buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(M0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ahb){var a=document.createElement("template");a.innerHTML="\n \n \n [[getSimpleString(data.title)]]\n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$gb){var d=document.createElement("template");d.innerHTML=""; $gb=d}d=$gb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ahb=a}a=ahb;return a}}}); var N0=M0;w([P(X.YtRendererBehavior),x("design:type",Object)],N0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],N0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],N0.prototype,"data",void 0);N0=w([V({is:"ytd-mini-channel-renderer"})],N0);var bhb;var chb;var O0=function(){return O.apply(this,arguments)||this}; p(O0,O);O0.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{miniChannelRenderer:"ytd-mini-channel-renderer"}}}}; g.Object.defineProperties(O0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===chb){var a=document.createElement("template");a.innerHTML="

[[data.title]]

\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bhb){var d=document.createElement("template");d.innerHTML=""; bhb=d}d=bhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);chb=a}a=chb;return a}}}); var P0=O0;w([P(X.YtRendererBehavior),x("design:type",Object)],P0.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],P0.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P0.prototype,"data",void 0);P0=w([V({is:"ytd-vertical-channel-section-renderer"})],P0);var dhb;var ehb;var R0=function(){var a=zE.apply(this,arguments)||this;a.dragging=!1;a.dragMouseStart=0;a.dragOffsetStart=0;a.containerWidthDiff=0;a.boundPrevClick=function(){a.set("offset",Q0(a,a.offset-320))}; a.boundNextClick=function(){a.set("offset",Q0(a,a.offset+320))}; a.boundScrollContainerMouseDown=function(b){a.dragMouseStart=b.clientX;a.dragOffsetStart=a.offset;a.dragging=!0}; a.boundScrollContainerDrag=function(b){a.dragging&&a.set("offset",Q0(a,a.dragOffsetStart-(b.clientX-a.dragMouseStart)))}; a.boundMouseUp=function(){a.dragging=!1}; a.boundWheelScroll=function(b){b.stopPropagation();b.preventDefault();a.offset+=Math.abs(b.deltaX)>Math.abs(b.deltaY)?b.deltaX:b.deltaY}; a.boundChipFocused=function(b){var c=a.$$("#scroll-container");(b=b.detail)&&c&&Math.abs(a.offset-(b.offsetLeft+b.clientWidth))>c.clientWidth&&(a.offset=Q0(a,b.offsetLeft))}; return a}; p(R0,zE);R0.prototype.attached=function(){this.$$("#scroll-container").addEventListener("wheel",this.boundWheelScroll);this.$$("#scroll-container").addEventListener("yt-chip-cloud-chip-focused",this.boundChipFocused);this.$$("#scroll-container").addEventListener("mousedown",this.boundScrollContainerMouseDown);this.$$("#scroll-container").addEventListener("mousemove",this.boundScrollContainerDrag);window.addEventListener("mouseup",this.boundMouseUp)}; R0.prototype.detached=function(){this.$$("#scroll-container").removeEventListener("wheel",this.boundWheelScroll);this.$$("#scroll-container").removeEventListener("yt-chip-cloud-chip-focused",this.boundChipFocused);this.$$("#scroll-container").removeEventListener("mousedown",this.boundScrollContainerMouseDown);this.$$("#scroll-container").removeEventListener("mousemove",this.boundScrollContainerDrag);window.removeEventListener("mouseup",this.boundMouseUp)}; R0.prototype.reset=function(){this.set("offset",0);fhb(this);S0(this)}; var Q0=function(a,b){return Math.min(Math.max(b,0),a.containerWidthDiff)}; R0.prototype.transformContainer=function(){this.offset=Q0(this,this.offset);this.transform("translateX(-"+this.offset+"px)",this.$$("#chips"));S0(this)}; var S0=function(a){Polymer.RenderStatus.afterNextRender(a,a.setButtonsState)}; R0.prototype.setButtonsState=function(){(this.atEnd=this.offset>=this.containerWidthDiff)&&!this.atStart&&(this.offset=Q0(this,this.offset));this.atStart=0>=this.offset}; var fhb=function(a){Polymer.RenderStatus.afterNextRender(a,a.setContainerWidthDiff)}; R0.prototype.setContainerWidthDiff=function(){var a=this.$$("#scroll-container"),b=this.$$("#chips");a&&b&&(this.containerWidthDiff=b.clientWidth-a.clientWidth)}; var T0=R0;T0.prototype.transformContainer=T0.prototype.transformContainer;w([R({value:0}),x("design:type",Number)],T0.prototype,"offset",void 0);w([R({value:!0,reflectToAttribute:!0}),x("design:type",Boolean)],T0.prototype,"atStart",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],T0.prototype,"atEnd",void 0);w([U("offset"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],T0.prototype,"transformContainer",null);T0=w([AE()],T0);var U0=function(){var a=O.apply(this,arguments)||this;a.isDarkTheme=!1;a.notSticky=!1;a.actionMap={"yt-chip-cloud-chip-select-action":"handleChipCloudChipSelectAction","yt-chip-cloud-chip-deselect-action":"handleChipCloudChipDeselectAction","yt-dark-mode-toggled-action":"onDarkModeToggledAction","yt-rich-grid-layout-refreshed":"updateChipBarWidthAndTop"};return a}; p(U0,O);e=U0.prototype;e.configureRendererStamper=function(){return{"data.contents":{id:"chips",mapping:{chipCloudChipRenderer:{component:"yt-chip-cloud-chip-renderer"}}},"data.previousButton":{id:"left-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}}}},"data.nextButton":{id:"right-arrow-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"}}}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.isDarkTheme=document.documentElement.hasAttribute("dark")}; e.dataChanged=function(){this.selectedIndex=0;this.updateChipBarWidthAndTop();this.ytScrollableChipCloudBehavior.reset()}; e.computeStyle=function(a){return a}; e.handleChipCloudChipSelectAction=function(a){a=this.chipsSelector.indexOf(a);-1
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dhb){var d=document.createElement("template");d.innerHTML=""; dhb=d}d=dhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ehb=a}a=ehb;return a}}}); var V0=U0;V0.prototype.onResize=V0.prototype.onResize;V0.prototype.dataChanged=V0.prototype.dataChanged;w([P(Z),x("design:type",Object)],V0.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],V0.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],V0.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],V0.prototype,"actionSenderBehavior",void 0); w([P(TH),x("design:type",Object)],V0.prototype,"ironResizableBehavior",void 0);w([P(),x("design:type",T0)],V0.prototype,"ytScrollableChipCloudBehavior",void 0);w([R(),x("design:type",Object)],V0.prototype,"data",void 0);w([R({value:0}),x("design:type",Number)],V0.prototype,"selectedIndex",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],V0.prototype,"isDarkTheme",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],V0.prototype,"notSticky",void 0); w([R({reflectToAttribute:!0,computed:"computeStyle(data.styleType)"}),x("design:type",String)],V0.prototype,"componentStyle",void 0);w([CE("#chips"),x("design:type",Object)],V0.prototype,"chipsSelector",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V0.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V0.prototype,"onResize",null); V0=w([V({is:"ytd-feed-filter-chip-bar-renderer"})],V0);var ghb;var hhb;Polymer({is:"yt-chip-cloud-chip-renderer",_template:function(){if(void 0!==hhb)return hhb;var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ghb){var d=document.createElement("template");d.innerHTML=""; ghb=d}d=ghb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return hhb=a}, properties:{data:Object,chipStyle:{type:String,computed:"computeChipStyle_(data.style.styleType)",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"selectionChanged_"}},hostAttributes:{role:"tab",tabindex:0},actionMap:{"yt-select-chip-command":"onSelectChipCommand_"},behaviors:[X.YtRendererBehavior,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,Polymer.IronButtonState],listeners:{tap:"onTap_",focus:"onFocus_"},onSelectChipCommand_:function(a){if(!this.selected&& this.data&&a.selectChipCommand.targetId&&a.selectChipCommand.targetId===this.data.targetId)this.onTap_()}, selectionChanged_:function(){this.setAttribute("aria-selected",""+this.selected)}, computeChipStyle_:function(a){return a?a:"STYLE_DEFAULT"}, onTap_:function(){this.data&&(this.logExplicitClick(this.data),this.selected||!this.data.navigationEndpoint?this.sendAction("yt-chip-cloud-chip-deselect-action"):(this.sendAction("yt-chip-cloud-chip-select-action",[this]),this.data&&this.data.navigationEndpoint&&this.data.navigationEndpoint.continuationCommand?this.sendServiceRequestAction([this.data.navigationEndpoint]):this.data&&this.data.navigationEndpoint&&this.sendInnerTubeActions([this.data.navigationEndpoint],this)))}, onFocus_:function(){var a=this.getInterface(PO);a&&a.isKeyBoardInUse()&&this.fire("yt-chip-cloud-chip-focused",this)}});var ihb;var jhb;function khb(a,b,c,d){d=void 0===d?{}:d;var f=[],h=[],l=d;d=void 0===l.minimumRowsOfVideosAtStart?2:l.minimumRowsOfVideosAtStart;l=void 0===l.minimumRowsOfVideosBetweenSections?1:l.minimumRowsOfVideosBetweenSections;if(!a||!a.length)return[];for(var m=0;m=r-b*l;if(v>=r||n||z)r=v+b*l+1}else r=Math.max(r,b*d);h.push(r)}d=[];l=0;m=k(a);for(r=m.next();!r.done;r= m.next()){for(r=r.value;d.length===h[l];)d.push(a[f[l]]),l++;r.richItemRenderer&&d.push(r)}for(;h[l];)d.push(a[f[l]]),l++;(a=a.find(function(C){return C.continuationItemRenderer}))&&d.push(a); lhb(d,b);return mhb(d,h,b,c)} function lhb(a,b){for(var c,d,f=0,h=0,l=0;l=b&&N("rich_grid_mini_mode");f&&(b=this.calcElementsPerRow(240,4));this.actionSenderBehavior.sendOptionalAction("yt-rich-grid-layout-refreshed");if(this.elementsPerRow!==b||this.postsPerRow!==c||this.moviesPerRow!==d){var h=this.elementsPerRow!==b;this.elementsPerRow=b;this.postsPerRow=c;this.moviesPerRow=d; this.reflowContent();this.actionSenderBehavior.sendOptionalAction("ytd-update-elements-per-row-action",[b,c,d]);this.updateStyles({"--ytd-rich-grid-items-per-row":""+this.elementsPerRow,"--ytd-rich-grid-posts-per-row":""+this.postsPerRow,"--ytd-rich-grid-movies-per-row":""+this.moviesPerRow});this.ytdReduxBehavior.dispatch(KL({type:"SET_RICH_GRID_ITEMS_PER_ROW",payload:this.elementsPerRow}));this.miniMode=f;return h}this.miniMode=f;return!1}; e.calcElementsPerRow=function(a,b){var c=this.clientWidth;600\n\n\n
\n \n \n
\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ihb){var d=document.createElement("template");d.innerHTML=""; ihb=d}d=ihb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jhb=a}a=jhb;return a}}}); var X0=W0;X0.prototype.onReloadContinuationFinish=X0.prototype.onReloadContinuationFinish;X0.prototype.onResize=X0.prototype.onResize;X0.prototype.onRequestElementsPerRow=X0.prototype.onRequestElementsPerRow;X0.prototype.contentLengthChanged=X0.prototype.contentLengthChanged;X0.prototype.dataChanged=X0.prototype.dataChanged;w([P(Z),x("design:type",Object)],X0.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],X0.prototype,"ytRendererBehavior",void 0); w([P(TH),x("design:type",Object)],X0.prototype,"ironResizableBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],X0.prototype,"actionHandlerBehavior",void 0);w([P(yU),x("design:type",Object)],X0.prototype,"ytContinuationHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],X0.prototype,"actionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],X0.prototype,"componentBehavior",void 0); w([P(CQ),x("design:type",Object)],X0.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],X0.prototype,"data",void 0);w([R({value:!1,reflectToAttribute:!0}),x("design:type",Boolean)],X0.prototype,"miniMode",void 0);w([R(),x("design:type",String)],X0.prototype,"pagePath",void 0);w([R({value:[]}),x("design:type",Array)],X0.prototype,"shownItems",void 0);w([R({value:!1}),x("design:type",Boolean)],X0.prototype,"isReflowing",void 0); w([R({value:!1}),x("design:type",Boolean)],X0.prototype,"isFilteredFeed",void 0);w([R({value:!1,reflectToAttribute:!0,computed:"computeHasSubmenu(data)"}),x("design:type",Boolean)],X0.prototype,"hasSubmenu",void 0);w([R({selector:function(a){return a.ui.guideIsExpanded}, observer:"refreshAndLog"}),x("design:type",Boolean)],X0.prototype,"guideIsExpanded",void 0);w([R({value:!1}),x("design:type",Boolean)],X0.prototype,"isSearch",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X0.prototype,"dataChanged",null);w([U("data.contents.length"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X0.prototype,"contentLengthChanged",null); w([S("yt-request-elements-per-row"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X0.prototype,"onRequestElementsPerRow",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X0.prototype,"onResize",null);w([S("yt-reload-continuation-finish"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],X0.prototype,"onReloadContinuationFinish",null); X0=w([V({is:"ytd-rich-grid-renderer"})],X0);var ohb;var phb;var Y0=function(){return O.apply(this,arguments)||this}; p(Y0,O); Y0.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{backgroundPromoRenderer:"ytd-background-promo-renderer",clarificationRenderer:"ytd-clarification-renderer",compactPromotedItemRenderer:"ytd-compact-promoted-item-renderer",counterfactualRenderer:"ytd-counterfactual-renderer",didYouMeanRenderer:"yt-did-you-mean-renderer",includingResultsForRenderer:"yt-including-results-for-renderer",inlineSurveyRenderer:"ytd-inline-survey-renderer",messageRenderer:"ytd-message-renderer",noResultsFoundShowingResultsForRenderer:"yt-no-results-found-showing-results-for-renderer", primetimePromoRenderer:"ytd-primetime-promo-renderer",richShelfRenderer:"ytd-rich-shelf-renderer",showingResultsForRenderer:"yt-showing-results-for-renderer",statementBannerRenderer:"ytd-statement-banner-renderer",infoPanelContainerRenderer:"ytd-info-panel-container-renderer",promotedSparklesTextSearchRenderer:"ytd-promoted-sparkles-text-search-renderer"},reuseComponents:!1}}}; g.Object.defineProperties(Y0,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===phb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ohb){var d=document.createElement("template");d.innerHTML=""; ohb=d}d=ohb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);phb=a}a=phb;return a}}}); var Z0=Y0;w([P(Z),x("design:type",Object)],Z0.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],Z0.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Z0.prototype,"data",void 0);Z0=w([V({is:"ytd-rich-section-renderer"})],Z0);var qhb;var rhb;var $0=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction"};return a}; p($0,O);e=$0.prototype; e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{richItemRenderer:{component:"ytd-rich-item-renderer",params:{isShelfItem:!0}}}},"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",attributes:{condensed:!0,icon:"yt-icons:more"},params:{buttonTooltipPosition:"rtl"===A("HTML_DIR")?"right":"left"}}}},dismissedRenderer:{id:"dismissed",mapping:{notificationMultiActionRenderer:{component:"ytd-notification-multi-action-renderer",params:{shelfDismissal:!0}}}}}}; e.attached=function(){this.listen(document,"yt-page-type-changed","collapseShelf");this.actionHandlerBehavior.actionMap=this.actionMap;this.requestElementsPerRow()}; e.detached=function(){this.unlisten(document,"yt-page-type-changed","collapseShelf")}; e.onRowIndexChange=function(){var a=Tn();this.data&&this.data.trackingParams&&a&&JNa(a,Nn(this.data.trackingParams),{gridData:{veRowCoordinate:this.data.rowIndex}})}; e.collapseShelf=function(){var a;if(null===(a=this.data)||void 0===a?0:a.isExpanded)this.data.isExpanded=!1,this.updateItemVisibility()}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; e.onUpdateElementsPerRowAction=function(a,b,c){a&&b&&c&&(this.elementsPerRow!==a||this.postsPerRow!==b||this.moviesPerRow!==c)&&(this.elementsPerRow=a,this.postsPerRow=b,this.moviesPerRow=c,this.updateItemVisibility())}; e.updateItemVisibility=function(){var a=this;if(this.data&&this.data.contents){var b=this.isPostShelfRenderer()?this.postsPerRow:this.isMovieShelfRenderer()?this.moviesPerRow:this.elementsPerRow;Polymer.dom(this.root).querySelectorAll("ytd-rich-item-renderer").forEach(function(c,d){var f;(null===(f=a.data)||void 0===f?0:f.isExpanded)?(c.hidden=!1,c.ytRendererBehavior.markDirty()):c.hidden=d>b-1}); this.isShowMoreHidden=this.data.contents.length<=b||!!this.data.isExpanded}}; e.onDataChange=function(){var a=this,b;Polymer.RenderStatus.afterNextRender(this,function(){a.updateItemVisibility()}); if(null===(b=this.data)||void 0===b?0:b.contents)for(var c=0;c
\n
\n

\n \n \n

\n
\n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qhb){var d=document.createElement("template");d.innerHTML=""; qhb=d}d=qhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rhb=a}a=rhb;return a}}}); var a1=$0;a1.prototype.onDataChange=a1.prototype.onDataChange;a1.prototype.onRowIndexChange=a1.prototype.onRowIndexChange;w([P(Z),x("design:type",Object)],a1.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],a1.prototype,"ytRendererBehavior",void 0);w([P(cQ),x("design:type",Object)],a1.prototype,"ytdDismissableItemBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],a1.prototype,"actionHandlerBehavior",void 0); w([R(),x("design:type",Object)],a1.prototype,"data",void 0);w([R({value:3}),x("design:type",Number)],a1.prototype,"elementsPerRow",void 0);w([R({value:3}),x("design:type",Number)],a1.prototype,"postsPerRow",void 0);w([R({value:6}),x("design:type",Number)],a1.prototype,"moviesPerRow",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],a1.prototype,"isShowMoreHidden",void 0); w([U("data.rowIndex"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a1.prototype,"onRowIndexChange",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a1.prototype,"onDataChange",null);a1=w([V({is:"ytd-rich-shelf-renderer"})],a1);var shb;var thb;var b1=function(){var a=O.apply(this,arguments)||this;a.actionMap={"ytd-update-elements-per-row-action":"onUpdateElementsPerRowAction","yt-dark-mode-toggled-action":"onDarkModeToggledAction"};return a}; p(b1,O);e=b1.prototype;e.attached=function(){this.requestElementsPerRow();var a=!!document.documentElement.hasAttribute("dark");this.data&&(this.currentColorData=a?this.data.darkColorData:this.data.lightColorData)}; e.configureRendererStamper=function(){return{primaryButton:{id:"primary-button",mapping:{buttonRenderer:"ytd-button-renderer"},reuseComponents:!0},secondaryButton:{id:"secondary-button",mapping:{buttonRenderer:"ytd-button-renderer"},reuseComponents:!0},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"ytd-button-renderer"}},dismissedRenderer:{id:"dismissed",mapping:{notificationTextRenderer:"ytd-notification-text-renderer",notificationMultiActionRenderer:"ytd-notification-multi-action-renderer"}}}}; e.dataChanged=function(a){this.requestElementsPerRow();this.updateButtonPalette();this.updateTitleSpec();var b=!!a.tileImage;b!==this.hasTileImage&&this.set("hasTileImage",b);this.currentColorData=this.isDarkTheme?a.darkColorData:a.lightColorData}; e.themeChanged=function(a){this.data&&this.set("currentColorData",a?this.data.darkColorData:this.data.lightColorData)}; e.currentColorChanged=function(){this.updateButtonPalette()}; e.computeBackgroundStyle=function(a){var b;if(a&&this.data){var c={};if(this.data.lightBackgroundImage&&this.data.darkBackgroundImage){var d=vO((this.isDarkTheme?this.data.darkBackgroundImage:this.data.lightBackgroundImage).thumbnails,Number.MAX_VALUE);d&&(c["background-image"]=d)}if(null===(b=a.basicColorData)||void 0===b?0:b.backgroundColor)c["background-color"]=PN(a.basicColorData.backgroundColor);return ec(c)}}; e.onDarkModeToggledAction=function(a){a!==this.isDarkTheme&&this.set("isDarkTheme",a)}; e.getCurrentLogo=function(a,b){if(a)return b?a.lightLogoImage:a.darkLogoImage}; e.computeTitleStyle=function(a){if(this.data&&this.data.title&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundTitleColor)return ec({color:PN(a.basicColorData.foregroundTitleColor)})}; e.computeSubtitleStyle=function(a){if(this.data&&this.data.subtitle&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundBodyColor)return ec({color:PN(a.basicColorData.foregroundBodyColor)})}; e.computeBadgeStyle=function(a){if(this.data&&this.data.badgeText&&a&&a.basicColorData&&void 0!==a.basicColorData.foregroundActivatedColor)return ec({color:PN(a.basicColorData.foregroundActivatedColor)})}; e.computeDismissIconStyle=function(a,b){var c,d,f,h;if(a&&a.dismissButton&&null!==(h=null===(f=null===(d=null===(c=a.dismissButton)||void 0===c?void 0:c.buttonRenderer)||void 0===d?void 0:d.colorData)||void 0===f?void 0:f.basicColorPaletteData)&&void 0!==h&&h.foregroundTitleColor&&(!a.tileImage||1!==b))return ec({"--yt-button-color":PN(a.dismissButton.buttonRenderer.colorData.basicColorPaletteData.foregroundTitleColor)})}; e.shouldExpandLogo=function(a,b){return a?!1:2<=b}; e.requestElementsPerRow=function(){this.fire("yt-request-elements-per-row")}; e.updateTitleSpec=function(){var a;null!==(a=this.data)&&void 0!==a&&a.titleLength&&(this.titleSize=2>=this.elementsPerRow?20>=this.data.titleLength?"TITLE_SIZE_MEDIUM":"TITLE_SIZE_SMALL":40>=this.data.titleLength?"TITLE_SIZE_LARGE":80>=this.data.titleLength?"TITLE_SIZE_MEDIUM":"TITLE_SIZE_SMALL")}; e.updateButtonPalette=function(){var a,b;if(this.data&&this.currentColorData){if(null===(a=this.data.primaryButton)||void 0===a?0:a.buttonRenderer)this.currentColorData.primaryButtonColorData?(this.data.primaryButton.buttonRenderer.colorData={basicColorPaletteData:this.currentColorData.primaryButtonColorData},this.data.primaryButton.buttonRenderer.style=void 0):this.currentColorData.primaryButtonStyleType&&(this.data.primaryButton.buttonRenderer.style=this.currentColorData.primaryButtonStyleType, this.data.primaryButton.buttonRenderer.colorData=void 0),this.set("primaryButton",Object.assign({},this.data.primaryButton));if(null===(b=this.data.secondaryButton)||void 0===b?0:b.buttonRenderer)this.currentColorData.secondaryButtonColorData?(this.data.secondaryButton.buttonRenderer.colorData={basicColorPaletteData:this.currentColorData.secondaryButtonColorData},this.data.secondaryButton.buttonRenderer.style=void 0):this.currentColorData.secondaryButtonStyleType&&(this.data.secondaryButton.buttonRenderer.style= this.currentColorData.secondaryButtonStyleType,this.data.secondaryButton.buttonRenderer.colorData=void 0),this.set("secondaryButton",Object.assign({},this.data.secondaryButton))}}; e.onUpdateElementsPerRowAction=function(a){a&&this.elementsPerRow!==a&&(this.elementsPerRow=a,this.updateTitleSpec())}; g.Object.defineProperties(b1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===thb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===shb){var d=document.createElement("template");d.innerHTML=""; shb=d}d=shb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);thb=a}a=thb;return a}}}); var c1=b1;c1.prototype.currentColorChanged=c1.prototype.currentColorChanged;c1.prototype.themeChanged=c1.prototype.themeChanged;c1.prototype.dataChanged=c1.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],c1.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],c1.prototype,"ytRendererstamperBehavior",void 0);w([P(cQ),x("design:type",Object)],c1.prototype,"ytdDismissableItemBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],c1.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],c1.prototype,"data",void 0);w([R(),x("design:type",Object)],c1.prototype,"primaryButton",void 0);w([R(),x("design:type",Object)],c1.prototype,"secondaryButton",void 0);w([R({reflectToAttribute:!0,value:3}),x("design:type",Number)],c1.prototype,"elementsPerRow",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],c1.prototype,"isDarkTheme",void 0); w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],c1.prototype,"hasTileImage",void 0);w([R(),x("design:type",Object)],c1.prototype,"currentColorData",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],c1.prototype,"titleSize",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],c1.prototype,"dataChanged",null); w([U("isDarkTheme"),x("design:type",Function),x("design:paramtypes",[Boolean]),x("design:returntype",void 0)],c1.prototype,"themeChanged",null);w([U("currentColorData"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],c1.prototype,"currentColorChanged",null);c1=w([V({is:"ytd-statement-banner-renderer"})],c1);var uhb;var vhb;var d1,e1=function(){return O.apply(this,arguments)||this}; p(e1,O);e=e1.prototype;e.configureRendererStamper=function(){return{"data.content.closeButton":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content.ctaButton":{id:"call-to-action",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.dataChanged=function(){this.data&&this.data.content&&this.data.clickLocationTargets&&this.data.content.navigationEndpoint&&(this.data.adBadge||this.set("data.adBadge",d1.DEFAULT_AD_BADGE_RENDERER),this.sendImpression(),this.ytSparklesClickLocationBehavior.configureClickTargets("root-container",this.data.clickLocationTargets,d1.CLICK_LOCATION_ID_MAP))}; e.onSitelinkTap=function(a){var b,c;a.stopPropagation();var d=null===(c=null===(b=null===a||void 0===a?void 0:a.model)||void 0===b?void 0:b.item)||void 0===c?void 0:c.onTap;d&&this.ytSparklesClickLocationBehavior.handleClick(d,a)}; e.onTap=function(a){var b=this.data&&this.data.content&&this.data.content.navigationEndpoint;b&&this.ytSparklesClickLocationBehavior.handleClick(b,a)}; e.sendImpression=function(){if(this.data&&this.data.content)for(var a=k(this.data.content.impressionEndpoints||[]),b=a.next();!b.done;b=a.next()){b=k(b.value.loggingUrls||[]);for(var c=b.next();!c.done;c=b.next())c=c.value,c.baseUrl&&Xn(c.baseUrl)}}; g.Object.defineProperties(e1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vhb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n [[getSimpleString(data.content.title)]]\n

\n \n \n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uhb){var d=document.createElement("template");d.innerHTML=""; uhb=d}d=uhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vhb=a}a=vhb;return a}}}); var f1=d1=e1;d1.prototype.onTap=d1.prototype.onTap;d1.prototype.dataChanged=d1.prototype.dataChanged;f1.CLICK_LOCATION_ID_MAP=new Map([["PROMOTED_SPARKLES_CLICK_LOCATION_TITLE","title"],["PROMOTED_SPARKLES_CLICK_LOCATION_DESCRIPTION","description"],["PROMOTED_SPARKLES_CLICK_LOCATION_AD_BADGE","ad-badge"],["PROMOTED_SPARKLES_CLICK_LOCATION_TEXT_AD_WEBSITE","display-url"],["PROMOTED_SPARKLES_CLICK_LOCATION_BACKGROUND","root-container"],["PROMOTED_SPARKLES_CLICK_LOCATION_SITELINK","sitelinks-table"]]); f1.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Z),x("design:type",Object)],f1.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],f1.prototype,"ytRendererBehavior",void 0);w([P(A8a.YtSparklesClickLocationBehavior),x("design:type",Object)],f1.prototype,"ytSparklesClickLocationBehavior",void 0);w([R(),x("design:type",Object)],f1.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f1.prototype,"dataChanged",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],f1.prototype,"onTap",null);f1=d1=w([V({is:"ytd-promoted-sparkles-text-search-renderer"})],f1);var whb;var xhb;var g1=function(){var a=O.apply(this,arguments)||this;a.active=!1;a.watchResponse=null;a.playerEvents=new Map;a.actionMap={"yt-open-video-preview-action":"handleOpenVideoPreviewAction"};return a}; p(g1,O);e=g1.prototype;e.configureRendererStamper=function(){return{"previewData.thumbnailOverlays":{id:"endorsement",mapping:{thumbnailOverlayEndorsementRenderer:"ytd-thumbnail-overlay-endorsement-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;this.playerEvents.set("onCloseMiniplayer",this.deactivate);this.playerEvents.set("onExpandMiniplayer",this.onDetailsClick)}; e.handleOpenVideoPreviewAction=function(a,b,c){null!==a&&void 0!==a&&a.navigationEndpoint&&(this.updateStyles({"--ytd-video-preview-top-position":b+"px","--ytd-video-preview-left-position":c+"px"}),this.previewData=a,(b=(b=this.componentBehavior.getInterfaceForTs("ytd-page-manager"))&&b.getPlayerFromWatch())&&a&&this.activate(b,a))}; e.activate=function(a,b){return Za(this,function d(){var f=this,h,l,m;return za(d,function(n){if(1==n.nextAddress)return f.playerElement=a,a.preparePlayer(a),f.$["player-container"].append(a),q(n,a.getPlayerPromise(),2);if(3!=n.nextAddress)return h=n.yieldResult,f.active||(h.setMinimized(!0),h.setSizeStyle(!1,!0),h.mute(),f.ytPlayerListenerBehavior.listenToPlayerEvents(h,f.playerEvents)),f.player=h,l=f.componentBehavior.getInterfaceForTs("yt-network-manager"),q(n,l.requestDataForEndpoint(b.navigationEndpoint, {},void 0,{},!0),3);m=n.yieldResult;return q(n,f.handleWatchDataResponse(m),0)})})}; e.handleWatchDataResponse=function(a){return Za(this,function c(){var d=this;return za(c,function(f){if(1==f.nextAddress){if(!a)return f.return();a.playerResponse&&!a.player&&(a.player=NM(a.playerResponse));d.watchResponse=a;return d.playerElement?q(f,d.playerElement.update(a.player),3):f.jumpTo(0)}d.active=!0;ra(f)})})}; e.onDetailsClick=function(){this.watchResponse&&this.previewData&&this.previewData.navigationEndpoint.watchEndpoint&&(this.fire("yt-navigate-cache",{url:this.watchResponse.url,endpoint:this.previewData.navigationEndpoint.watchEndpoint,data:this.watchResponse,miniplayer:!0}),this.deactivate())}; e.deactivate=function(){return Za(this,function b(){var c=this,d,f;return za(b,function(h){if(1==h.nextAddress)return c.playerElement?q(h,c.playerElement.getPlayerPromise(),2):h.return();if(3!=h.nextAddress)return d=h.yieldResult,d.setMinimized(!1),d.unMute(),f=c.componentBehavior.getInterfaceForTs("ytd-page-manager"),q(h,f.movePlayerToWatch(c.playerElement),3);c.active=!1;c.data=void 0;c.watchResponse=null;c.player&&c.ytPlayerListenerBehavior.unlistenFromPlayerEvents(c.player,c.playerEvents);c.playerElement= null;ra(h)})})}; g.Object.defineProperties(g1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xhb){var a=document.createElement("template");a.innerHTML="
\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===whb){var d=document.createElement("template");d.innerHTML=""; whb=d}d=whb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xhb=a}a=xhb;return a}}}); var h1=g1;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],h1.prototype,"actionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],h1.prototype,"ytRendererstamperBehavior",void 0);w([P(TP),x("design:type",Object)],h1.prototype,"ytPlayerListenerBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],h1.prototype,"componentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],h1.prototype,"ytRendererBehavior",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],h1.prototype,"active",void 0);w([R(),x("design:type",Object)],h1.prototype,"data",void 0);h1=w([V({is:"ytd-video-preview"})],h1);var yhb;var zhb;var i1=function(){return O.apply(this,arguments)||this}; p(i1,O);e=i1.prototype;e.concatLatLng=function(a,b){return a+","+b}; e.concatViewports=function(a){if(!a)return"";var b="";a.forEach(function(c){c.lat&&c.lng&&(b+=c.lat+","+c.lng+"|")}); return b.slice(0,-1)}; e.computeMapsUrl=function(a,b,c,d,f){if(!(a&&b&&c&&f&&d))return"";a={center:this.concatLatLng(a,b),visible:this.concatViewports(c),size:f+"x"+d,markers:"color:red|"+this.concatLatLng(a,b),key:"AIzaSyCs1my5Q2eCGoyfRDDCkd4yxplienmWEDc"};return"//maps.googleapis.com/maps/api/staticmap?"+ll(a)}; e.computeMapsUrlNoWidth=function(a,b,c,d){return this.computeMapsUrl(a,b,c,d,screen.width)}; e.computeThumbnailDetailsWithNewURL=function(a){if(a){var b=this.$["background-img"].offsetWidth;a.thumbnails.forEach(function(c){var d=c.url,f=d.lastIndexOf("=");-1!==f&&(c.url=d.substring(0,f)+"=w"+b)}); return a}}; g.Object.defineProperties(i1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zhb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n object-fit=\"COVER\"\n \n \n
\n
\n
[[getSimpleString(data.placeName)]]
\n
[[getSimpleString(data.placeAddress)]]
\n
\n
\n \n \n \n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===yhb){var d=document.createElement("template");d.innerHTML=""; yhb=d}d=yhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zhb=a}a=zhb;return a}}}); var j1=i1;w([P(X.YtRendererBehavior),x("design:type",Object)],j1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],j1.prototype,"data",void 0);j1=w([V({is:"ytd-geo-search-details-renderer"})],j1);var Ahb;var Bhb;var Chb=function(){return O.apply(this,arguments)||this}; p(Chb,O); g.Object.defineProperties(Chb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bhb){var a=document.createElement("template");a.innerHTML="

\n \n

\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ahb){var d=document.createElement("template");d.innerHTML=""; Ahb=d}d=Ahb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bhb=a}a=Bhb;return a}}}); var k1=Chb;w([P(X.YtRendererBehavior),x("design:type",Object)],k1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k1.prototype,"data",void 0);k1=w([V({is:"ytd-search-filter-group-renderer"})],k1);var Dhb;var Ehb;var l1=function(){return O.apply(this,arguments)||this}; p(l1,O);l1.prototype.onDataChanged=function(a,b){b&&(b=this.getFilterClass(b.status))&&this.classList.remove(b);(a=this.getFilterClass(a.status))&&this.classList.add(a);"selected"===a?this.$.endpoint.setAttribute("aria-selected","true"):this.$.endpoint.removeAttribute("aria-selected");"disabled"===a?this.$.endpoint.setAttribute("aria-disabled","true"):this.$.endpoint.removeAttribute("aria-disabled")}; l1.prototype.getFilterClass=function(a){switch(a){case"FILTER_STATUS_SELECTED":return"selected";case"FILTER_STATUS_DISABLED":return"disabled";}}; g.Object.defineProperties(l1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ehb){var a=document.createElement("template");a.innerHTML="\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dhb){var d=document.createElement("template");d.innerHTML=""; Dhb=d}d=Dhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ehb=a}a=Ehb;return a}}}); var m1=l1;w([P(X.YtRendererBehavior),x("design:type",Object)],m1.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],m1.prototype,"data",void 0);m1=w([V({is:"ytd-search-filter-renderer"})],m1);var Fhb;var Ghb;var n1=function(){return O.apply(this,arguments)||this}; p(n1,O);n1.prototype.configureRendererStamper=function(){return{"data.detailedSearchRenderer":{id:"detailsContainer",mapping:{geoSearchDetailsRenderer:{component:"ytd-geo-search-details-renderer"}}}}}; n1.prototype.toggleFilters_=function(){this.renderCollapsibleMenu_||(this.renderCollapsibleMenu_=!0,Polymer.dom.flush());this.isCollapsed_=!this.isCollapsed_}; n1.prototype.dataChanged_=function(){this.isCollapsed_=!0}; g.Object.defineProperties(n1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ghb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fhb){var d=document.createElement("template");d.innerHTML=""; Fhb=d}d=Fhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ghb=a}a=Ghb;return a}}}); var o1=n1;w([P(X.YtRendererBehavior),x("design:type",Object)],o1.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],o1.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],o1.prototype,"data",void 0);w([R(),x("design:type",Boolean)],o1.prototype,"renderCollapsibleMenu_",void 0);w([R(),x("design:type",Boolean)],o1.prototype,"isCollapsed_",void 0);o1=w([V({is:"ytd-search-sub-menu-renderer"})],o1);var Hhb;var Ihb;var Jhb=function(){return O.apply(this,arguments)||this}; p(Jhb,O); g.Object.defineProperties(Jhb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ihb){var a=document.createElement("template");a.innerHTML="
\n
\n
[[data.channelTitle]]
\n \n
\n
\n \n \n \n \n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hhb){var d=document.createElement("template");d.innerHTML=""; Hhb=d}d=Hhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ihb=a}a=Ihb;return a}}}); var p1=Jhb;w([P(X.YtRendererBehavior),x("design:type",Object)],p1.prototype,"kevlarBehaviors",void 0);w([R(),x("design:type",Object)],p1.prototype,"data",void 0);p1=w([V({is:"ytd-channel-age-gate-renderer"})],p1);var Khb;var Lhb;TO("sharingItemSection","channelOwnerEmptyStateRenderer","ytd-channel-owner-empty-state-renderer");var q1=function(){var a=O.apply(this,arguments)||this;a.data=null;return a}; p(q1,O);q1.prototype.configureRendererStamper=function(){return{"data.uploadVideoButton":{id:"upload-video-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(q1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lhb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n
\n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Khb){var d=document.createElement("template");d.innerHTML=""; Khb=d}d=Khb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lhb=a}a=Lhb;return a}}}); var r1=q1;w([P(Z),x("design:type",Object)],r1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],r1.prototype,"data",void 0);r1=w([V({is:"ytd-channel-owner-empty-state-renderer"})],r1);var Mhb;var Nhb;var Ohb;var Phb;var Qhb;var Rhb;function s1(a,b){return a.year===b.year&&a.month===b.month&&a.day===b.day} function t1(a,b){return a.year!==b.year?a.yeard;d++)c.push(MA.NARROWWEEKDAYS[(d+Whb)%7]);return{months:Yhb(a,b),daysOfWeekLabel:c}}}}); g.Object.defineProperties(x1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rhb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qhb){var d=document.createElement("template");d.innerHTML=""; Qhb=d}d=Qhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rhb=a}a=Rhb;return a}}}); var y1=x1;w([P([W.YtActionSenderBehavior]),x("design:type",Object)],y1.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],y1.prototype,"calendarConfig",void 0);w([CE("#calendar-main"),x("design:type",Object)],y1.prototype,"calendarMain",void 0);w([BE("calendarConfig"),x("design:type",Object),x("design:paramtypes",[])],y1.prototype,"renderData",null);y1=w([V({is:"ytd-scrollable-calendar"})],y1);var z1=function(){var a=O.apply(this,arguments)||this;a.data=void 0;a.selectionState="START_DATE";a.isStartDateInvalid=!1;a.isEndDateInvalid=!1;a.autoapply=!1;a.actionMap={"ytd-calendar-date-clicked":"handleCalendarDateClicked","ytd-calendar-date-mousedown":"handleCalendarDateMouseDown","ytd-calendar-date-mouseup":"handleCalendarDateMouseUp","ytd-calendar-date-mouseenter":"handleCalendarDateMouseEnter","ytd-calendar-date-mouseleave":"handleCalendarDateMouseLeave","yt-signal-action-submit-form":"handleCalendarSubmitDateRange"}; return a}; p(z1,O);e=z1.prototype;e.configureRendererStamper=function(){return{"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{attributes:{"dialog-dismiss":!0},component:"ytd-button-renderer"}}},"data.applyButton":{id:"apply-button",mapping:{buttonRenderer:{attributes:{"dialog-dismiss":!0},component:"ytd-button-renderer"}}}}}; e.focus=function(){this.startDateInput.focus()}; e.dataChanged=function(){this.data&&this.data.selection&&(this.selection={start:v1(this.data.selection.start),end:v1(this.data.selection.end)})}; e.observeSelection=function(){this.selection&&this.updateCalendarSelection(this.selection);this.isEndDateInvalid=this.isStartDateInvalid=!1;this.updateDateStrings()}; e.resetTextboxes=function(){switch(this.selectionState){case"START_DATE":this.isStartDateInvalid=!1;break;case"END_DATE":this.isEndDateInvalid=!1;break;default:$a(this.selectionState);}}; e.onDateInputBlur=function(){this.isEndDateInvalid=this.isStartDateInvalid=!1;this.updateDateStrings()}; e.onStartDateTapOrFocus=function(){this.startDate&&this.calendar.scrollToDate(this.startDate);this.selectionState="START_DATE"}; e.onEndDateTapOrFocus=function(){this.endDate&&this.calendar.scrollToDate(this.endDate);this.selectionState="END_DATE"}; e.onStartDateTextChange=function(){if(this.calendar.calendarConfig){var a=this.calendar.calendarConfig,b=a.end;a=$hb({start:a.start,end:this.endDate||b},this.startDateInput.value||"");this.isStartDateInvalid=!a.isValid;a.isValid&&(a=a.value,this.selection=this.endDate?{start:a,end:this.endDate}:a,this.calendar.scrollToDate(a));this.updateInvalidState()}}; e.onEndDateTextChange=function(){if(this.calendar.calendarConfig){var a=this.calendar.calendarConfig,b=a.start;a=$hb({start:this.startDate||b,end:a.end},this.endDateInput.value||"");this.isEndDateInvalid=!a.isValid;a.isValid&&(a=a.value,this.selection={start:this.startDate,end:a},this.calendar.scrollToDate(a));this.updateInvalidState()}}; e.handleCalendarDateClicked=function(a){var b=this.selection&&Uhb(this.selection),c=this.selection&&Vhb(this.selection);b&&!t1(a,b)&&"END_DATE"===this.selectionState?(this.selection={start:b,end:a},this.selectionState="START_DATE"):(this.selection=c&&!t1(c,a)?{start:a,end:c}:a,this.selectionState="END_DATE")}; e.handleCalendarDateMouseDown=function(a){this.selection&&!w1(this.selection)&&(this.dragPivot=s1(a,this.selection.start)?this.selection.end:s1(a,this.selection.end)?this.selection.start:a)}; e.handleCalendarDateMouseUp=function(){this.dragPivot=void 0}; e.handleCalendarDateMouseEnter=function(a){this.dragPivot&&(this.selection={start:function(b,c){return t1(b,c)?b:c}(this.dragPivot,a), end:function(b,c){return t1(b,c)?c:b}(this.dragPivot,a)},this.dragPivot||(this.selectionState="START_DATE"))}; e.handleCalendarDateMouseLeave=function(){}; e.handleCalendarSubmitDateRange=function(){this.selection&&!w1(this.selection)&&this.ytActionSenderBehavior.sendAction("ytd-date-period-picker-apply",[this.selection])}; e.updateInvalidState=function(){var a=function(b,c){c?b.setAttribute("invalid",""):b.removeAttribute("invalid")}; a(this.startDateInput,this.isStartDateInvalid);a(this.endDateInput,this.isEndDateInvalid)}; e.updateDateStrings=function(){this.selection&&(w1(this.selection)?(this.startDateString=Shb(this.selection),this.endDateString=""):(this.startDateString=Shb(this.selection.start),this.endDateString=Shb(this.selection.end)))}; e.updateCalendarSelection=function(a){this.calendar.updateSelection(Object.assign(Object.assign({},a),{selectionState:this.selectionState}))}; g.Object.defineProperties(z1.prototype,{calendarConfig:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.selection?{start:v1(this.data.dateRangeStart),end:v1(this.data.dateRangeEnd),selection:{start:v1(this.data.selection.start),end:v1(this.data.selection.end)},circleToday:!0}:{}}}, errorMessage:{configurable:!0,enumerable:!0,get:function(){var a;return null===(a=this.data)||void 0===a?void 0:a.errorMessage}}, startDate:{configurable:!0,enumerable:!0,get:function(){return this.selection&&Uhb(this.selection)}}, endDate:{configurable:!0,enumerable:!0,get:function(){return this.selection&&Vhb(this.selection)}}}); g.Object.defineProperties(z1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Phb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n
\n
\n
\u2013
\n
\n \n \n
\n \n
\n
\n
\n
\n\n\n\n\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ohb){var d=document.createElement("template");d.innerHTML=""; Ohb=d}d=Ohb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Phb=a}a=Phb;return a}}}); var A1=z1;A1.prototype.resetTextboxes=A1.prototype.resetTextboxes;A1.prototype.observeSelection=A1.prototype.observeSelection;A1.prototype.dataChanged=A1.prototype.dataChanged;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],A1.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],A1.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],A1.prototype,"ytRendererstamperBehavior",void 0); w([CE("#calendar"),x("design:type",y1)],A1.prototype,"calendar",void 0);w([CE("#start-date"),x("design:type",i0)],A1.prototype,"startDateInput",void 0);w([CE("#end-date"),x("design:type",i0)],A1.prototype,"endDateInput",void 0);w([R(),x("design:type",Object)],A1.prototype,"data",void 0);w([R(),x("design:type",Object)],A1.prototype,"selection",void 0);w([R(),x("design:type",String)],A1.prototype,"selectionState",void 0); w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],A1.prototype,"calendarConfig",null);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],A1.prototype,"errorMessage",null);w([BE("selection"),x("design:type",Object),x("design:paramtypes",[])],A1.prototype,"startDate",null);w([BE("selection"),x("design:type",Object),x("design:paramtypes",[])],A1.prototype,"endDate",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A1.prototype,"dataChanged",null);w([U("selection","selectionState"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A1.prototype,"observeSelection",null);w([U("selectionState"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A1.prototype,"resetTextboxes",null);A1=w([V({is:"ytd-date-period-picker-renderer"})],A1); function $hb(a,b){a:{var c=void 0===c?[2,3]:c;c=k(c);for(var d=c.next();!d.done;d=c.next()){var f=new Date;d=new AH(d.value);if(YGa(d,b,f,0,!0)){f.setHours(0,0,0,0);b=f;break a}}b=null}if(!b)return{isValid:!1,value:void 0};b=u1(b);c=a.end;return t1(b,a.start)||t1(c,b)?{isValid:!1,value:void 0}:{isValid:!0,value:b}} ;var B1=function(){var a=O.apply(this,arguments)||this;var b={};a.actionMap=(b["ytd-date-period-picker-apply"]="handleDateRangeUpdated",b);return a}; p(B1,O);B1.prototype.configureRendererStamper=function(){return{"data.timeRangeDropdown":{id:"time-range-dropdown",mapping:{sortFilterSubMenuRenderer:"yt-sort-filter-sub-menu-renderer"}}}}; B1.prototype.handleDateRangeUpdated=function(){}; g.Object.defineProperties(B1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nhb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mhb){var d=document.createElement("template");d.innerHTML=""; Mhb=d}d=Mhb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nhb=a}a=Nhb;return a}}}); var C1=B1;w([R(),x("design:type",Object)],C1.prototype,"data",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],C1.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],C1.prototype,"actionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],C1.prototype,"rendererstamperBehavior",void 0);C1=w([V({is:"ytd-report-history-section-header-renderer"})],C1);var aib;var bib;var D1=function(){return O.apply(this,arguments)||this}; p(D1,O);g.Object.defineProperties(D1.prototype,{icon:{configurable:!0,enumerable:!0,get:function(){var a,b;return(null===(b=null===(a=this.data)||void 0===a?void 0:a.icon)||void 0===b?0:b.iconType)?jO(this.data.icon.iconType):""}}}); g.Object.defineProperties(D1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bib){var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===aib){var d=document.createElement("template");d.innerHTML=""; aib=d}d=aib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bib=a}a=bib;return a}}}); var E1=D1;w([R(),x("design:type",Object)],E1.prototype,"data",void 0);w([BE("data"),x("design:type",String),x("design:paramtypes",[])],E1.prototype,"icon",null);E1=w([V({is:"ytd-report-history-table-text-cell-renderer"})],E1);var cib;var dib;var F1=function(){return O.apply(this,arguments)||this}; p(F1,O);F1.prototype.configureRendererStamper=function(){return{"data.reportedContent":{id:"content-info",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer"}},"data.reasonsTable":{id:"reasons-table",mapping:{tableRenderer:"ytd-table-renderer"}},"data.doneButton":{id:"done-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; g.Object.defineProperties(F1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dib){var a=document.createElement("template");a.innerHTML="
\n

\n \n

\n
\n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cib){var d=document.createElement("template");d.innerHTML=""; cib=d}d=cib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dib=a}a=dib;return a}}}); var G1=F1;w([P(Z),x("design:type",Object)],G1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],G1.prototype,"data",void 0);G1=w([V({is:"ytd-report-reason-history-modal-renderer"})],G1);var eib;var fib;var H1=function(){return O.apply(this,arguments)||this}; p(H1,O);H1.prototype.configureRendererStamper=function(){return{"data.cell":{id:"cell-container",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer",reportHistoryTableReasonCellRenderer:"ytd-report-history-table-reason-cell-renderer"}}}}; g.Object.defineProperties(H1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fib){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===eib){var d=document.createElement("template");d.innerHTML="";eib=d}d=eib; c.call(b,d.content.cloneNode(!0),a.content.firstChild);fib=a}a=fib;return a}}}); var I1=H1;w([P(Z),x("design:type",Object)],I1.prototype,"rendererstamperBehavior",void 0);w([R(),x("design:type",Object)],I1.prototype,"data",void 0);I1=w([V({is:"ytd-report-history-table-cell-renderer"})],I1);var gib;var hib;var J1=function(){return O.apply(this,arguments)||this}; p(J1,O);J1.prototype.configureRendererStamper=function(){return{"data.latestReason":{id:"latest-reason",mapping:{reportHistoryTableTextCellRenderer:"ytd-report-history-table-text-cell-renderer"}}}}; g.Object.defineProperties(J1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hib){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gib){var d=document.createElement("template");d.innerHTML=""; gib=d}d=gib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hib=a}a=hib;return a}}}); var K1=J1;w([P(Z),x("design:type",Object)],K1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],K1.prototype,"data",void 0);K1=w([V({is:"ytd-report-history-table-reason-cell-renderer"})],K1);var iib;var jib;var L1=function(){var a=O.apply(this,arguments)||this;a.columnType={type:"REPORT_HISTORY_COLUMN_TYPE",content:"REPORT_HISTORY_COLUMN_CONTENT",reason:"REPORT_HISTORY_COLUMN_REASON",status:"REPORT_HISTORY_COLUMN_STATUS",date:"REPORT_HISTORY_COLUMN_DATE"};return a}; p(L1,O);L1.prototype.onDataChanged=function(){var a;if(null===(a=this.data)||void 0===a?0:a.style)this.componentStyle=this.getStyleName(this.data.style)}; L1.prototype.getCellForColumn=function(a){return this.cells.find(function(b){var c,d,f;return(null===(f=(null===(c=null===b||void 0===b?void 0:b.cell)||void 0===c?void 0:c.reportHistoryTableReasonCellRenderer)||(null===(d=null===b||void 0===b?void 0:b.cell)||void 0===d?void 0:d.reportHistoryTableTextCellRenderer))||void 0===f?void 0:f.columnId)===a.type})}; L1.prototype.getClassForColumn=function(a){switch(a){case"REPORT_HISTORY_COLUMN_DATE":return"date";default:return"";}}; L1.prototype.getStyleName=function(a){switch(a){case"REPORT_HISTORY_ROW_STYLE_COMPACT":return"COMPACT_ROW";default:return"";}}; g.Object.defineProperties(L1.prototype,{cells:{configurable:!0,enumerable:!0,get:function(){var a;return((null===(a=this.data)||void 0===a?void 0:a.cells)||[]).map(function(b){return b.reportHistoryTableCellRenderer})}}}); g.Object.defineProperties(L1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jib){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===iib){var d=document.createElement("template");d.innerHTML=""; iib=d}d=iib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jib=a}a=jib;return a}}}); var M1=L1;M1.prototype.onDataChanged=M1.prototype.onDataChanged;w([R(),x("design:type",Object)],M1.prototype,"data",void 0);w([R(),x("design:type",Array)],M1.prototype,"columnRenderData",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],M1.prototype,"componentStyle",void 0);w([BE("data"),x("design:type",Array),x("design:paramtypes",[])],M1.prototype,"cells",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],M1.prototype,"onDataChanged",null);M1=w([V({is:"ytd-report-history-table-row-renderer"})],M1);var kib;var lib;function mib(a){var b=nib;b=void 0===b?N1:b;var c=a.columnsToShow||[],d=oib(a.columnDimensions,a.columnsToShow,a.leftFloatingColumns,b);return c.map(function(f,h){var l=a.columns[f];if(void 0===l)throw Error("columnSpec mismatch");var m=d?d[h]:ec({});var n=a.getCustomTooltip?a.getCustomTooltip(f,l.headerTooltipParagraphs):l.headerTooltipParagraphs;var r=pib(a,f);return{type:f,index:h,style:m,classes:r,headerName:l.headerName||"",headerIcon:l.headerIcon,headerTooltipParagraphs:n||[],headerTooltipHelpContext:l.headerTooltipHelpContext, sortOrders:l.sortOrders||[],selectionState:l.isSelectionCheckbox?a.selectionState:void 0}})} function pib(a,b){var c=["DEFAULTS","FLOATING","RIGHT_ALIGN","SORTING"],d=a.columns[b];if(void 0===d)return"";var f=c.includes("DEFAULTS")&&d.cssClass?[d.cssClass]:[];if(c.includes("SORTING")){d.sortOrders&&d.sortOrders.length&&f.push("sortable");if(a.sorting&&a.sorting.columnType===b)a:switch(a.sorting.sortOrder){case"ASCENDING":case"DESCENDING":var h="column-sorted";break a;default:h="";}else h="";h&&f.push(h)}c.includes("FLOATING")&&(b=a.columnsToShow.indexOf(b),a.leftFloatingColumns&&b
\n
\n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kib){var d=document.createElement("template");d.innerHTML=""; kib=d}d=kib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lib=a}a=lib;return a}}}); var P1=O1;w([P(yU),x("design:type",Object)],P1.prototype,"ytContinuationHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],P1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P1.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],P1.prototype,"tableSpec",null);w([BE("tableSpec"),x("design:type",Array),x("design:paramtypes",[])],P1.prototype,"columnRenderData",null); w([BE("tableSpec"),x("design:type",Number),x("design:paramtypes",[])],P1.prototype,"totalMinWidth",null);w([BE("totalMinWidth"),x("design:type",dc),x("design:paramtypes",[])],P1.prototype,"tableWidthStyle",null);P1=w([V({is:"ytd-table-renderer"})],P1); function rib(a){var b=a.reduce(function(d,f){var h=f.columnId,l,m={};f.headerText&&(m.headerName=nL(f.headerText));f.rightAlignHeader&&(m.rightAlignHeader=f.rightAlignHeader);if(null===(l=f.headerIcon)||void 0===l?0:l.iconType)m.headerIcon=jO(f.headerIcon.iconType);d[h]=m;return d},{}),c=a.filter(function(d){return!d.hideColumn}).map(function(d){return d.columnId}); a=a.filter(function(d){return!!d.dimensions}).reduce(function(d,f){d[f.columnId]=f.dimensions; return d},{}); return{columns:b,columnsToShow:c,columnDimensions:a}} ;var sib;var tib;var Q1=function(){return O.apply(this,arguments)||this}; p(Q1,O);Q1.prototype.configureRendererStamper=function(){return{"data.reportHistorySectionRenderers":{id:"items",mapping:{videoReportRenderer:"ytd-video-report-renderer"}},"data.header":{id:"header",mapping:{reportHistorySectionHeaderRenderer:"ytd-report-history-section-header-renderer"}},"data.table":{id:"history-table",mapping:{tableRenderer:"ytd-table-renderer",messageRenderer:"ytd-message-renderer"}}}}; Q1.prototype.configureContinuationPathMap=function(){return{"yt-reload-continuation-items-command-body":"table"}}; Q1.prototype.onRequestError=function(){this.ytContinuationHandlerBehavior.continuationIsReloading=!1}; g.Object.defineProperties(Q1.prototype,{isUnifiedReportHistory:{configurable:!0,enumerable:!0,get:function(){var a,b;return!!((null===(a=this.data)||void 0===a?0:a.header)&&(null===(b=this.data)||void 0===b?0:b.table))}}}); g.Object.defineProperties(Q1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tib){var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===sib){var d=document.createElement("template");d.innerHTML=""; sib=d}d=sib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tib=a}a=tib;return a}}}); var R1=Q1;R1.prototype.onRequestError=R1.prototype.onRequestError;w([P(yU),x("design:type",Object)],R1.prototype,"ytContinuationHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],R1.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],R1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],R1.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],R1.prototype,"isUnifiedReportHistory",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],R1.prototype,"onRequestError",null);R1=w([V({is:"ytd-report-history-section-renderer"})],R1);var uib;var vib;var wib=function(){return O.apply(this,arguments)||this}; p(wib,O); g.Object.defineProperties(wib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===uib){var d=document.createElement("template");d.innerHTML=""; uib=d}d=uib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vib=a}a=vib;return a}}}); var S1=wib;w([P(X.YtRendererBehavior),x("design:type",Object)],S1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],S1.prototype,"data",void 0);S1=w([V({is:"ytd-report-description-renderer"})],S1);var xib;var yib;var T1=function(){return O.apply(this,arguments)||this}; p(T1,O);T1.prototype.configureRendererStamper=function(){return{"data.description":{id:"description",mapping:{reportDescriptionRenderer:"ytd-report-description-renderer"}}}}; g.Object.defineProperties(T1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yib){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xib){var d=document.createElement("template");d.innerHTML=""; xib=d}d=xib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yib=a}a=yib;return a}}}); var U1=T1;w([P(Z),x("design:type",Object)],U1.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],U1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],U1.prototype,"data",void 0);U1=w([V({is:"ytd-video-report-renderer"})],U1);var zib;var Aib;var Bib=function(){return O.apply(this,arguments)||this}; p(Bib,O); g.Object.defineProperties(Bib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Aib){var a=document.createElement("template");a.innerHTML="\n \n \n
[[getSimpleString(data.title)]]
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zib){var d=document.createElement("template");d.innerHTML=""; zib=d}d=zib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aib=a}a=Aib;return a}}}); var V1=Bib;w([P(X.YtRendererBehavior),x("design:type",Object)],V1.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],V1.prototype,"data",void 0);V1=w([V({is:"ytd-channel-list-sub-menu-avatar-renderer"})],V1);var Cib;var Dib;var W1=function(){return O.apply(this,arguments)||this}; p(W1,O);W1.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{channelListSubMenuAvatarRenderer:"ytd-channel-list-sub-menu-avatar-renderer"}}}}; g.Object.defineProperties(W1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dib){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cib){var d=document.createElement("template");d.innerHTML=""; Cib=d}d=Cib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dib=a}a=Dib;return a}}}); var X1=W1;w([P(Z),x("design:type",Object)],X1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],X1.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],X1.prototype,"aligment",void 0);X1=w([V({is:"ytd-channel-list-sub-menu-renderer"})],X1);var Eib;var Fib;var Y1=function(){return O.apply(this,arguments)||this}; p(Y1,O);Y1.prototype.configureRendererStamper=function(){return{"data.playAllButton":{id:"play-all",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.rightButtons":{id:"right-buttons",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.sortSetting":{id:"sort-menu",mapping:{sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",params:{isRightAligned:!0}}}}}}; g.Object.defineProperties(Y1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Eib){var d=document.createElement("template");d.innerHTML=""; Eib=d}d=Eib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fib=a}a=Fib;return a}}}); var Z1=Y1;w([P(X.YtRendererBehavior),x("design:type",Object)],Z1.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],Z1.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],Z1.prototype,"data",void 0);Z1=w([V({is:"ytd-channel-sub-menu-renderer"})],Z1);var Gib;var Hib;var $1=function(){return O.apply(this,arguments)||this}; p($1,O);$1.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.viewChannelButton":{id:"view-channel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{alignByText:!0}}}}}}; g.Object.defineProperties($1,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hib){var a=document.createElement("template");a.innerHTML="

\n \n \n
\n [[getSimpleString(data.title)]]\n
\n
\n
\n

\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gib){var d=document.createElement("template");d.innerHTML=""; Gib=d}d=Gib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hib=a}a=Hib;return a}}}); var a2=$1;w([P(X.YtRendererBehavior),x("design:type",Object)],a2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],a2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],a2.prototype,"data",void 0);a2=w([V({is:"ytd-feed-channel-filter-header-renderer"})],a2);var Iib;var Jib;TO("sharingItemSection","itemSectionRenderer","ytd-item-section-renderer");var b2=function(){return O.apply(this,arguments)||this}; p(b2,O);b2.prototype.configureRendererStamper=function(){return{renderableData:{id:"contents",mapping:{itemSectionRenderer:"ytd-item-section-renderer"}}}}; b2.prototype.attached=function(){this.set("renderableData",{})}; b2.prototype.detached=function(){this.set("renderableData",{})}; b2.prototype.reduxChanged=function(a){var b=this;this.debounce("renderableData",function(){b.set("renderableData",{itemSectionRenderer:a})})}; g.Object.defineProperties(b2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jib){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Iib){var d=document.createElement("template");d.innerHTML="";Iib=d}d=Iib;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Jib=a}a=Jib;return a}}}); var c2=b2;c2.prototype.reduxChanged=c2.prototype.reduxChanged;w([P(CQ),x("design:type",Object)],c2.prototype,"ytdReduxBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],c2.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],c2.prototype,"ytComponentBehavior",void 0);w([P(Z),x("design:type",Object)],c2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],c2.prototype,"renderableData",void 0); w([R({selector:function(a){a=BRa(a.download);return yRa(a)}}), x("design:type",Object)],c2.prototype,"offlineItemSectionData",void 0);w([U("offlineItemSectionData"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],c2.prototype,"reduxChanged",null);c2=w([V({is:"ytd-offline-item-section-renderer"})],c2);var Kib;var Lib;var d2=function(){var a=O.apply(this,arguments)||this;a.isSearch=!1;a.nextContinuation={continuationType:"sectionListContinuation"};return a}; p(d2,O);e=d2.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{feedChannelFilterHeaderRenderer:{component:"ytd-feed-channel-filter-header-renderer",noInjection:!0},textHeaderRenderer:{component:"ytd-text-header-renderer",noInjection:!0},richListHeaderRenderer:{component:"ytd-rich-list-header-renderer",noInjection:!0},headerWithBackRenderer:{component:"yt-header-with-back-renderer",noInjection:!0}}},"data.subMenu":{id:"sub-menu",mapping:{searchSubMenuRenderer:{component:"ytd-search-sub-menu-renderer",noInjection:!0}, channelSubMenuRenderer:{component:"ytd-channel-sub-menu-renderer",noInjection:!0},channelListSubMenuRenderer:{component:"ytd-channel-list-sub-menu-renderer",noInjection:!0},sortFilterSubMenuRenderer:{component:"yt-sort-filter-sub-menu-renderer",noInjection:!0}}},shownItems:{id:"contents",mapping:{itemSectionRenderer:{matcher:function(a){switch(a.sectionIdentifier){case"comment-item-section":return"ytd-comments";case"backstage-item-section":return"ytd-backstage-items";default:return"ytd-item-section-renderer";}}, properties:{isSearchDova:"[[isSearchDova]]",isSearch:"[[isSearch]]"},noInjection:!0},channelOwnerEmptyStateRenderer:{component:"ytd-channel-owner-empty-state-renderer",noInjection:!0},channelAgeGateRenderer:{component:"ytd-channel-age-gate-renderer",noInjection:!0},pageIntroductionRenderer:{component:"ytd-page-introduction-renderer",noInjection:!0},reportHistorySectionRenderer:{component:"ytd-report-history-section-renderer",noInjection:!0},sponsorshipsManagementRenderer:{component:"ytd-sponsorships-management-renderer", noInjection:!0},offlineItemSectionRenderer:{component:"ytd-offline-item-section-renderer",noInjection:!0},continuationItemRenderer:"ytd-continuation-item-renderer"}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",noInjection:!0}},renderPriority:N("kevlar_low_priority_continuation")?0:void 0,usePageScheduler:N("kevlar_low_priority_continuation")}}}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents","yt-reload-continuation-items-command-body":"contents"}}; e.getItemsPath=function(){return"data.contents"}; e.replacePrimaryContent=function(a){this.set("data.contents",a)}; e.computeHasSortFilter_=function(a){return!!a&&!!a.sortFilterSubMenuRenderer}; g.Object.defineProperties(d2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kib){var d=document.createElement("template");d.innerHTML=""; Kib=d}d=Kib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lib=a}a=Lib;return a}}}); var e2=d2;w([P(X.YtRendererBehavior),x("design:type",Object)],e2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],e2.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ),x("design:type",Object)],e2.prototype,"ytLazyListBehavior",void 0);w([P(NQ),x("design:type",Object)],e2.prototype,"ytNextContinuationBehavior",void 0);w([P(R0a.YtBooleanLogicBehavior),x("design:type",Object)],e2.prototype,"ytBooleanLogicBehavior",void 0); w([P(yU),x("design:type",Object)],e2.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],e2.prototype,"data",void 0);w([R({value:2}),x("design:type",Number)],e2.prototype,"initialCount",void 0);w([R({value:!0}),x("design:type",Boolean)],e2.prototype,"autoFill",void 0);w([R({reflectToAttribute:!0,computed:"computeHasSortFilter_(data.subMenu)"}),x("design:type",Boolean)],e2.prototype,"hasSortFilter",void 0); w([R({reflectToAttribute:!0,computed:"toBool(data.hideBottomSeparator)"}),x("design:type",Boolean)],e2.prototype,"hideBottomSeparator",void 0);w([R(),x("design:type",Object)],e2.prototype,"isSearch",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],e2.prototype,"pageSubtype",void 0);e2=w([V({is:"ytd-section-list-renderer"})],e2);var Mib;var Nib;var f2=function(){return O.apply(this,arguments)||this}; p(f2,O);f2.prototype.computeStyle=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; g.Object.defineProperties(f2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nib){var a=document.createElement("template");a.innerHTML="[[getSimpleString(data.title)]]\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mib){var d=document.createElement("template");d.innerHTML=""; Mib=d}d=Mib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nib=a}a=Nib;return a}}}); var g2=f2;w([P(X.YtRendererBehavior),x("design:type",Object)],g2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],g2.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],g2.prototype,"headerStyle",void 0);g2=w([V({is:"ytd-text-header-renderer"})],g2);var Oib;var Pib;var h2=function(){return O.apply(this,arguments)||this}; p(h2,O);h2.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.secondaryActionButton":{id:"secondary-action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; g.Object.defineProperties(h2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Pib){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Oib){var d=document.createElement("template");d.innerHTML=""; Oib=d}d=Oib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pib=a}a=Pib;return a}}}); var i2=h2;w([P(X.YtRendererBehavior),x("design:type",Object)],i2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],i2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],i2.prototype,"data",void 0);i2=w([V({is:"ytd-sponsorships-alert-renderer"})],i2);var Qib;var Rib;var j2=function(){return O.apply(this,arguments)||this}; p(j2,O);e=j2.prototype;e.configureRendererStamper=function(){return{"data.expandableItems":{id:"content-container",mapping:{sponsorshipsPerksRenderer:{component:"ytd-sponsorships-perks-renderer"},sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"}}}}}; e.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"}; e.onToggleExpand=function(){this.data.expandableItems&&this.set("expanded",!this.get("expanded"))}; e.computeMessageContainerStyle=function(a){var b=a.expandableItems?" style-clickable":"";return a.messageContainerStyle?a.messageContainerStyle.split("MESSAGE_CONTAINER_")[1].replace(/_/g,"-").toLowerCase()+b:"style-unspecified"+b}; e.isSinglePerk=function(a){return!!a.messageContainerStyle&&("MESSAGE_CONTAINER_STYLE_SINGLE_PERK"===a.messageContainerStyle||"MESSAGE_CONTAINER_STYLE_SINGLE_PERK_FIRST"===a.messageContainerStyle)}; e.onExpandedChanged=function(){var a=this;this.expanded&&this.querySelectorAll("yt-img-shadow").forEach(function(b){b.onShow()}); Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})}; e.onDataChanged=function(){this.get("data.startExpanded")&&(this.expanded=!0)}; g.Object.defineProperties(j2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qib){var d=document.createElement("template");d.innerHTML=""; Qib=d}d=Qib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rib=a}a=Rib;return a}}}); var k2=j2;w([P(X.YtRendererBehavior),x("design:type",Object)],k2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],k2.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],k2.prototype,"data",void 0);w([R({observer:"onExpandedChanged",value:!1}),x("design:type",Boolean)],k2.prototype,"expanded",void 0);k2=w([V({is:"ytd-sponsorships-expandable-message-renderer"})],k2);var Sib;var Tib;var l2=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(l2,O);l2.prototype.getBadgeRowClass=function(a,b,c){this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()}); a=a.selected;return c?-1!==a?a===b?"badge-line badge-selected":"badge-line badge-not-selected":"badge-line":(void 0!==a?a:0)===b?"badge-line":"badge-hidden"}; g.Object.defineProperties(l2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sib){var d=document.createElement("template");d.innerHTML=""; Sib=d}d=Sib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tib=a}a=Tib;return a}}}); var m2=l2;w([P(X.YtRendererBehavior),x("design:type",Object)],m2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],m2.prototype,"data",void 0);w([R(),x("design:type",Object)],m2.prototype,"expanded",void 0);m2=w([V({is:"ytd-sponsorships-loyalty-badges-renderer"})],m2);var Uib;var Vib;var n2=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(n2,O);n2.prototype.getContainerClasses=function(a,b){a=a?"expanded":"collapsed";b&&(a+=" item");return a}; g.Object.defineProperties(n2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vib){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Uib){var d=document.createElement("template");d.innerHTML=""; Uib=d}d=Uib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vib=a}a=Vib;return a}}}); var o2=n2;w([P(X.YtRendererBehavior),x("design:type",Object)],o2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],o2.prototype,"data",void 0);w([R(),x("design:type",Object)],o2.prototype,"expanded",void 0);o2=w([V({is:"ytd-sponsorships-perk-renderer"})],o2);var Wib;var Xib;var Yib=function(){var a=O.apply(this,arguments)||this;a.expanded=!0;return a}; p(Yib,O); g.Object.defineProperties(Yib,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xib){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wib){var d=document.createElement("template");d.innerHTML=""; Wib=d}d=Wib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xib=a}a=Xib;return a}}}); var p2=Yib;w([P(X.YtRendererBehavior),x("design:type",Object)],p2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],p2.prototype,"data",void 0);w([R(),x("design:type",Object)],p2.prototype,"expanded",void 0);p2=w([V({is:"ytd-sponsorships-perks-renderer"})],p2);var Zib;var $ib;var q2=function(){return O.apply(this,arguments)||this}; p(q2,O);q2.prototype.configureRendererStamper=function(){return{"data.endButton":{id:"end-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.bottomButton":{id:"bottom-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; q2.prototype.onDataChanged=function(){this.get("data.endButton.buttonRenderer.text")&&this.get("data.endButton.buttonRenderer.icon")&&(this.data.endButton.buttonRenderer.iconPosition="BUTTON_ICON_POSITION_TYPE_RIGHT_OF_TEXT")}; g.Object.defineProperties(q2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$ib){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zib){var d=document.createElement("template");d.innerHTML=""; Zib=d}d=Zib;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$ib=a}a=$ib;return a}}}); var r2=q2;r2.prototype.onDataChanged=r2.prototype.onDataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],r2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],r2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],r2.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],r2.prototype,"onDataChanged",null);r2=w([V({is:"ytd-sponsorships-heading-renderer"})],r2);var ajb;var bjb;var cjb=function(){return O.apply(this,arguments)||this}; p(cjb,O); g.Object.defineProperties(cjb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bjb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ajb){var d=document.createElement("template");d.innerHTML=""; ajb=d}d=ajb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bjb=a}a=bjb;return a}}}); var s2=cjb;w([R(),x("design:type",Object)],s2.prototype,"data",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],s2.prototype,"ytRendererBehavior",void 0);s2=w([V({is:"ytd-sponsorships-links-renderer"})],s2);var djb;var ejb;var t2=function(){return O.apply(this,arguments)||this}; p(t2,O);e=t2.prototype;e.onDataChanged=function(){this.data&&this.data.expandableItems?this.$$("paper-button").setAttribute("role","button"):this.$$("paper-button").removeAttribute("role")}; e.onToggleExpand=function(){this.data&&this.data.expandableItems&&this.set("expanded",!this.get("expanded"))}; e.getExpansionIcon=function(a){return a?"yt-icons:arrow_drop_up":"yt-icons:arrow_drop_down"}; e.getTileClasses=function(a){return a?"tile expandable-tile":"tile"}; e.getButtonDisabled=function(a){return a?void 0:""}; g.Object.defineProperties(t2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ejb){var a=document.createElement("template");a.innerHTML="\n \n
\n \n \n \n
\n \n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===djb){var d=document.createElement("template");d.innerHTML=""; djb=d}d=djb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ejb=a}a=ejb;return a}}}); var u2=t2;u2.prototype.onDataChanged=u2.prototype.onDataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],u2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],u2.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],u2.prototype,"expanded",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u2.prototype,"onDataChanged",null);u2=w([V({is:"ytd-sponsorships-list-tile-renderer"})],u2);var fjb;var gjb;var v2=function(){return O.apply(this,arguments)||this}; p(v2,O); v2.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{sponsorshipsTierRenderer:{component:"ytd-sponsorships-tier-renderer"},sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"},sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}},"data.sidebar":{id:"sidebar",mapping:{sponsorshipsHeadingRenderer:{component:"ytd-sponsorships-heading-renderer"},sponsorshipsLinksRenderer:{component:"ytd-sponsorships-links-renderer"}, sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}}}; g.Object.defineProperties(v2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gjb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fjb){var d=document.createElement("template");d.innerHTML=""; fjb=d}d=fjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gjb=a}a=gjb;return a}}}); var w2=v2;w([P(X.YtRendererBehavior),x("design:type",Object)],w2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],w2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],w2.prototype,"data",void 0);w2=w([V({is:"ytd-sponsorships-management-renderer"})],w2);var hjb;var ijb;var x2=function(){return O.apply(this,arguments)||this}; p(x2,O);x2.prototype.configureRendererStamper=function(){return{"data.redeemButton":{id:"redeem-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}}}}; g.Object.defineProperties(x2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ijb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hjb){var d=document.createElement("template");d.innerHTML=""; hjb=d}d=hjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ijb=a}a=ijb;return a}}}); var y2=x2;w([P(X.YtRendererBehavior),x("design:type",Object)],y2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],y2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],y2.prototype,"data",void 0);y2=w([V({is:"ytd-sponsorships-promotion-renderer"})],y2);var jjb;var kjb;var z2=function(){return O.apply(this,arguments)||this}; p(z2,O);z2.prototype.configureRendererStamper=function(){return{"data.button":{id:"purchase-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}}}}; g.Object.defineProperties(z2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kjb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n \n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jjb){var d=document.createElement("template");d.innerHTML=""; jjb=d}d=jjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kjb=a}a=kjb;return a}}}); var A2=z2;w([P(X.YtRendererBehavior),x("design:type",Object)],A2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],A2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],A2.prototype,"data",void 0);A2=w([V({is:"ytd-sponsorships-purchase-option-renderer"})],A2);var ljb;var mjb;var B2=function(){return O.apply(this,arguments)||this}; p(B2,O);e=B2.prototype; e.configureRendererStamper=function(){return{"data.purchaseButton":{id:"purchase-button",mapping:{buttonRenderer:{component:"yt-button-renderer"}}},"data.expandableMessage":{id:"expandable-message",mapping:{sponsorshipsExpandableMessageRenderer:{component:"ytd-sponsorships-expandable-message-renderer"}}},"data.premiumFreebiePromo":{id:"premium-freebie-promo",mapping:{sponsorshipsPromotionRenderer:{component:"ytd-sponsorships-promotion-renderer"}}},"data.purchaseOption":{id:"purchase-option",mapping:{sponsorshipsPurchaseOptionRenderer:{component:"ytd-sponsorships-purchase-option-renderer"}}}, "data.alternativePurchaseOption":{id:"alternative-purchase-option",mapping:{sponsorshipsPurchaseOptionRenderer:{component:"ytd-sponsorships-purchase-option-renderer"}}}}}; e.expansionCTA=function(a,b){return a&&(b?a.collapseCallToAction:a.expansionCallToAction)}; e.getExpansionIcon=function(a){return a?"arrow_drop_up":"arrow_drop_down"}; e.expansionCallToActionTap=function(){var a=this;this.expanded=!this.expanded;Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})}; e.onDataChanged=function(){this.expanded=!this.get("data.expansionCallToAction");this.purchaseButtonClicked=!1}; e.computeDisplayTitle=function(a){return!(!a||"show"!==this.titledisplaystatus)}; e.computeDisplaySeparator=function(a){return!!(a&&a.purchaseText&&a.premiumFreebiePromo)}; e.onPurchaseButtonTap=function(){this.purchaseButtonClicked=!0}; g.Object.defineProperties(B2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mjb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n\n\n
\n
\n
\n \n
\n \n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ljb){var d=document.createElement("template");d.innerHTML=""; ljb=d}d=ljb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mjb=a}a=mjb;return a}}}); var C2=B2;w([P(X.YtRendererBehavior),x("design:type",Object)],C2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],C2.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],C2.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],C2.prototype,"expanded",void 0);w([R({value:!1}),x("design:type",Boolean)],C2.prototype,"purchaseButtonClicked",void 0); w([R({reflectToAttribute:!0,value:"show"}),x("design:type",String)],C2.prototype,"titledisplaystatus",void 0);w([R({computed:"computeDisplayTitle(data.title)"}),x("design:type",Boolean)],C2.prototype,"displayTitle",void 0);w([R({computed:"computeDisplaySeparator(data)"}),x("design:type",Boolean)],C2.prototype,"displaySeparator",void 0);C2=w([V({is:"ytd-sponsorships-tier-renderer"})],C2);var njb;var ojb;var D2=function(){var a=O.apply(this,arguments)||this;a.enableImprovedCommunityTab=N("enable_post_renderer_for_kevlar_community_tab");a.actionMap={"yt-add-backstage-comment-action":"addBackstageCommentAction_","yt-add-backstage-post-action":"addBackstagePostAction_","yt-add-backstage-reply-action":"addBackstageReplyAction_","yt-ban-author-action":"banAuthorAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-replace-backstage-comment-action":"replaceBackstageCommentAction_", "yt-replace-backstage-post-action":"replaceBackstagePostAction_","yt-replace-backstage-reply-action":"replaceBackstageReplyAction_"};return a}; p(D2,O);e=D2.prototype;e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.addBackstagePostAction_=function(a){this.get("header.commentsHeaderRenderer.shouldShowBackstagePostOptimistically",this.data)&&(a=this.get("addBackstagePostAction.renderer.backstagePostThreadRenderer",a))&&(this.get("header.commentsHeaderRenderer.zeroStateMessage.backstageZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.zeroStateMessage",{}),this.get("header.commentsHeaderRenderer.schedulingZeroStateMessage.postSchedulingZeroStateRenderer",this.data)&&this.set("data.header.commentsHeaderRenderer.schedulingZeroStateMessage", {}),this.get("data.contents")?this.splice("data.contents",0,0,{backstagePostThreadRenderer:a}):this.set("data.contents",[{backstagePostThreadRenderer:a}]))}; e.addBackstageCommentAction_=function(a){var b=this.get("addBackstageCommentAction.parentId",a);a=this.get("addBackstageCommentAction.renderer.commentThreadRenderer",a);if(b&&a){b=this.postIdToIndices_(b);for(var c=0;cd)break;d="data.contents."+d+".backstagePostThreadRenderer.comments";this.get(d)&&(this.get(d+".backstageCommentsRenderer.contents")&&this.push(d+".backstageCommentsRenderer.contents",{commentThreadRenderer:a}),this.get(d+".backstageCommentsRenderer.teaserContents")? this.push(d+".backstageCommentsRenderer.teaserContents",{commentThreadRenderer:a}):this.set(d+".backstageCommentsRenderer.teaserContents",[{commentThreadRenderer:a}]))}}}; e.addBackstageReplyAction_=function(a){var b=this.get("addBackstageReplyAction.parentId",a);a=this.get("addBackstageReplyAction.renderer.commentRenderer",a);b&&a&&this.setCreatorReply_(b,a)}; e.banAuthorAction_=function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a)||this.getParentPostId_(b),this.remove_(b,a))}; e.hideReportedCommentAction_=function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&((a=this.get("hideReportedCommentAction.parentCommentId",a))||(a=this.getParentPostId_(b)),this.remove_(b,a))}; e.replaceBackstageCommentAction_=function(a){var b=this.get("replaceBackstageCommentAction.commentId",a),c=this.get("replaceBackstageCommentAction.parentId",a);a=this.get("replaceBackstageCommentAction.renderer.commentThreadRenderer",a);if(b&&c&&a){c=this.postIdToIndices_(c);for(var d=0;df)break;var h=this.commentIdToIndex_(b,f,!1);if(0<=h){var l=this.get("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+h+".commentThreadRenderer.replies.commentRepliesRenderer"); l&&(a.replies={commentRepliesRenderer:l});this.splice("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",h,1,{commentThreadRenderer:a})}h=this.commentIdToIndex_(b,f,!0);if(0<=h){if(l=this.get("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+h+".commentThreadRenderer.replies.commentRepliesRenderer"))a.replies={commentRepliesRenderer:l};this.splice("data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents", h,1,{commentThreadRenderer:a})}}}}; e.replaceBackstagePostAction_=function(a){var b=this.get("replaceBackstagePostAction.itemId",a);if(b){b=this.postIdToIndices_(b);for(var c=0;cd)break;var f=this.getPostRendererType_(d),h=this.get("replaceBackstagePostAction.renderer."+f,a);if(!h&&"sharedPostRenderer"!==f)break;var l=!1;h||(l=!0,h=this.get("replaceBackstagePostAction.renderer.backstagePostRenderer",a));if(!h)break;var m={};l?(m.backstagePostRenderer=h,this.set("data.contents."+d+".backstagePostThreadRenderer.post.sharedPostRenderer.originalPost", m)):(m[f]=h,this.set("data.contents."+d+".backstagePostThreadRenderer.post",m))}}}; e.replaceBackstageReplyAction_=function(a){var b=this.get("replaceBackstageReplyAction.replyId",a),c=this.get("replaceBackstageReplyAction.parentId",a);a=this.get("replaceBackstageReplyAction.renderer.commentRenderer",a);b&&a&&c&&this.setCreatorReply_(c,a)}; e.removeCommentAction_=function(a){var b=this.get("removeCommentAction.commentId",a);if(b){var c=this.get("removeCommentAction.parentCommentId",a);c&&this.get("removeCommentAction.isCreatorReply",a)?this.setCreatorReply_(c,void 0):(c||(c=this.getParentPostId_(b)),this.remove_(b,c))}}; e.setCreatorReply_=function(a,b){var c=this.getParentPostId_(a);if(c){c=this.postIdToIndices_(c);for(var d=0;df)break;var h=this.commentIdToIndex_(a,f,!1);if(0<=h){var l="data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents."+h;h=l+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply";l+=".commentThreadRenderer.replies";void 0==b?(this.set(l,{}),this.set(h,!1)):(this.set(l,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}), this.set(l+".commentRepliesRenderer.teaserContents.0.commentRenderer.isCreatorReply",!0),this.set(h,!0))}h=this.commentIdToIndex_(a,f,!0);0<=h&&(h="data.contents."+f+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents."+h,f=h+".commentThreadRenderer.comment.commentRenderer.containsCreatorReply",h+=".commentThreadRenderer.replies",void 0==b?(this.set(h,{}),this.set(f,!1)):(this.set(h,{commentRepliesRenderer:{teaserContents:[{commentRenderer:b}]}}),this.set(f,!0)))}}}; e.remove_=function(a,b){if(b){b=this.postIdToIndices_(b);for(var c=0;cd)break;var f=this.commentIdToIndex_(a,d,!1);0<=f&&this.splice("data.contents."+d+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.contents",f,1);f=this.commentIdToIndex_(a,d,!0);0<=f&&this.splice("data.contents."+d+".backstagePostThreadRenderer.comments.backstageCommentsRenderer.teaserContents",f,1);d=this.enableImprovedCommunityTab?"data.contents."+d+".backstagePostThreadRenderer.post.postRenderer": "data.contents."+d+".backstagePostThreadRenderer.post.backstagePostRenderer";f=d+".backstageAttachment.pollRenderer.votedCommentId";this.get(f)==a&&(this.set(f,null),this.set(d+".backstageAttachment.pollRenderer.commentDelete",null))}}else for(b=this.postIdToIndices_(a).reverse(),c=0;cd)break;f=this.getPostRendererType_(d);var h=this.get("backstagePostThreadRenderer.post."+f,this.data.contents[d]);h.postId===a?this.splice("data.contents",d,1):"sharedPostRenderer"===f&&this.set("data.contents."+ d+".backstagePostThreadRenderer.post.sharedPostRenderer.originalPost",null);h.scheduledPublishTimeSec&&this.ytActionSenderBehavior.sendAction("yt-update-posts-total-count-action",[{updatePostsTotalCountAction:{updateType:"UPDATE_POSTS_TOTAL_COUNT_TYPE_REMOVE",number:1}}])}}; e.postIdToIndices_=function(a){for(var b=[],c=0;cb)return-1;b=null===(m=null===(l=null===(h=null===(f=null===(d=this.data)||void 0===d?void 0:d.contents)||void 0===f?void 0:f[b])||void 0===h?void 0:h.backstagePostThreadRenderer)||void 0===l?void 0:l.comments)||void 0===m?void 0:m.backstageCommentsRenderer;return(c=c?null===b||void 0===b?void 0:b.teaserContents:null===b||void 0===b?void 0:b.contents)&&c.length?mb(c,function(n){return n.commentThreadRenderer.comment.commentRenderer.commentId== a}):-1}; e.getParentPostId_=function(a){a=a.split(".");if(a[1])return a[0]}; e.getPostRendererType_=function(a){return this.enableImprovedCommunityTab?"postRenderer":this.get("backstagePostThreadRenderer.post.sharedPostRenderer",this.data.contents[a])?"sharedPostRenderer":"backstagePostRenderer"}; g.Object.defineProperties(D2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ojb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===njb){var d=document.createElement("template");d.innerHTML="";njb=d}d=njb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ojb=a}a=ojb;return a}}}); var E2=D2;w([P(X.YtRendererBehavior),x("design:type",Object)],E2.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],E2.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],E2.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],E2.prototype,"data",void 0);w([R(),x("design:type",Object)],E2.prototype,"enableImprovedCommunityTab",void 0);E2=w([V({is:"ytd-backstage-items"})],E2);var pjb;var qjb;Polymer({is:"ytd-comments",_template:function(){if(void 0!==qjb)return qjb;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pjb){var d=document.createElement("template");d.innerHTML=""; pjb=d}d=pjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return qjb=a}, behaviors:[TP,X.YtRendererBehavior,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior],properties:{data:{type:Object,observer:"dataChanged_"},isBackstage:{type:Boolean,computed:"computeIsBackstage_(data.header.commentsHeaderRenderer.isBackstageContent)",reflectToAttribute:!0},disablePrescanVisibility:{type:Boolean,value:!0},canScheduleJobs:{type:Boolean,value:!0},canShowDefaultSpinner_:{type:Boolean,computed:"computeCanShowDefaultSpinner_(data, canScheduleJobs)"}},actionMap:{"yt-ban-author-action":"banAuthorAction_", "yt-create-comment-action":"createCommentAction_","yt-create-comment-reply-action":"createCommentReplyAction_","yt-hide-reported-comment-action":"hideReportedCommentAction_","yt-pin-comment-action":"pinCommentAction_","yt-remove-comment-action":"removeCommentAction_","yt-unpin-comment-action":"unpinCommentAction_","yt-update-comment-action":"updateCommentAction_","yt-update-comment-reply-action":"updateCommentReplyAction_"},listeners:{"yt-retrieve-location":"onRetrieveLocation_"},observers:["contentsChanged_(data.contents.*)", "headerChanged_(data.header)"],created:function(){var a=this;this.cachedCommentIds_=new Set;this.RenderingPriority={RENDERING_PRIORITY_UNKNOWN:0,RENDERING_PRIORITY_PINNED_COMMENT:10,RENDERING_PRIORITY_LINKED_COMMENT:20,RENDERING_PRIORITY_COMMUNITY_GUIDELINES_BELOW_HEADER:80,RENDERING_PRIORITY_COMMENT_HEADER:100};this.initCommentsCsi_();this.player=null;this.PLAYER_EVENTS_=new Map;this.PLAYER_EVENTS_.set("onVideoProgress",function(){a.onVideoProgress_()})}, attached:function(){this.maybeGetAndSetPlayer_()}, maybeGetAndSetPlayer_:function(){var a=this,b=KM(this);b&&b.getPlayerPromise().then(function(c){a.playerApiReady_(c)})}, playerApiReady_:function(a){this.setPlayer_(a)}, setPlayer_:function(a){this.player_&&this.unlistenFromPlayerEvents(this.player_,this.PLAYER_EVENTS_);(this.player_=a)&&this.listenToPlayerEvents(a,this.PLAYER_EVENTS_)}, detached:function(){this.setPlayer_(null)}, onVideoProgress_:function(){var a=this,b=ik("prefetch_comments_ms_after_video");0b)){var d=this.getRepliesPath_(b);if(this.get(d)){a=this.get("createCommentReplyAction.replyToCommentId",a);d=this.getRepliesContentsPath_(b,!1);if(this.get(d)){var f=this.replyIdToIndex_(a,b,!1);this.doReplyInsert_(d,c,f)}d= this.getRepliesContentsPath_(b,!0);this.get(d)?(b=this.replyIdToIndex_(a,b,!0),(!a||0<=b)&&this.doReplyInsert_(d,c,b)):this.set(d,[c])}else this.set(d,{commentRepliesRenderer:{teaserContents:[c]}})}}, setCreatorReply_:function(a,b){var c=this.getParentCommentId_(a.replace("#","."));if(c&&(c=this.commentIdToIndex_(c),!(0>c))){var d=this.replyIdToIndex_(a,c,!1);0<=d&&(d=this.getRepliesContentsPath_(c,!1)+("."+d+".commentRenderer"),this.set(d+".creatorReply",b),this.set(d+".containsCreatorReply",!!this.get("commentRenderer",b)));a=this.replyIdToIndex_(a,c,!0);0<=a&&(a=this.getRepliesContentsPath_(c,!0)+("."+a+".commentRenderer"),this.set(a+".creatorReply",b),this.set(a+".containsCreatorReply",!!this.get("commentRenderer", b)))}}, hideReportedCommentAction_:function(a){var b=this.get("hideReportedCommentAction.commentId",a);b&&(a=this.get("hideReportedCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))}, getParentCommentId_:function(a){a=a.split(".");if(a[1])return a[0]}, removeCommentAction_:function(a){var b=this.get("removeCommentAction.commentId",a);b&&(this.get("removeCommentAction.isCreatorReply",a)?(b=this.get("removeCommentAction.parentCommentId",a),this.setCreatorReply_(b,{})):(a=this.get("removeCommentAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a)))}, pinCommentAction_:function(a){var b=this.get("pinCommentAction.commentId",a);b&&(a=this.get("pinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a,!0))}, unpinCommentAction_:function(a){var b=this.get("unpinCommentAction.commentId",a);b&&(a=this.get("unpinCommentAction.actionResult.update.commentThreadRenderer",a))&&(this.remove_(b),this.insert_(a))}, updateCommentAction_:function(a){var b=this.get("updateCommentAction.commentId",a);a=this.get("updateCommentAction.contents",a);b&&a&&this.update_(b,a)}, updateCommentReplyAction_:function(a){var b=this.get("updateCommentReplyAction.commentId",a),c=this.get("updateCommentReplyAction.contents",a);b&&c&&(this.get("updateCommentReplyAction.isCreatorReply",a)?(b=this.get("updateCommentReplyAction.parentCommentId",a),this.setCreatorReply_(b,c)):(b=b.replace("#","."),a=this.getParentCommentId_(b),this.update_(b,c,a)))}, banAuthorAction_:function(a){var b=this.get("banAuthorAction.commentId",a);b&&(a=this.get("banAuthorAction.parentCommentId",a),b=b.replace("#","."),a||(a=this.getParentCommentId_(b)),this.remove_(b,a))}, commentIdToIndex_:function(a){if(!a||!this.cachedCommentIds_.has(a))return-1;for(var b=0,c=this.data.contents.length;b=this.RenderingPriority[f.renderingPriority]){b&&this.RenderingPriority[a.renderingPriority]==this.RenderingPriority[f.renderingPriority]?this.splice("data.contents",c,1,{commentThreadRenderer:a}):this.splice("data.contents",c,0,{commentThreadRenderer:a}); break}}}, getReplyThreadEndIndex_:function(a,b){a=this.get(a);var c=b+1;if(void 0===a)return c;for(b=a[b];cb.commentRenderer.threadNestingLevel;)c++;return c}, doReplyRemove_:function(a,b,c){a=this.replyIdToIndex_(a,b,c);0>a||(b=this.getRepliesContentsPath_(b,c),c=a+1,N("enable_reply_threading_on_web")&&(c=this.getReplyThreadEndIndex_(b,a)),this.splice(b,a,c-a))}, remove_:function(a,b){b=this.commentIdToIndex_(b);0>b?(b=this.commentIdToIndex_(a),0>b||this.splice("data.contents",b,1)):(this.doReplyRemove_(a,b,!1),this.doReplyRemove_(a,b,!0),0>b||(b="data.contents."+b+".commentThreadRenderer.comment.commentRenderer",this.get(b+".backstageAttachment.pollRenderer.votedCommentId")==a&&(this.set(b+".backstageAttachment.pollRenderer.votedCommentId",null),this.set(b+".backstageAttachment.pollRenderer.commentDelete",null))))}, replyIdToIndex_:function(a,b,c){if(0>b)return-1;b=this.getRepliesContentsPath_(b,c);b=this.get(b);if(!b||!b.length)return-1;c=0;for(var d=b.length;ca)){b=this.getRepliesContentsPath_(b,d);if(d=this.get(b+"."+a+".commentRenderer.creatorReply"))c.commentRenderer.creatorReply=d;c.commentRenderer.threadNestingLevel=this.get(b)[a].commentRenderer.threadNestingLevel;this.splice(b,a,1,c)}}, update_:function(a,b,c){var d=this.commentIdToIndex_(c);!c||0>d?(d=this.commentIdToIndex_(a),0>d||this.set("data.contents."+d+".commentThreadRenderer.comment",b)):(this.doReplyUpdate_(a,d,b,!1),this.doReplyUpdate_(a,d,b,!0))}, computeIsBackstage_:function(a){return!!a}, computeCanShowDefaultSpinner_:function(a,b){return N("kevlar_show_comments_spinner_earlier")&&b?(b=this.getInterface(IM))&&b.isOnWatch&&b.isOnWatch()?!(a&&(a.contents||a.header||a.continuations)):!1:!1}, onRetrieveLocation_:function(a,b){b&&b.hasComments&&this.tickForCommentsTimer_("lss")}, tickForCommentsTimer_:function(a){bp(a,void 0,"wn_comments")}, loadComments:function(){ik("prefetch_comments_ms_after_video")||N("prefetch_comments_idle_job")?this.$.sections.triggerInitialContinuations():this.$.sections.triggerContinuations()}});var rjb;var sjb;Polymer({is:"yt-header-with-back-renderer",_template:function(){if(void 0!==sjb)return sjb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rjb){var d=document.createElement("template");d.innerHTML=""; rjb=d}d=rjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return sjb=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.imageRenderer":{id:"image-renderer",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer",params:{fit:!0}}}}},onBackIconTap_:function(){window.history.back()}});var tjb;var ujb;var F2=function(){return O.apply(this,arguments)||this}; p(F2,O);e=F2.prototype; e.configureRendererStamper=function(){return{content_:{id:"primary",mapping:{richGridRenderer:"ytd-rich-grid-renderer",sectionListRenderer:{component:"ytd-section-list-renderer",properties:{initialCount:"[[initialCount]]",pageSubtype:"[[pageSubtype]]"}}}},"data.secondaryContents":{id:"secondary",mapping:{browseFeedActionsRenderer:{component:"ytd-browse-feed-actions-renderer",noInjection:!0},browseSecondaryContentsRenderer:{component:"ytd-browse-secondary-contents-renderer",noInjection:!0},profileColumnRenderer:{component:"ytd-profile-column-renderer", noInjection:!0}}}}}; e.getPath_=function(a,b){var c="data.tabs.#"+b+".";a.tabs[b].tabRenderer?c+="tabRenderer.":a.tabs[b].expandableTabRenderer&&(c+="expandableTabRenderer.");return c+"content.sectionListRenderer"}; e.computeDisplayedContent_=function(a){this.unlinkPaths("content_");if(a&&a.tabs)for(var b=a.tabs.length,c=0;c
\n
\n
\n"; a.content.insertBefore(MV().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tjb){var d=document.createElement("template");d.innerHTML=""; tjb=d}d=tjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ujb=a}a=ujb;return a}}}); var G2=F2;G2.prototype.onYtServiceRequestCompleted_=G2.prototype.onYtServiceRequestCompleted_;G2.prototype.onYtServiceRequestSent_=G2.prototype.onYtServiceRequestSent_;G2.prototype.onRetrieveLocation_=G2.prototype.onRetrieveLocation_;w([P(uQ),x("design:type",Object)],G2.prototype,"ytdGridStateAwareBehavior",void 0);w([P(Z),x("design:type",Object)],G2.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],G2.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],G2.prototype,"data",void 0);w([R({computed:"computeDisplayedContent_(data)"}),x("design:type",Object)],G2.prototype,"content_",void 0);w([R({value:function(){return 1024\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vjb){var d=document.createElement("template");d.innerHTML=""; vjb=d}d=vjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return wjb=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object,wrapButtons:{type:Boolean,value:!1,reflectToAttribute:!0},isMusic:{type:Boolean,value:"WEB_REMIX"===A("INNERTUBE_CLIENT_NAME",void 0),reflectToAttribute:!0},alertStyle:{type:String,reflectToAttribute:!0,computed:"computeAlertStyle_(data.alertType.type)"},dismissBoundButtonTap_:{type:Function,value:function(){return this.dismissButtonTap_.bind(this)}}, acceptBoundButtonTap_:{type:Function,value:function(){return this.acceptButtonTap_.bind(this)}}}, stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[dismissBoundButtonTap_]]"}}}},"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[acceptBoundButtonTap_]]"}}}}},observers:["onIsVisibleChanged_(data.isVisible)"],created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP"); this.closeOnDismissButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ON_LINK_TAP");this.closeOnAcceptButton_.add("ALERT_WITH_ACTIONS_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP")}, dismissButtonTap_:function(){this.set("data.isVisible",!this.closeOnDismissButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))}, acceptButtonTap_:function(){this.set("data.isVisible",!this.closeOnAcceptButton_.has(this.data.dismissStrategy||"ALERT_WITH_ACTIONS_DISMISS_STRATEGY_UNKNOWN"))}, computeAlertStyle_:function(a){return a}, onIsVisibleChanged_:function(){this.data&&!this.data.isVisible&&this.impressionLog()}});var xjb;var yjb;var zjb={_noAccessors:!0,properties:{data:Object},getCurrentData:function(){return this.data}, getCurrentPage:function(){}, getPageOffset:function(a){return a.getScrollTop()}, setPageOffset:function(a,b){a.setScrollTop(b)}, setPageOffsetForNavigation:function(a){this.fire("yt-navigate-set-page-offset",{page:a,offset:0})}};function Ajb(a){var b=self.location.origin+"/app_shell_home";return Za(this,function d(){var f;return za(d,function(h){if(1==h.nextAddress)return q(h,a.open("yt-appshell-assets"),2);f=h.yieldResult;return h.return(f.match(b))})})} function Bjb(){var a=t.caches,b=self.location.origin+"/app_shell_home";Za(this,function d(){var f;return za(d,function(h){if(1==h.nextAddress)return q(h,a.open("yt-appshell-assets"),2);f=h.yieldResult;return q(h,f.delete(b),0)})})} function Cjb(a){Za(this,function c(){return za(c,function(d){return q(d,a.delete("yt-appshell-assets"),0)})})} ;var H2=null,Djb={},I2=(0,ym.getDbFactory)("yt-serviceworker-metadata",{objectStores:(Djb.auth=!0,Djb["resource-manifest-assets"]=!0,Djb),shared:!0,upgrade:function(a,b){1>b&&a.createObjectStore("resource-manifest-assets");2>b&&a.createObjectStore("auth")}, version:2});function Ejb(){return Za(this,function b(){var c;return za(b,function(d){return 1==d.nextAddress?H2?d.jumpTo(2):q(d,I2().open(),3):2!=d.nextAddress?(c=d.yieldResult,q(d,em(c,["resource-manifest-assets"],"readonly",function(f){return f.objectStore("resource-manifest-assets").withCursor({query:IDBKeyRange.bound(0,Math.floor(new Date().getTime()/1E3)),direction:"prev"},function(h){H2=h.getKey()})}),2)):d.return(H2)})})} function Fjb(){Za(this,function b(){var c;return za(b,function(d){if(1==d.nextAddress)return H2=null,q(d,I2().open(),2);c=d.yieldResult;return d.return(c.clear("resource-manifest-assets"))})})} ;function Gjb(){return Za(this,function b(){var c,d;return za(b,function(f){if(1==f.nextAddress)return q(f,I2().open(),2);if(3!=f.nextAddress)return c=f.yieldResult,q(f,c.get("auth","shell_identifier_key"),3);d=f.yieldResult;return f.return(d||"")})})} function Hjb(){Za(this,function b(){var c;return za(b,function(d){if(1==d.nextAddress)return q(d,I2().open(),2);c=d.yieldResult;return q(d,c.clear("auth"),0)})})} ;function Ijb(a){Cjb(a);Hjb();Fjb()} ;function Jjb(){return Za(this,function b(){var c,d,f;return za(b,function(h){switch(h.nextAddress){case 1:return c="LOGGED_OUT",ta(h,2),q(h,Gjb(),4);case 4:c=h.yieldResult;ua(h,3);break;case 2:return d=va(h),Am(d),h.return(!0);case 3:return f=A("DATASYNC_ID","LOGGED_OUT"),f===c?h.return(!1):h.return(!0);}})})} function Kjb(a){return Za(this,function c(){var d,f,h,l,m,n;return za(c,function(r){switch(r.nextAddress){case 1:return q(r,Ajb(a),2);case 2:if(d=r.yieldResult){var v;a:{if(d.headers&&(v=d.headers.get("date"))&&(v=Date.parse(v),!isNaN(v))){v=Math.round(Zk()-v);break a}v=-1}f=v;if(-1";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xjb){var d= document.createElement("template");d.innerHTML=""; xjb=d}d=xjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return yjb=a}, behaviors:[X.YtRendererBehavior,xO.YtActionHandlerBehavior,zjb],provides:IM,properties:{removePageManagerScroll:{type:Boolean,value:N("kevlar_remove_page_manager_scroll"),reflectToAttribute:!0}},actionMap:{"player-update-pre":"prePlayerUpdate_","yt-get-page-offset":"getPageOffset","yt-set-page-offset":"setPageOffset","yt-pause-active-page-context":"pauseActiveContext_","yt-prepare-page-dispose":"preparePageDispose_","yt-stop-old-player":"onYtStopOldPlayer_"},listeners:{"yt-page-manager-navigate-start":"onYtPageManagerNavigateStart_"}, factoryImpl:function(){}, created:function(){this.pageNameToElement_=new Map;this.currentPage_=void 0;this.renderLoadingStateJobId_=0;this.elementPoolPopulator_=po.getInstance();this.updatePageDataJobId_=0;this.contextSwitcher_=new cTa;this.pageDisposeJobsets_=new WeakMap}, attached:function(){this.fire("attached");var a=this.getInterfaceForTs("yt-network-manager");a&&(this.contextSwitcher_.networkService_=a)}, getPageSubTypeFromUrl_:function(a){var b=a?Bd(a):"";if(b){if("/"==b)return"home";if(["/fashion","/feed/fashion_destination","/channel/UCrpQ4p1Ql_hG8rKXIKM1MOQ"].some(function(c){return 0===b.toLowerCase().indexOf(c.toLowerCase())}))return"fashion"; if(0==b.indexOf("/channel/")||0==b.indexOf("/user/")||0==b.indexOf("/gaming"))return"channel";if("/playlist"==b||0==b.indexOf("/playlist/")||"/view_play_list"==b||0==b.indexOf("/view_play_list/")||0==b.indexOf("/show/"))return"playlist";if("/feed/history"==b||0==b.indexOf("/feed/history/"))return"history";if("/new"==b)return"labs";if("/feed/subscriptions"==b)return"subscriptions";if(0==b.indexOf("/feed/subscriptions/"))return"filteredsubscriptions";if("/history_controls"==b)return"standalone";if(0== b.indexOf("/account")||"/gaia_link"==b)return"WEB_PAGE_TYPE_SETTINGS";if(0==b.indexOf("/paid_memberships")||N("enable_purchase_activity_in_paid_memberships")&&(0==b.indexOf("/purchases")||0==b.indexOf("/feed/purchases")))return"memberships-and-purchases";if(0==b.indexOf("/premium")||0==b.indexOf("/musicpremium"))return 0===b.indexOf("/premium/offers")||0===b.indexOf("/musicpremium/offers")?"ypc-offers":"red";if(0==b.indexOf("/redeem")||0==b.indexOf("/reporthistory"))return"browse";if(0==b.indexOf("/hashtag"))return"hashtag-landing-page"}}, getPageSubTypeFromEndpoint_:function(a){var b;(a=this.get("commandMetadata.webCommandMetadata.url",a))&&(b=this.getPageSubTypeFromUrl_(a));return b}, getPageTypeFromData_:function(a){if(!a)return"browse";var b=a.page,c=a.url,d=this.get("response.responseContext.webResponseContextExtensionData.pageTheme",a);d?b=d.toLowerCase().replace(/_/g,"-"):"watch"!=b&&(("browse"==b||"settings"==b)&&this.get("response.sidebar",a)&&this.get("response.sidebar.settingsSidebarRenderer",a)?b="WEB_PAGE_TYPE_SETTINGS":"browse"==b&&this.get("response.metadata.channelMetadataRenderer",a)?b="channel":c&&(b=this.getPageSubTypeFromUrl_(c)||b));return b}, doesWatchPageHavePlaylist_:function(a){var b=!!lM().queueProxy;a=!!this.get("response.currentVideoEndpoint.watchEndpoint.playlistId",a);return b||a}, pauseActiveContext_:function(){var a=this.contextSwitcher_;a.activeContext_&&a.activeContext_.pause()}, getPageElementForType_:function(a){var b=this.pageNameToElement_.get(a);if(!b){switch(a){case"watch":var c=N("kevlar_fixie_watch_layout")?mo("ytd-watch-fixie"):mo("ytd-watch-flexy");break;case"search":c=mo("ytd-search",this);break;case"channel":c=mo("ytd-browse",this);c.pageSubtype="channels";break;case"playlist":case"standalone":case"home":case"red":case"WEB_PAGE_TYPE_SETTINGS":case"history":case"labs":case"subscriptions":case"filteredsubscriptions":case"memberships-and-purchases":case"ypc-offers":case"fashion":case"hashtag-landing-page":c= mo("ytd-browse",this);c.pageSubtype=a;break;case"browse":c=mo("ytd-browse",this);}Uo("pc",1);b=c;this.pageNameToElement_.set(a,b)}return b}, attachPage_:function(a){a.isAttached||Polymer.dom(this.root).appendChild(a)}, setActivePage_:function(a){var b=this.currentPage_;a?a!=this.currentPage_&&(b&&(b.hidden=!0,b.active=!1,b.removeAttribute("role")),this.currentPage_=a,b&&this.fire("yt-page-type-changed",{oldPageType:b.is,newPageType:a.is}),a.hidden=!1,this.attachPage_(a),a.active=!0,a.setAttribute("role","main"),b&&this.setPageOffsetForNavigation(a,0)):Zm(new Ul("Unable to set active page",b?b.is:"unknown origin"))}, updatePageData:function(a){var b=this,c=this.data;this.updatePageDataJobId_&&Fk.cancelJob(this.updatePageDataJobId_);this.data=a;return new Oi(function(d){var f=function(){a.filler?b.performDataUpdate_(a,c):YUa(function(){b.performDataUpdate_(a,c)}); d()}; a&&"watch"==a.page?b.updatePageDataJobId_=Dk(Fk,f):f()})}, performDataUpdate_:function(a,b){this.sendAction("yt-close-all-popups-action",[["ytd-conversation-section-renderer","ytd-video-download-toast-renderer"]]);var c=!a.filler;c&&(Wo("lps"),N("config_age_report_killswitch")||Ljb());var d=this.getPageTypeFromData_(a),f=this.getPageElementForType_(d);c&&hla(this.elementPoolPopulator_,d);c&&!this.renderLoadingStateJobId_&&this.setActivePage_(f);if(f){var h="watch"==d;N("kevlar_flush_jobs_before_setting_player_response")&&this.flushPageDisposeJobset_(f);h&&( f.playerData=a.playerResponse);N("kevlar_prefetch")&&!N("block_all_player_prefetch_requests")&&this.preparePrefetchRequest_(a,f,c,h);h?("watch"!=this.getPageTypeFromData_(b)&&this.sendAction("yt-cache-miniplayer-page-action",[b]),this.sendSingletonAction("yt-deactivate-miniplayer-action")):"watch"==this.getPageTypeFromData_(b)&&this.doesWatchPageHavePlaylist_(b)&&(JL.getInstance().playlistWatchPageActivation=!0,this.activateMiniplayer(b));this.getInterfaceForTs("yt-activity-manager").ignoreNextScroll(); N("kevlar_flush_jobs_before_setting_player_response")||this.flushPageDisposeJobset_(f);c?(b=typeof f.loadPage,"function"==b?(f.pageContext=dTa(this.contextSwitcher_,f,f.data!=a.response),f.loadPage(a.response)):Zm(new Ul("b/38014653 ",[d,f.is,f.nodeName,b])),Wo("pdl")):(f.hidden=!0,a.response.filler=!0,f.data=a.response,this.attachPage_(f));this.fire("yt-page-data-updated",{pageType:d})}Bk(Fk,function(){N("kevlar_nitrate_driven_tooltips")?yN.getInstance().parsePageData(a,f):gTa(a,f)})}, preparePrefetchRequest_:function(a,b,c,d){return Za(this,function h(){var l,m,n=this,r,v,z,C,J;return za(h,function(E){if(1==E.nextAddress)return!c||!d||N("kevlar_disable_background_prefetch")&&0==Vo()?E.return():(l=LM(b))?q(E,l.getPlayerPromise(),2):E.return();m=E.yieldResult;r=n.get("response.responseContext.webResponseContextExtensionData",a);v=n.getInterfaceForTs("yt-network-manager");if(!v||!r)return E.return();z=n.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);C=n.getInterfaceForTs("yt-playlist-manager"); J=oN.getInstance();VTa(J,r,m,v,C,z);ra(E)})})}, movePlayerToWatch:function(a){return Za(this,function c(){var d=this,f,h;return za(c,function(l){f=d.getPageElementForType_("watch");h=f.getPlayerContainer();a.appendTo(h);ra(l)})})}, getPlayerFromWatch:function(){var a=this.getPageElementForType_("watch");return LM(a)}, activateMiniplayer:function(a){var b=KQ(a.response),c=LM(this.getPageElementForType_("watch"));this.sendSingletonAction("yt-activate-miniplayer-action",[c,b,a])}, prePlayerUpdate_:function(a){if("watch"==a){var b=this.getPageElementForType_("watch");this.renderLoadingStateJobId_?(Fk.cancelJob(this.renderLoadingStateJobId_),this.renderLoadingStateJobId_=0,this.renderPageLoadingState_(a)):this.setActivePage_(b)}}, getCurrentPage:function(){return this.currentPage_}, isOnWatch:function(){return!!this.currentPage_&&["ytd-watch-flexy","ytd-watch-fixie"].includes(this.currentPage_.is)}, preparePage:function(a,b){try{b&&(a=this.getPageSubTypeFromEndpoint_(b)||a);if("watch"!=a){var c=this.elementPoolPopulator_,d=a;d!=c.targetPage_&&-1\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mjb){var d=document.createElement("template");d.innerHTML=""; Mjb=d}d=Mjb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Njb=a}a=Njb;return a}}}); var K2=J2;K2.prototype.dataChanged=K2.prototype.dataChanged;w([P(z2a),x("design:type",Object)],K2.prototype,"ytPageBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],K2.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],K2.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],K2.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],K2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],K2.prototype,"data",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_center_search_results")}}), x("design:type",Boolean)],K2.prototype,"centerResults",void 0);w([R({value:!0}),x("design:type",Boolean)],K2.prototype,"monitorScroll",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K2.prototype,"dataChanged",null);K2=w([V({is:"ytd-search"})],K2);var Ojb=function(){return O.apply(this,arguments)||this}; p(Ojb,O);var Pjb=Ojb;Pjb=w([V({is:"ytd-search-items"})],Pjb);var bkb;var ckb;var L2=function(){return O.apply(this,arguments)||this}; p(L2,O);L2.prototype.configureRendererStamper=function(){return{"data.adMetadata.displayAdRenderer":{id:"badge",mapping:{badge:{component:"ytd-badge-supported-renderer",properties:{topStandaloneBadge:"[[data.adMetadata.displayAdRenderer.badge]]"}}}},"data.adMetadata.displayAdRenderer.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.content":{id:"content",mapping:{horizontalListRenderer:{component:"yt-horizontal-list-renderer",params:{useFloorScrolling:!0}},gridRenderer:"ytd-grid-renderer"}}}}; g.Object.defineProperties(L2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ckb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bkb){var d=document.createElement("template");d.innerHTML=""; bkb=d}d=bkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ckb=a}a=ckb;return a}}}); var M2=L2;w([P(Z),x("design:type",Object)],M2.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],M2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],M2.prototype,"data",void 0);M2=w([V({is:"ytd-carousel-ad-renderer"})],M2);var dkb;var ekb;var N2=function(){return O.apply(this,arguments)||this}; p(N2,O);N2.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; N2.prototype.computeBlueBottomLink=function(a){return a}; g.Object.defineProperties(N2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ekb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n\n
\n
\n
\n \n \n \n
\n \n
\n \n \n \n
\n
\n \n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dkb){var d=document.createElement("template");d.innerHTML=""; dkb=d}d=dkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ekb=a}a=ekb;return a}}}); var O2=N2;w([P(Z),x("design:type",Object)],O2.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],O2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],O2.prototype,"data",void 0);w([R({computed:"computeIcon_(data.bottomIcon)"}),x("design:type",String)],O2.prototype,"bottomIcon",void 0);w([R({computed:"computeBlueBottomLink(data.blueBottomLink)",reflectToAttribute:!0}),x("design:type",Boolean)],O2.prototype,"enableBlueBottomLink",void 0); O2=w([V({is:"ytd-web-answer-renderer"})],O2);var fkb;var gkb;var P2=function(){return O.apply(this,arguments)||this}; p(P2,O);P2.prototype.configureRendererStamper=function(){return{"data.pages":{id:"pages",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(P2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gkb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fkb){var d=document.createElement("template");d.innerHTML="";fkb=d}d=fkb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);gkb=a}a=gkb;return a}}}); var Q2=P2;w([P(X.YtRendererBehavior),x("design:type",Object)],Q2.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],Q2.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],Q2.prototype,"data",void 0);Q2=w([V({is:"ytd-page-continuation"})],Q2);var hkb;var ikb;var R2=function(){var a=O.apply(this,arguments)||this;a.selected=0;return a}; p(R2,O);R2.prototype.dataChanged=function(){this.selected=0}; g.Object.defineProperties(R2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ikb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hkb){var d=document.createElement("template");d.innerHTML="";hkb=d}d=hkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); ikb=a}a=ikb;return a}}}); var S2=R2;S2.prototype.dataChanged=S2.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],S2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],S2.prototype,"data",void 0);w([R(),x("design:type",Object)],S2.prototype,"selected",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S2.prototype,"dataChanged",null);S2=w([V({is:"ytd-artist-watch-card-renderer"})],S2);var jkb;var kkb;var lkb=function(){return O.apply(this,arguments)||this}; p(lkb,O); g.Object.defineProperties(lkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kkb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jkb){var d=document.createElement("template");d.innerHTML=""; jkb=d}d=jkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kkb=a}a=kkb;return a}}}); var T2=lkb;w([P(X.YtRendererBehavior),x("design:type",Object)],T2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],T2.prototype,"data",void 0);T2=w([V({is:"ytd-watch-card-album-list-renderer"})],T2);var mkb;var nkb;var U2=function(){return O.apply(this,arguments)||this}; p(U2,O);U2.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.sectionLeft.style.backgroundImage="url("+wO(this.data.leftThumbnail.thumbnails,216)+")")}; g.Object.defineProperties(U2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nkb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mkb){var d=document.createElement("template");d.innerHTML=""; mkb=d}d=mkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nkb=a}a=nkb;return a}}}); var V2=U2;V2.prototype.onLeftThumbnailChanged=V2.prototype.onLeftThumbnailChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],V2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],V2.prototype,"data",void 0);w([CE("#section-left"),x("design:type",HTMLElement)],V2.prototype,"sectionLeft",void 0);w([U("data.leftThumbnail"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],V2.prototype,"onLeftThumbnailChanged",null); V2=w([V({is:"ytd-watch-card-collage-renderer"})],V2);var okb;var pkb;var W2=function(){var a=O.apply(this,arguments)||this;a.crop=!1;return a}; p(W2,O);W2.prototype.computeStyle=function(a){if(a&&(a=vO(a.thumbnails,385)))return ec({"background-image":a})}; g.Object.defineProperties(W2,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===pkb){var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===okb){var d=document.createElement("template");d.innerHTML=""; okb=d}d=okb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);pkb=a}a=pkb;return a}}}); var X2=W2;w([P(X.YtRendererBehavior),x("design:type",Object)],X2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],X2.prototype,"data",void 0);w([R(),x("design:type",Object)],X2.prototype,"crop",void 0);X2=w([V({is:"ytd-watch-card-single-image-renderer"})],X2);var qkb;var rkb;var skb=function(){return O.apply(this,arguments)||this}; p(skb,O); g.Object.defineProperties(skb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rkb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qkb){var d=document.createElement("template");d.innerHTML=""; qkb=d}d=qkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rkb=a}a=rkb;return a}}}); var Y2=skb;w([P(X.YtRendererBehavior),x("design:type",Object)],Y2.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Y2.prototype,"data",void 0);Y2=w([V({is:"ytd-watch-card-video-list-renderer"})],Y2);var tkb;var ukb;var Z2=function(){var a=O.apply(this,arguments)||this;a.badges=null;a.standaloneBadge=null;a.selected=0;a.crop=!1;return a}; p(Z2,O);Z2.prototype.shouldScrollTabs_=function(a){return 2

"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tkb){var d=document.createElement("template");d.innerHTML=""; tkb=d}d=tkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ukb=a}a=ukb;return a}}}); var $2=Z2;w([P(X.YtRendererBehavior),x("design:type",Object)],$2.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],$2.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],$2.prototype,"titleText",void 0);w([R(),x("design:type",Object)],$2.prototype,"navigationEndpoint",void 0);w([R(),x("design:type",Object)],$2.prototype,"labels",void 0);w([R(),x("design:type",Object)],$2.prototype,"badges",void 0); w([R(),x("design:type",Object)],$2.prototype,"standaloneBadge",void 0);w([R(),x("design:type",Object)],$2.prototype,"callToAction",void 0);w([R(),x("design:type",Object)],$2.prototype,"lists",void 0);w([R(),x("design:type",Object)],$2.prototype,"relatedData",void 0);w([R(),x("design:type",Object)],$2.prototype,"selected",void 0);w([R(),x("design:type",Boolean)],$2.prototype,"crop",void 0);w([R({reflectToAttribute:!0}),x("design:type",String)],$2.prototype,"headerStyle",void 0); $2=w([V({is:"ytd-generic-watch-card"})],$2);var vkb;var wkb;var xkb=function(){return O.apply(this,arguments)||this}; p(xkb,O); g.Object.defineProperties(xkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wkb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vkb){var d=document.createElement("template");d.innerHTML="";vkb=d}d=vkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wkb=a}a=wkb;return a}}}); var a3=xkb;w([P(X.YtRendererBehavior),x("design:type",Object)],a3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],a3.prototype,"data",void 0);a3=w([V({is:"ytd-show-watch-card-renderer"})],a3);var ykb;var zkb;var b3=function(){return O.apply(this,arguments)||this}; p(b3,O); b3.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{watchCardRichHeaderRenderer:{component:"ytd-watch-card-rich-header-renderer",noInjection:!0}}},"data.callToAction":{id:"hero",mapping:{watchCardHeroVideoRenderer:{component:"ytd-watch-card-hero-video-renderer",noInjection:!0},watchCardHeroOneVsOneEventRenderer:{component:"ytd-watch-card-hero-one-vs-one-event-renderer",noInjection:!0}}},"data.sections":{id:"sections",mapping:{watchCardSectionDropdownRenderer:{component:"ytd-watch-card-section-dropdown-renderer",noInjection:!0}, watchCardSectionSequenceRenderer:{component:"ytd-watch-card-section-sequence-renderer",noInjection:!0}}}}}; g.Object.defineProperties(b3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zkb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ykb){var d=document.createElement("template");d.innerHTML="";ykb=d}d= ykb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zkb=a}a=zkb;return a}}}); var c3=b3;w([P(Z),x("design:type",Object)],c3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],c3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],c3.prototype,"data",void 0);c3=w([V({is:"ytd-universal-watch-card-renderer"})],c3);var Akb;var Bkb;var Ckb=function(){return O.apply(this,arguments)||this}; p(Ckb,O); g.Object.defineProperties(Ckb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Bkb){var a=document.createElement("template");a.innerHTML="\n\n\n
\n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Akb){var d=document.createElement("template");d.innerHTML=""; Akb=d}d=Akb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bkb=a}a=Bkb;return a}}}); var d3=Ckb;w([P(X.YtRendererBehavior),x("design:type",Object)],d3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],d3.prototype,"data",void 0);d3=w([V({is:"ytd-watch-card-hero-one-vs-one-event-renderer"})],d3);var Dkb;var Ekb;var Fkb=function(){return O.apply(this,arguments)||this}; p(Fkb,O); g.Object.defineProperties(Fkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ekb){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.homeName)]]\n [[getSimpleString(data.homeParticipantResult)]]\n
\n
\n [[getSimpleString(data.awayName)]]\n [[getSimpleString(data.awayParticipantResult)]]\n
\n
[[getSimpleString(data.eventDescription)]]
\n
[[getSimpleString(data.additionalEventDescription)]]
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dkb){var d=document.createElement("template");d.innerHTML=""; Dkb=d}d=Dkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ekb=a}a=Ekb;return a}}}); var e3=Fkb;w([P(X.YtRendererBehavior),x("design:type",Object)],e3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],e3.prototype,"data",void 0);e3=w([V({is:"ytd-watch-card-one-vs-one-event"})],e3);var Gkb;var Hkb;var Ikb=function(){return O.apply(this,arguments)||this}; p(Ikb,O); g.Object.defineProperties(Ikb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hkb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gkb){var d=document.createElement("template");d.innerHTML=""; Gkb=d}d=Gkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hkb=a}a=Hkb;return a}}}); var f3=Ikb;w([P(X.YtRendererBehavior),x("design:type",Object)],f3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],f3.prototype,"data",void 0);f3=w([V({is:"ytd-banner-and-box-hero-image-renderer"})],f3);var Jkb;var Kkb;var g3=function(){return O.apply(this,arguments)||this}; p(g3,O);g.Object.defineProperties(g3.prototype,{buttonColor:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style.replace("CALL_TO_ACTION_BUTTON_RENDERER_STYLE_",""):"RED"}}}); g.Object.defineProperties(g3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kkb){var a=document.createElement("template");a.innerHTML="\n \n [[getSimpleString(data.label)]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jkb){var d=document.createElement("template");d.innerHTML=""; Jkb=d}d=Jkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kkb=a}a=Kkb;return a}}}); var h3=g3;w([P(X.YtRendererBehavior),x("design:type",Object)],h3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],h3.prototype,"data",void 0);w([R({type:String,reflectToAttribute:!0}),BE("data.style"),x("design:type",Object),x("design:paramtypes",[])],h3.prototype,"buttonColor",null);h3=w([V({is:"ytd-call-to-action-button-renderer"})],h3);var Lkb;var Mkb;var i3=function(){return O.apply(this,arguments)||this}; p(i3,O);i3.prototype.onLeftThumbnailChanged=function(){this.data&&this.data.leftThumbnail&&(this.$["section-left"].style.backgroundImage="url("+wO(this.data.leftThumbnail.thumbnails,216)+")")}; g.Object.defineProperties(i3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mkb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lkb){var d=document.createElement("template");d.innerHTML=""; Lkb=d}d=Lkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mkb=a}a=Mkb;return a}}}); var j3=i3;j3.prototype.onLeftThumbnailChanged=j3.prototype.onLeftThumbnailChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],j3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],j3.prototype,"data",void 0);w([U("data.leftThumbnail"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],j3.prototype,"onLeftThumbnailChanged",null);j3=w([V({is:"ytd-collage-hero-image-renderer"})],j3);var Nkb;var Okb;var k3=function(){return O.apply(this,arguments)||this}; p(k3,O);k3.prototype.computeStyle=function(a){return a}; g.Object.defineProperties(k3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Okb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nkb){var d=document.createElement("template");d.innerHTML=""; Nkb=d}d=Nkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Okb=a}a=Okb;return a}}}); var l3=k3;w([P(X.YtRendererBehavior),x("design:type",Object)],l3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],l3.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeStyle(data.style)"}),x("design:type",String)],l3.prototype,"componentStyle",void 0);l3=w([V({is:"ytd-single-hero-image-renderer"})],l3);var Pkb;var Qkb;var m3=function(){return O.apply(this,arguments)||this}; p(m3,O);e=m3.prototype; e.configureRendererStamper=function(){return{"data.heroImage":{id:"hero-image",mapping:{bannerAndBoxHeroImageRenderer:"ytd-banner-and-box-hero-image-renderer",singleHeroImageRenderer:"ytd-single-hero-image-renderer",collageHeroImageRenderer:"ytd-collage-hero-image-renderer"}},"data.callToActionButton":{id:"call-to-action-button",mapping:{callToActionButtonRenderer:"ytd-call-to-action-button-renderer"}},"data.reminderButton":{id:"reminder-button",mapping:{toggleButtonRenderer:"ytd-toggle-button-renderer",upcomingEventReminderButtonRenderer:"ytd-upcoming-event-reminder-button-renderer"}}, "data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayPlaybackStatusRenderer:"ytd-thumbnail-overlay-playback-status-renderer",thumbnailOverlayHoverTextRenderer:"ytd-thumbnail-overlay-hover-text-renderer",thumbnailOverlayResumePlaybackRenderer:"ytd-thumbnail-overlay-resume-playback-renderer",thumbnailOverlaySidePanelRenderer:{component:"ytd-thumbnail-overlay-side-panel-renderer",properties:{width:"[[thumbnailOverlaySidePanelWidth_]]",bottomPanel:"[[bottomSidePanel]]"}},thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer", thumbnailOverlayToggleButtonRenderer:{component:"ytd-thumbnail-overlay-toggle-button-renderer",properties:{disableTooltips:"[[disableTooltips]]"}}},initialRenderPriority:N("defer_overlays")?0:void 0,waitForSignal:"eocs"}}}; e.computeSubtitle=function(a){if(this.data){var b;if(this.data.upcomingEventData){a=nL(a.subtitle);var c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(b=kL(pJ(a,c)))}else b=a.subtitle;return b}}; e.onHeroTap=function(a){a.preventDefault();var b=this.data&&this.data.navigationEndpoint;b&&!NR(Polymer.dom(a).path||[],this,["YTD-TOGGLE-BUTTON-RENDERER"])&&this.fire("yt-navigate",{endpoint:b})}; e.computeHeroTabIndex=function(a){return a&&a.simpleText?-1:0}; e.computeHeroRole=function(a){return a&&a.simpleText?"":"link"}; e.computeIsReminderButtonPresent=function(a){return!(!a||!a.reminderButton)}; e.computeHideBottomItems=function(a){return!(this.computeIsReminderButtonPresent(a)||a.subtitle)}; g.Object.defineProperties(m3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qkb){var a=document.createElement("template");a.innerHTML="
\n \n
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pkb){var d=document.createElement("template");d.innerHTML=""; Pkb=d}d=Pkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qkb=a}a=Qkb;return a}}}); var n3=m3;w([P(X.YtRendererBehavior),x("design:type",Object)],n3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],n3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],n3.prototype,"data",void 0);w([R({computed:"computeSubtitle(data)"}),x("design:type",String)],n3.prototype,"subtitle",void 0);w([R({computed:"computeIsReminderButtonPresent(data)",reflectToAttribute:!0}),x("design:type",Boolean)],n3.prototype,"isReminderButtonPresent",void 0); w([R({computed:"computeHideBottomItems(data)",reflectToAttribute:!0}),x("design:type",Boolean)],n3.prototype,"hideBottomItems",void 0);n3=w([V({is:"ytd-watch-card-hero-video-renderer"})],n3);var Rkb;var Skb;var o3=function(){return O.apply(this,arguments)||this}; p(o3,O);o3.prototype.configureRendererStamper=function(){return{"data.callToActionButton":{id:"call-to-action-button",mapping:{buttonRenderer:"ytd-button-renderer",subscribeButtonRenderer:"ytd-subscribe-button-renderer",subscriptionNotificationToggleButtonRenderer:"ytd-subscription-notification-toggle-button-renderer"}}}}; o3.prototype.computeTitleBadges=function(a){return a?[a]:[]}; o3.prototype.computeHeaderStyle=function(a){return a?a.replace("WATCH_CARD_RICH_HEADER_RENDERER_STYLE_","").toLowerCase():""}; o3.prototype.computeAvatarHeight=function(a){return"WATCH_CARD_RICH_HEADER_RENDERER_STYLE_LEFT_AVATAR"===a?72:48}; g.Object.defineProperties(o3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Skb){var a=document.createElement("template");a.innerHTML="\n \n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rkb){var d=document.createElement("template");d.innerHTML=""; Rkb=d}d=Rkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Skb=a}a=Skb;return a}}}); var p3=o3;w([P(X.YtRendererBehavior),x("design:type",Object)],p3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],p3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],p3.prototype,"data",void 0);w([R({computed:"computeTitleBadges(data.titleBadge)"}),x("design:type",Array)],p3.prototype,"titleBadges",void 0);w([R({reflectToAttribute:!0,computed:"computeHeaderStyle(data.style)"}),x("design:type",String)],p3.prototype,"headerStyle",void 0); p3=w([V({is:"ytd-watch-card-rich-header-renderer"})],p3);var Tkb;var Ukb;var q3=function(){return O.apply(this,arguments)||this}; p(q3,O);q3.prototype.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{watchCardCompactVideoRenderer:{component:"ytd-watch-card-compact-video-renderer",noInjection:!0},watchCardOneVsOneEventCompactVideoRenderer:{component:"ytd-watch-card-one-vs-one-event-compact-video-renderer",noInjection:!0}}}}}; g.Object.defineProperties(q3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ukb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tkb){var d=document.createElement("template");d.innerHTML=""; Tkb=d}d=Tkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ukb=a}a=Ukb;return a}}}); var r3=q3;w([P(Z),x("design:type",Object)],r3.prototype,"ytRendererStamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],r3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],r3.prototype,"data",void 0);r3=w([V({is:"ytd-vertical-watch-card-list-renderer"})],r3);var Vkb;var Wkb;var s3=function(){return O.apply(this,arguments)||this}; p(s3,O);s3.prototype.onMetadataTap=function(a){var b=this.data&&this.data.navigationEndpoint;b&&!NR(Polymer.dom(a).path,this,["A".toString()])&&this.fire("yt-navigate",{endpoint:b})}; g.Object.defineProperties(s3.prototype,{isCondensed:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?"WATCH_CARD_COMPACT_VIDEO_RENDERER_STYLE_CONDENSED"===this.data.style:!1}}, subtitle:{configurable:!0,enumerable:!0,get:function(){if(this.data){var a;if(this.data.upcomingEventData){var b=nL(this.data.subtitle),c=Number(this.data.upcomingEventData.startTime);isNaN(c)||(a=kL(pJ(b,c)))}else a=this.data.subtitle;return a}}}}); g.Object.defineProperties(s3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wkb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vkb){var d=document.createElement("template");d.innerHTML=""; Vkb=d}d=Vkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wkb=a}a=Wkb;return a}}}); var t3=s3;w([P(X.YtRendererBehavior),x("design:type",Object)],t3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],t3.prototype,"data",void 0);w([R({reflectToAttribute:!0}),BE("data.style"),x("design:type",Boolean),x("design:paramtypes",[])],t3.prototype,"isCondensed",null);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Object),x("design:paramtypes",[])],t3.prototype,"subtitle",null);t3=w([V({is:"ytd-watch-card-compact-video-renderer"})],t3);var Xkb;var Ykb;var Zkb=function(){return O.apply(this,arguments)||this}; p(Zkb,O); g.Object.defineProperties(Zkb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ykb){var a=document.createElement("template");a.innerHTML="\n\n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xkb){var d=document.createElement("template");d.innerHTML=""; Xkb=d}d=Xkb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ykb=a}a=Ykb;return a}}}); var u3=Zkb;w([P(X.YtRendererBehavior),x("design:type",Object)],u3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],u3.prototype,"data",void 0);u3=w([V({is:"ytd-watch-card-one-vs-one-event-compact-video-renderer"})],u3);var $kb;var alb;var v3=function(){return O.apply(this,arguments)||this}; p(v3,O);e=v3.prototype;e.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:"ytd-vertical-watch-card-list-renderer"}}}}; e.dataChanged=function(a){this.currentSeasonIndex=a&&a.dropdownDefaultSelectedIndex||0;this.lists.select(this.currentSeasonIndex);this.label=this.getUppercaseSimpleString(a.dropdownTitles[this.currentSeasonIndex])}; e.computeEpisodesInfo=function(a,b,c){if(void 0!==a&&b.length===a.length)return a[c]}; e.onSeasonSelect=function(){this.ytRendererBehavior.markDirty()}; e.currentSeasonIndexChanged=function(){this.data&&this.data.dropdownTitles&&(this.label=this.getUppercaseSimpleString(this.data.dropdownTitles[this.currentSeasonIndex]))}; e.onLabelClick=function(){this.ariaExpanded="true"}; e.onIronOverlayClosed=function(){this.ariaExpanded="false"}; e.getUppercaseSimpleString=function(a){return this.ytRendererBehavior.getSimpleString(a).toUpperCase()}; g.Object.defineProperties(v3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===alb){var a=document.createElement("template");a.innerHTML="
\n \n \n
[[label]]
\n \n \n
\n \n \n \n
\n \n \n \n
\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$kb){var d=document.createElement("template");d.innerHTML=""; $kb=d}d=$kb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);alb=a}a=alb;return a}}}); var w3=v3;w3.prototype.onIronOverlayClosed=w3.prototype.onIronOverlayClosed;w([P(X.YtRendererBehavior),x("design:type",Object)],w3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],w3.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],w3.prototype,"data",void 0);w([R(),x("design:type",String)],w3.prototype,"label",void 0); w([R({observer:"currentSeasonIndexChanged",value:0}),x("design:type",Number)],w3.prototype,"currentSeasonIndex",void 0);w([R({computed:"computeEpisodesInfo(data.dropdownSubtitles,data.dropdownTitles,currentSeasonIndex)"}),x("design:type",Object)],w3.prototype,"episodesInfo",void 0);w([R({value:"false"}),x("design:type",String)],w3.prototype,"ariaExpanded",void 0);w([CE("#lists"),x("design:type",Object)],w3.prototype,"lists",void 0); w([S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],w3.prototype,"onIronOverlayClosed",null);w3=w([V({is:"ytd-watch-card-section-dropdown-renderer"})],w3);var blb;var clb;var x3=function(){return O.apply(this,arguments)||this}; p(x3,O);x3.prototype.configureRendererStamper=function(){return{"data.lists":{id:"lists",mapping:{verticalWatchCardListRenderer:{component:"ytd-vertical-watch-card-list-renderer",noInjection:!0},horizontalCardListRenderer:{component:"ytd-horizontal-card-list-renderer",noInjection:!0}}}}}; g.Object.defineProperties(x3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===clb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===blb){var d=document.createElement("template");d.innerHTML=""; blb=d}d=blb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);clb=a}a=clb;return a}}}); var y3=x3;w([P(Z),x("design:type",Object)],y3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],y3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],y3.prototype,"data",void 0);y3=w([V({is:"ytd-watch-card-section-sequence-renderer"})],y3);var dlb;var elb;var flb=function(){return O.apply(this,arguments)||this}; p(flb,O); g.Object.defineProperties(flb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===elb){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n
\n \n
\n \n
\n
\n\n \n \n \n \n \n \n \n \n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dlb){var d=document.createElement("template");d.innerHTML=""; dlb=d}d=dlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);elb=a}a=elb;return a}}}); var z3=flb;w([P(X.YtRendererBehavior),x("design:type",Object)],z3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],z3.prototype,"data",void 0);z3=w([V({is:"ytd-video-game-watch-card-renderer"})],z3);var glb;var hlb;var A3=function(){return O.apply(this,arguments)||this}; p(A3,O);A3.prototype.createArray=function(a){return a?[a]:null}; g.Object.defineProperties(A3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hlb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===glb){var d=document.createElement("template");d.innerHTML="";glb=d}d=glb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); hlb=a}a=hlb;return a}}}); var B3=A3;w([P(X.YtRendererBehavior),x("design:type",Object)],B3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],B3.prototype,"data",void 0);B3=w([V({is:"ytd-watch-card-renderer"})],B3);var ilb;var jlb;var C3=function(){return O.apply(this,arguments)||this}; p(C3,O);C3.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{artistWatchCardRenderer:"ytd-artist-watch-card-renderer",watchCardRenderer:"ytd-watch-card-renderer",showWatchCardRenderer:"ytd-show-watch-card-renderer",videoGameWatchCardRenderer:"ytd-video-game-watch-card-renderer",universalWatchCardRenderer:"ytd-universal-watch-card-renderer"}}}}; C3.prototype.setCsi=function(){if(this.data&&this.data.contents){var a=this.configureRendererStamper()["data.contents"];if(a)for(var b=0;b
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ilb){var d=document.createElement("template");d.innerHTML=""; ilb=d}d=ilb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jlb=a}a=jlb;return a}}}); var D3=C3;D3.prototype.setCsi=D3.prototype.setCsi;w([P(Z),x("design:type",Object)],D3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],D3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],D3.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],D3.prototype,"setCsi",null);D3=w([V({is:"ytd-secondary-search-container-renderer"})],D3);var klb;var llb;var E3=function(){var a=O.apply(this,arguments)||this;a.renderSecondarySearchContainer_=!1;a.isSearch=!1;a.isSearchDova=N("dova_on_search");return a}; p(E3,O);e=E3.prototype;e.configureRendererStamper=function(){return{"data.primaryContents":{id:"primary",mapping:{sectionListRenderer:{component:"ytd-section-list-renderer",properties:{isSearch:"[[isSearch]]",isSearchDova:"[[isSearchDova]]"}},richGridRenderer:{component:"ytd-rich-grid-renderer",properties:{isSearch:"[[isSearch]]"}}}},"data.continuations":{id:"continuations",mapping:{pageContinuationData:"ytd-page-continuation"}}}}; e.created=function(){this.boundStampSecondarySearchContainerIfFits_=this.stampSecondarySearchContainerIfFits_.bind(this);rd("REMAINING_DOVA_DEFERRED_CHUNKS",1)}; e.computeShowSecondaryColumn_=function(a,b){return!!(b&&b.secondaryContents&&a)}; e.activeChanged=function(){this.active&&!this.renderSecondarySearchContainer_?(this.listen(window,"resize","debounceStampSecondarySearchContainerIfFits_"),this.async(this.debounceStampSecondarySearchContainerIfFits_.bind(this))):this.active||this.unlisten(window,"resize","debounceStampSecondarySearchContainerIfFits_")}; e.persistentGuideChanged_=function(){this.active&&!this.renderSecondarySearchContainer_&&this.debounceStampSecondarySearchContainerIfFits_()}; e.stampSecondarySearchContainerIfFits_=function(){!this.renderSecondarySearchContainer_&&1090<=window.innerWidth&&(this.renderSecondarySearchContainer_=!0)}; e.debounceStampSecondarySearchContainerIfFits_=function(){this.debounce("stampSecondarySearchContainerIfFits_",this.boundStampSecondarySearchContainerIfFits_)}; e.onRetrieveLocation_=function(a,b){b.locationRetrieved(location.pathname+location.search+"&pbj=1",void 0);a.stopPropagation()}; e.computeIsGridLayout=function(){var a,b;return!(null===(b=null===(a=this.data)||void 0===a?void 0:a.primaryContents)||void 0===b||!b.richGridRenderer)}; g.Object.defineProperties(E3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===llb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===klb){var d=document.createElement("template");d.innerHTML=""; klb=d}d=klb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);llb=a}a=llb;return a}}}); var F3=E3;F3.prototype.onRetrieveLocation_=F3.prototype.onRetrieveLocation_;F3.prototype.persistentGuideChanged_=F3.prototype.persistentGuideChanged_;F3.prototype.activeChanged=F3.prototype.activeChanged;w([P(Z),x("design:type",Object)],F3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],F3.prototype,"ytRendererBehavior",void 0);w([P(xQ),x("design:type",Object)],F3.prototype,"ytdGuideStateAwareBehavior",void 0); w([R(),x("design:type",Boolean)],F3.prototype,"active",void 0);w([R(),x("design:type",Object)],F3.prototype,"data",void 0);w([R(),x("design:type",Object)],F3.prototype,"renderSecondarySearchContainer_",void 0);w([R({computed:"computeShowSecondaryColumn_(renderSecondarySearchContainer_, data)"}),x("design:type",Boolean)],F3.prototype,"showSecondaryColumn_",void 0);w([R(),x("design:type",Object)],F3.prototype,"isSearch",void 0);w([R(),x("design:type",Object)],F3.prototype,"isSearchDova",void 0); w([R({reflectToAttribute:!0,value:N("desktop_search_prominent_thumbs")}),x("design:type",Boolean)],F3.prototype,"useProminentThumbs",void 0);w([R({reflectToAttribute:!0,value:jk("desktop_search_prominent_thumbs_style")}),x("design:type",Boolean)],F3.prototype,"prominentThumbStyle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],F3.prototype,"centerResults",void 0); w([R({reflectToAttribute:!0,computed:"computeIsGridLayout(data)"}),x("design:type",Boolean)],F3.prototype,"isGridLayout",void 0);w([U("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F3.prototype,"activeChanged",null);w([U("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],F3.prototype,"persistentGuideChanged_",null); w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],F3.prototype,"onRetrieveLocation_",null);F3=w([V({is:"ytd-two-column-search-results-renderer"})],F3);var mlb;var nlb;Polymer({is:"ytd-watch-fixie",_template:function(){if(void 0!==nlb)return nlb;var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n\n
\n\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n \n \n
\n
\n
\n
\n\n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mlb){var d=document.createElement("template");d.innerHTML=""; mlb=d}d=mlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return nlb=a}, behaviors:[F2a.YtdWatchBehavior],properties:{secondarySectionExpanded_:{type:Boolean,reflectToAttribute:!0},metadataExpanded_:{type:Boolean,reflectToAttribute:!0}},listeners:{"yt-metadata-expanded":"onYtMetadataExpanded_","yt-comments-loaded":"onYtCommentsLoaded_"},created:function(){this.waitingForTransitionEnd_=!1;this.animatePeekingCommentJob_=this.updateCommentsHeaderVisibilityJob_=0;this.pageDisposeJobs=this.pageDisposeJobs||[];this.pageDisposeJobs.push(this.resetFixieState_.bind(this))}, ready:function(){this.listen(this.$["secondary-scroll"],"scroll","onColumnScroll_");this.listen(this.$.comments,"scroll","onColumnScroll_")}, attached:function(){return Za(this,function b(){var c=this,d,f;return za(b,function(h){if(1==h.nextAddress)return d=LM(c),q(h,d.getPlayerPromise(),2);f=h.yieldResult;f.setUseFastSizingOnWatch(!1);ra(h)})})}, detached:function(){this.waitingForTransitionEnd_&&(this.unlisten(this.$["comments-container"],"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1)}, onColumnScroll_:function(a){this.markDirty();Polymer.dom(a).rootTarget!=this.$["secondary-scroll"]||this.updateCommentsHeaderVisibilityJob_||(this.updateCommentsHeaderVisibilityJob_=Ck(Fk,this.updateCommentsHeaderVisibility_.bind(this)))}, updateCommentsHeaderVisibility_:function(){this.updateCommentsHeaderVisibilityJob_=0;var a=this.$["secondary-scroll"];this.toggleClass("hidden",a.scrollTop+a.offsetHeight>this.$.comments.offsetTop,this.$["comments-header"])}, onCommentsExpandTap_:function(){var a=this,b=this.$["comments-container"];this.secondarySectionExpanded_?(this.listen(b,"transitionend","onCommentsContainerTransitionEnd_"),b.classList.remove("expanded"),this.$["comments-header-icon"].icon="yt-icons:collapse"):(b.classList.add("detached"),Ek(Fk,function(){b.classList.add("animate");b.classList.add("expanded");a.$["comments-header-icon"].icon="yt-icons:expand";a.markDirty()})); this.secondarySectionExpanded_=!this.secondarySectionExpanded_}, onCommentsContainerTransitionEnd_:function(a){var b=this.$["comments-container"];Polymer.dom(a).rootTarget==b&&(this.unlisten(b,"transitionend","onCommentsContainerTransitionEnd_"),this.waitingForTransitionEnd_=!1,b.classList.remove("animate"),b.classList.remove("detached"))}, onYtMetadataExpanded_:function(a){this.metadataExpanded_=a.detail;this.schedulePlayerSizeUpdate_()}, resetFixieState_:function(){this.$["meta-contents"].firstChild.collapse();if(this.secondarySectionExpanded_)this.onCommentsExpandTap_();Fk.cancelJob(this.animatePeekingCommentJob_);this.peekingCommentData_=void 0;this.$["peeking-comment"].hidden=!0;this.$["comments-header"].classList.remove("animate");this.$["comments-header"].classList.add("no-peeking");this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":"0px"})}, onYtCommentsLoaded_:function(){var a=this;this.notifyPath("comments.header.commentsHeaderRenderer.commentsCount");if(N("kevlar_fixie_watch_peeking_comments")){var b=this.get("data.contents.0.commentThreadRenderer.comment.commentRenderer",this.$.comments);b&&(this.peekingCommentData_=b,this.$["peeking-comment"].hidden=!1,this.updateStyles({"--ytd-watch-fixie-peeking-comment-height":this.$["peeking-comment"].offsetHeight+"px"}),this.animatePeekingCommentJob_=Ck(Fk,function(){a.$["comments-header"].classList.add("animate"); a.$["comments-header"].classList.remove("no-peeking");a.animatePeekingCommentJob_=0}))}}});var olb;var plb;var G3=function(){var a=O.apply(this,arguments)||this;a.isTwoColumns=!0;a.fixie_=N("kevlar_fixie_watch_layout");a.playerMoveAutonavToggle_=N("web_player_move_autonav_toggle");a.watchFeedBigThumbs_=N("kevlar_watch_feed_big_thumbs");a.nextContinuation={continuationType:"watchNextSecondaryResultsContinuation",contentsArray:"data.results",continuationsArray:"data.continuations",responseContentsKey:"results",requestPath:"/related_ajax"};return a}; p(G3,O);e=G3.prototype; e.configureRendererStamper=function(){return{"data.offerModule":{id:"offer-module",mapping:{movieOfferModuleRenderer:"ytd-movie-offer-module-renderer",episodeOfferModuleRenderer:"ytd-movie-offer-module-renderer",liveOfferModuleRenderer:"ytd-movie-offer-module-renderer",channelOfferModuleRenderer:"ytd-movie-offer-module-renderer",unlimitedOfferModuleRenderer:{component:"ytd-unlimited-offer-module-renderer",properties:{hidden:"[[hideUnlimitedOfferModule_]]"}},queueToPlayRenderer:"ytd-queue-to-play-renderer",queueToPlayStateRenderer:"ytd-queue-to-play-state-renderer", recognitionShelfRenderer:"ytd-recognition-shelf-renderer"}},shownItems:{id:"items",mapping:{compactAutoplayRenderer:{component:"ytd-compact-autoplay-renderer",properties:{isTwoColumns:"[[isTwoColumns]]",maskAsVideo:"[[hideAutoplay]]"}},compactMovieRenderer:"ytd-compact-movie-renderer",compactVideoRenderer:"ytd-compact-video-renderer",compactPromotedVideoRenderer:"ytd-compact-promoted-video-renderer",compactRadioRenderer:"ytd-compact-radio-renderer",compactPlaylistRenderer:"ytd-compact-playlist-renderer", promotedSparklesWebRenderer:"ytd-promoted-sparkles-web-renderer",relatedChipCloudRenderer:"yt-related-chip-cloud-renderer",itemSectionRenderer:{component:"ytd-item-section-renderer",properties:{continuationShowButton:"[[showButton_]]"}},continuationItemRenderer:{component:"ytd-continuation-item-renderer",properties:{showButton:"[[showButton_]]"}}}},"data.continuations":{id:"continuations",mapping:{nextContinuationData:{component:"yt-next-continuation",properties:{showButton:"[[showButton_]]"}}},renderPriority:0}}}; e.getItemsPath=function(){return"data.results"}; e.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"results","yt-reload-continuation-items-command-body":"results"}}; e.created=function(){te&&N("polymer2_aggressive_batching")?(this.ytLazyListBehavior.initialCount=12,this.ytLazyListBehavior.minChunkSize=8):this.ytLazyListBehavior.initialCount=1}; e.ready=function(){var a;N("kevlar_watch_skeleton")&&(a={"--yt-img-shadow-placeholder-color":"var(--yt-spec-10-percent-layer)","--yt-img-shadow-min-height":"100%","--yt-img-shadow-min-width":"100%"});a&&this.updateStyles(a)}; e.resultsChanged_=function(){if(this.data&&this.data.results){for(var a=this.data.results,b=null,c=null,d=0;d
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===olb){var d=document.createElement("template");d.innerHTML=""; olb=d}d=olb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);plb=a}a=plb;return a}}}); var H3=G3;H3.prototype.resultsChanged_=H3.prototype.resultsChanged_;w([P(X.YtRendererBehavior),x("design:type",Object)],H3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],H3.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ),x("design:type",Object)],H3.prototype,"ytLazyListBehavior",void 0);w([P(NQ),x("design:type",Object)],H3.prototype,"ytNextContinuationBehavior",void 0);w([P(yU),x("design:type",Object)],H3.prototype,"ytContinuationHandlerBehavior",void 0); w([R({observer:"dataChanged_"}),x("design:type",Object)],H3.prototype,"data",void 0);w([R(),x("design:type",Object)],H3.prototype,"playerData",void 0);w([R({value:!0}),x("design:type",Boolean)],H3.prototype,"autoFill",void 0);w([R({value:60}),x("design:type",Number)],H3.prototype,"targetFramerate",void 0);w([R({observer:"autoplayPropertyChanged_",reflectToAttribute:!0}),x("design:type",Boolean)],H3.prototype,"hideAutoplay",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],H3.prototype,"autonavDisabled",void 0);w([R({observer:"autoplayPropertyChanged_",reflectToAttribute:!0}),x("design:type",Object)],H3.prototype,"isTwoColumns",void 0);w([R({notify:!0}),x("design:type",Object)],H3.prototype,"shownItems",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],H3.prototype,"fixie_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],H3.prototype,"playerMoveAutonavToggle_",void 0); w([R({computed:"computeHideUnlimitedOfferModule_(data, playerData)",observer:"hideUnlimitedOfferModuleChanged_"}),x("design:type",Boolean)],H3.prototype,"hideUnlimitedOfferModule_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],H3.prototype,"watchFeedBigThumbs_",void 0);w([R({value:!1}),x("design:type",Boolean)],H3.prototype,"showMoreButton",void 0); w([R({computed:"computeShowButton_(showMoreButton, data.results)",observer:"showButtonChanged_"}),x("design:type",Boolean)],H3.prototype,"showButton_",void 0);w([U("data.results.*"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H3.prototype,"resultsChanged_",null);H3=w([V({is:"ytd-watch-next-secondary-results-renderer"})],H3);var qlb;var rlb;var I3=function(){var a=O.apply(this,arguments)||this;a.fixedOrder=!1;a.numberOfVisibleAvatars=1;a.hasCta=!1;a.rowAvatarSize=32;return a}; p(I3,O);e=I3.prototype;e.updateNumberOfVisibleAvatars_=function(){var a=this.offsetWidth;a&&(a=Math.floor((a-32)/(this.rowAvatarSize+4)),this.numberOfVisibleAvatars!=a&&(this.numberOfVisibleAvatars=a,this.updateAvatars_()))}; e.attached=function(){var a=this;window.requestAnimationFrame(function(){a.updateNumberOfVisibleAvatars_()})}; e.dataChanged_=function(){this.updateAvatars_()}; e.updateAvatars_=function(){if(this.data&&this.data.avatars){var a=this.data.fixedAvatar?this.numberOfVisibleAvatars-1:this.numberOfVisibleAvatars;this.firstVisibleAvatarsList=this.getVisibleAvatarsList(this.data.avatars,a,0,Math.floor(this.data.avatars.length/2));this.secondVisibleAvatarsList=this.getVisibleAvatarsList(this.data.avatars,a,Math.floor(this.data.avatars.length/2),this.data.avatars.length);this.data.fixedAvatar||(this.ctaAvatars=this.getVisibleAvatarsList(this.data.avatars,12,0,this.data.avatars.length)); this.hasCta=!this.data.fixedAvatar}}; e.getVisibleAvatarsList=function(a,b,c,d){if(b>=a.length)b=a;else if(this.fixedOrder)b=a.slice(c,c+b);else{a=[].concat(ha(a.slice(c,d)));c=Math.random;for(d=a.length-1;0
\n
\n
\n [[getSimpleString(data.rowTitle)]]\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qlb){var d=document.createElement("template");d.innerHTML=""; qlb=d}d=qlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rlb=a}a=rlb;return a}}}); var J3=I3;J3.prototype.updateNumberOfVisibleAvatars_=J3.prototype.updateNumberOfVisibleAvatars_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],J3.prototype,"ironResizableBehavior",void 0);w([P(Z),x("design:type",Object)],J3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],J3.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],J3.prototype,"data",void 0); w([R(),x("design:type",Object)],J3.prototype,"fixedOrder",void 0);w([R(),x("design:type",Object)],J3.prototype,"numberOfVisibleAvatars",void 0);w([R(),x("design:type",Object)],J3.prototype,"firstVisibleAvatarsList",void 0);w([R(),x("design:type",Object)],J3.prototype,"secondVisibleAvatarsList",void 0);w([R(),x("design:type",Object)],J3.prototype,"ctaAvatars",void 0);w([R({computed:"computeCtaAvatarUrls_(ctaAvatars)"}),x("design:type",Object)],J3.prototype,"ctaAvatarUrls",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],J3.prototype,"hasCta",void 0);w([R(),x("design:type",Object)],J3.prototype,"rowAvatarSize",void 0);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J3.prototype,"updateNumberOfVisibleAvatars_",null);J3=w([V({is:"ytd-recognition-shelf-renderer"})],J3);var slb;var tlb;var K3=function(){var a=O.apply(this,arguments)||this;a.stateData=-1;a.state="QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";a.isLoading=!0;a.startGameTimer=new $i(1E3);a.expirationDurationMs=0;a.isQueueToPlayLoading=!1;a.actionMap={"yt-queue-to-play-command":"handleQueueToPlayCommand"};return a}; p(K3,O);e=K3.prototype;e.cloudcast=function(){var a=this,b=this.data&&this.data.clientJsUrl,c=this.data&&this.data.cloudcastEndpoint;b?c?this.loadClientJs(b).then(function(d){a.client=d.client.init(c,"",A("SESSION_INDEX"));a.client.startPollingQueueState(a.videoId,function(f,h){a.pollingResponseHandler(f,h)})}):Zm(Error("Cloudcast endpoint was not provided")):Zm(Error("Queue to play script URL was not provided"))}; e.pollingResponseHandler=function(a,b){this.client&&(this.stateData=void 0===b?-1:b,this.state=this.queueStateToRendererState(a,b),this.isLoading=!1,a===window.cloudcast.client.ClientQueueState.READY_TO_PLAY?this.startGameTimer.enabled||"number"!==typeof b||(this.expirationDurationMs=b,this.startGameTimer.start()):this.startGameTimer.stop(),a===window.cloudcast.client.ClientQueueState.CANNOT_JOIN&&this.client.stopPollingQueueState())}; e.loadClientJs=function(a){return new Promise(function(b,c){var d=!1;void 0!==window.cloudcast?b(window.cloudcast):(window.cloudcastLoaded=function(){d=!0;Gi(function(){b(window.cloudcast)})},WI(a),setTimeout(function(){d||c("Reached timeout when loading queue to play library.")},5E3))})}; e.joinQueue=function(a){a.joinQueue(this.videoId).then(null,function(b){Zm(new Ul("There was an unexpected error when attempting to join the queue",b))})}; e.leaveQueue=function(a){a.leaveQueue(this.videoId).then(null,function(b){Zm(new Ul("There was an unexpected error when attempting to leave the queue",b))})}; e.launchGame=function(a){var b=this;a.playGame(this.videoId).then(function(c){Ac(b.playerEndpoint+"/"+c)},function(c){Zm(new Ul("There was an unexpected error when attempting to launch the game",c))})}; e.queueStateToRendererState=function(a,b){var c=window.cloudcast.client.ClientQueueState,d=window.cloudcast.client.ClientResolvableIssue;switch(a){case c.CANNOT_JOIN:return"QUEUE_TO_PLAY_RENDERER_STATE_CANNOT_JOIN";case c.ELIGIBLE:return"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE";case c.IN_QUEUE:return"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE";case c.READY_TO_PLAY:return"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY";case c.PLAYING:return"QUEUE_TO_PLAY_RENDERER_STATE_PLAYING";case c.RESOLVABLE_ISSUES:if(Array.isArray(b))switch(b[0]){case d.LOGIN_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NOT_LOGGED_IN"; case d.ACCOUNT_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_NO_ACCOUNT";case d.PURCHASE_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_PURCHASE_REQUIRED";case d.SPONSORSHIP_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_SPONSORSHIP_REQUIRED";case d.PLAYABILITY_REQUIRED:return"QUEUE_TO_PLAY_RENDERER_STATE_CHECK_PLAYABILITY";}return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";default:return"QUEUE_TO_PLAY_RENDERER_STATE_UNSPECIFIED";}}; e.handleQueueToPlayCommand=function(){if(this.client)switch(this.isLoading=!0,this.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":this.joinQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":this.leaveQueue(this.client);break;case"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY":this.launchGame(this.client);break;default:Zm(new Ul("Unhandled button action",this.state));}else Zm(Error("Client is not yet initialized, but there was an button triggered."))}; e.attached=function(){var a=this;this.startGameTimerListenerKey||(this.startGameTimerListenerKey=vi(this.startGameTimer,"tick",function(){0>=a.expirationDurationMs?a.startGameTimer.stop():a.expirationDurationMs-=1E3}))}; e.detached=function(){this.client?(this.isLoading=!1,this.client.stopPollingQueueState(),this.startGameTimerListenerKey&&(this.startGameTimer.stop(),Ai(this.startGameTimerListenerKey),this.startGameTimerListenerKey=null)):Zm(Error("Client is not yet initialized, but there was detached."))}; e.fillStateRenderer=function(a,b){if(-1===b||Array.isArray(b))return a;a=y.unsafeClone(a);var c=this.getStateRendererButtonText(a),d=a.title,f=nL(c),h=nL(d);if("number"===typeof b)b=Math.floor(this.expirationDurationMs/1E3),c&&"QUEUE_TO_PLAY_RENDERER_STATE_READY_TO_PLAY"===a.state&&(delete c.runs,c.simpleText=f.replace("$time_left",String(b))),d&&(delete d.runs,d.simpleText=h.replace("$time_remaining",String(b)));else switch(a.state){case"QUEUE_TO_PLAY_RENDERER_STATE_ELIGIBLE":c&&(delete c.runs, c.simpleText=f.replace("$num_in_queue",""+b.length));break;case"QUEUE_TO_PLAY_RENDERER_STATE_IN_QUEUE":d&&(delete d.runs,d.simpleText=h.replace("$place_in_queue",""+b.position).replace("$num_in_queue",""+b.length));}return a}; e.getStateRendererButtonText=function(a){if(a.button&&a.button.buttonRenderer&&a.button.buttonRenderer.text)return a.button.buttonRenderer.text}; e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; g.Object.defineProperties(K3.prototype,{videoId:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.videoId||""}}, playerEndpoint:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.playerEndpoint||""}}, stateRenderer:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.states)for(var a=k(this.data.states),b=a.next();!b.done;b=a.next())if(b=b.value,b.queueToPlayRendererStateRenderer&&b.queueToPlayRendererStateRenderer.state===this.state)return a=b.queueToPlayRendererStateRenderer,-1!==this.stateData?this.fillStateRenderer(a,this.stateData):a}}, button:{configurable:!0,enumerable:!0,get:function(){if(this.stateRenderer&&this.stateRenderer.button)return this.stateRenderer.button}}}); g.Object.defineProperties(K3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tlb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
[[getSimpleString(data.title)]]
\n
\n
\n \n
\n
\n \n
\n \n
\n
\n
\n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===slb){var d=document.createElement("template");d.innerHTML=""; slb=d}d=slb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tlb=a}a=tlb;return a}}}); var L3=K3;L3.prototype.cloudcast=L3.prototype.cloudcast;w([P(X.YtRendererBehavior),x("design:type",Object)],L3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],L3.prototype,"ytRendererstamperBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],L3.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],L3.prototype,"data",void 0);w([R(),x("design:type",Object)],L3.prototype,"stateData",void 0); w([R(),x("design:type",String)],L3.prototype,"state",void 0);w([R(),x("design:type",Object)],L3.prototype,"isLoading",void 0);w([BE("data"),x("design:type",String),x("design:paramtypes",[])],L3.prototype,"videoId",null);w([BE("data"),x("design:type",String),x("design:paramtypes",[])],L3.prototype,"playerEndpoint",null);w([BE("data","state","stateData","expirationDurationMs"),x("design:type",Object),x("design:paramtypes",[])],L3.prototype,"stateRenderer",null); w([BE("stateRenderer"),x("design:type",Object),x("design:paramtypes",[])],L3.prototype,"button",null);w([U("data.clientJsUrl","data.cloudcastEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L3.prototype,"cloudcast",null);L3=w([V({is:"ytd-queue-to-play-renderer"})],L3);var ulb;var vlb;var M3=function(){var a=O.apply(this,arguments)||this;a.isLoading=!0;a.startGameTimer=new $i(1E3);a.timeRemainingSeconds=0;a.isInitialPoll=!0;a.rateLimitedMultiplier=1;a.actionMap={"yt-queue-to-play-state-command":"handleQueueToPlayStateCommand","yt-focus-queue-to-play-state-renderer":"focusQueueToPlayStateRenderer"};return a}; p(M3,O);e=M3.prototype;e.attached=function(){var a=this;this.startGameTimerListenerKey||(this.startGameTimerListenerKey=vi(this.startGameTimer,"tick",function(){--a.timeRemainingSeconds;if(0>=a.timeRemainingSeconds){a.startGameTimer.stop();var b=a.data.timeRemainingTimeoutCommand;b&&(a.pollingTimer&&(bj(a.pollingTimer),a.pollingTimer=null),a.isLoading=!0,a.sendRetryableServiceRequestAction(b))}})); this.maybeGetAndSetPlayer()}; e.detached=function(){this.pollingTimer&&bj(this.pollingTimer);this.startGameTimerListenerKey&&(this.startGameTimer.stop(),Ai(this.startGameTimerListenerKey),this.startGameTimerListenerKey=null);this.tangoStopper&&this.tangoStopper.stop()}; e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; e.ready=function(){this.$.button.addEventListener("tap",this.onButtonClick.bind(this))}; e.graftVE=function(a,b){var c=Tn();b=(void 0===b?null:b)||Sn();return a&&b&&c?(a=Nn(a),yJ(c,b,a),a):null}; e.initialPoll=function(){this.isInitialPoll&&(this.isInitialPoll=!1,this.poll(),this.data&&this.data.timeRemaining&&(this.timeRemainingSeconds=Number(this.data.timeRemaining.seconds)||0))}; e.poll=function(a){var b=this;a=void 0===a?!1:a;if(this.data){this.pollingTimer&&(bj(this.pollingTimer),this.pollingTimer=null);var c=this.data.pollingCommand,d=this.get("queueToPlayCommand",c),f=0;!a&&this.data.pollingInterval&&(f=Number(this.data.pollingInterval)*this.rateLimitedMultiplier);c&&(this.pollingTimer=aj(function(){d?b.handleQueueToPlayCommand(d):b.sendRetryableServiceRequestAction(c)},f))}}; e.handleQueueToPlayStateCommand=function(a){var b=this,c=this.get("queueToPlayStateCommand.renderer.queueToPlayStateRenderer",a);a=this.get("queueToPlayStateCommand.isRateLimited",a);var d=this.get("pollingCommand.queueToPlayCommand",c);if(d)this.isLoading=!1,this.handleQueueToPlayCommand(d),this.poll(!0);else if(a)this.data.pollingInterval=c.pollingInterval,this.rateLimitedMultiplier*=2,this.isLoading=!1,this.poll();else if(this.rateLimitedMultiplier=1,(a=this.get("button.buttonRenderer.navigationEndpoint.urlEndpoint", c))&&a.url&&(a.url=a.url.replace("/u/0/","/u/"+A("SESSION_INDEX")+"/")),c)a=this.graftVE(c.trackingParams),d=this.get("button.buttonRenderer.trackingParams",c),a&&d&&this.graftVE(d,a),this.timeRemainingSeconds=Number(this.get("timeRemaining.seconds",c))||0,this.timeRemainingSeconds?this.timeRemainingSeconds&&!this.startGameTimer.enabled&&(this.$.content.setAttribute("aria-live","off"),this.$.button.setAttribute("aria-live","off"),this.startGameTimer.start(),this.data=c):(this.$.content.setAttribute("aria-live", "live"),this.$.button.setAttribute("aria-live","live"),this.startGameTimer.stop(),this.data=c),this.pollingTimer&&(bj(this.pollingTimer),this.pollingTimer=null),this.isLoading=!1,(c=c.queueInvalidationInfo)?(this.tangoClient||(a=KC.forProdEnv(c.channelName).withApiKey(c.apiKey),this.tangoClient=vza(a.build()),this.tangoStopper=this.tangoClient.start()),!this.tangoSubscription&&c.topicName&&(this.isInitialTangoSignal=!0,this.tangoSubscription=this.tangoClient.signalsFor(new DC(c.topicName,!1)).subscribe(function(f){if(b.isInitialTangoSignal|| !f.isSynthetic)b.isInitialTangoSignal=!1,b.debounce("crowdPlayInvalidation",function(){b.poll(!0)},2E3)},function(){b.debounce("crowdPlayInvalidation",function(){b.poll(!0)},2E3)}))):this.tangoSubscription&&(this.tangoSubscription.unsubscribe(),this.tangoSubscription=null),this.poll()}; e.onButtonClick=function(){this.buttonCommand&&(this.buttonCommand.queueToPlayCommand?this.handleQueueToPlayCommand(this.buttonCommand.queueToPlayCommand):(this.pollingTimer&&(bj(this.pollingTimer),this.pollingTimer=null),this.outgoingStadiaRequest&&this.outgoingStadiaRequest.ajaxPromise&&(this.outgoingStadiaRequest.ajaxPromise.cancel(),this.outgoingStadiaRequest=null),this.isLoading=!0,this.sendRetryableServiceRequestAction(this.buttonCommand)))}; e.sendRetryableServiceRequestAction=function(a,b){var c=this;b=void 0===b?0:b;return 2<=b?(this.poll(!0),Qi(null)):Xi(this.actionSenderBehavior.sendServiceRequestAction([a]).then(function(d){if(!d.data.feedbackResponses[0].isProcessed)return c.sendRetryableServiceRequestAction(a,b+1)}),function(d){if(!(d instanceof Yi))return c.sendRetryableServiceRequestAction(a,b+1)})}; e.handleQueueToPlayCommand=function(a){a&&(a=this.get("queueToPlayUrl",a))&&(!N("stadia_crowdplay_disable_video_pause")&&this.player&&this.player.pauseVideo(),a=a.replace("/u/0/","/u/"+A("SESSION_INDEX")+"/"),Ac(a))}; e.maybeGetAndSetPlayer=function(){var a=this,b=KM(this);b&&b.getPlayerPromise().then(function(c){return a.player=c})}; e.onYtServiceRequestSent=function(a,b){this.data&&b.endpoint===this.data.pollingCommand&&(this.outgoingStadiaRequest=b)}; e.onYtServiceRequestCompleted=function(a,b){this.data&&b.endpoint===this.data.pollingCommand&&(this.outgoingStadiaRequest=null)}; e.focusQueueToPlayStateRenderer=function(){pk(this)}; g.Object.defineProperties(M3.prototype,{boxArtUrl:{configurable:!0,enumerable:!0,get:function(){var a=this.get("data.boxArt.thumbnails");if(a)return vO(a,125,void 0,"height")||void 0}}, sectionTitle:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.sectionTitle)return"";var a=nL(this.data.sectionTitle);this.data.timeRemaining&&(a=a.replace("$time_remaining",String(this.timeRemainingSeconds)));return a}}, button:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.button)return{};this.data.button.buttonRenderer&&this.data.button.buttonRenderer.command&&(this.data.button.buttonRenderer.command.signInEndpoint?this.buttonCommand=void 0:(this.buttonCommand=this.data.button.buttonRenderer.command,this.data.button.buttonRenderer.command=void 0));var a=y.unsafeClone(this.data.button);if(a.buttonRenderer&&a.buttonRenderer.text){var b=nL(a.buttonRenderer.text);delete a.buttonRenderer.text.runs; this.data.timeRemaining&&(b=b.replace("$time_left",String(this.timeRemainingSeconds)));a.buttonRenderer.text.simpleText=b}return a}}}); g.Object.defineProperties(M3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vlb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
[[getSimpleString(data.title)]]
\n
\n
\n
\n \n
\n
\n
\n \n
\n \n
\n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ulb){var d=document.createElement("template");d.innerHTML=""; ulb=d}d=ulb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vlb=a}a=vlb;return a}}}); var N3=M3;N3.prototype.onYtServiceRequestCompleted=N3.prototype.onYtServiceRequestCompleted;N3.prototype.onYtServiceRequestSent=N3.prototype.onYtServiceRequestSent;N3.prototype.initialPoll=N3.prototype.initialPoll;w([P(X.YtRendererBehavior),x("design:type",Object)],N3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],N3.prototype,"ytRendererstamperBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],N3.prototype,"actionHandlerBehavior",void 0); w([P([W.YtActionSenderBehavior]),x("design:type",Object)],N3.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],N3.prototype,"data",void 0);w([R(),x("design:type",Object)],N3.prototype,"isLoading",void 0);w([R(),x("design:type",Object)],N3.prototype,"pollingTimer",void 0);w([R(),x("design:type",Object)],N3.prototype,"startGameTimer",void 0);w([R(),x("design:type",Object)],N3.prototype,"timeRemainingSeconds",void 0); w([R(),x("design:type",Object)],N3.prototype,"isInitialPoll",void 0);w([R(),x("design:type",Object)],N3.prototype,"outgoingStadiaRequest",void 0);w([BE("data.boxArt"),x("design:type",Object),x("design:paramtypes",[])],N3.prototype,"boxArtUrl",null);w([BE("data.sectionTitle","timeRemainingSeconds"),x("design:type",String),x("design:paramtypes",[])],N3.prototype,"sectionTitle",null); w([BE("data.button","timeRemainingSeconds"),x("design:type",Object),x("design:paramtypes",[])],N3.prototype,"button",null);w([U("data.pollingCommand"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],N3.prototype,"initialPoll",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],N3.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],N3.prototype,"onYtServiceRequestCompleted",null);N3=w([V({is:"ytd-queue-to-play-state-renderer"})],N3);var wlb;var xlb;var O3,P3=function(){return O.apply(this,arguments)||this}; p(P3,O);P3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}}}}; P3.prototype.onTap=function(){this.data&&this.data.navigationEndpoint&&this.data.adPlaybackContextParams&&jLa(this.data.navigationEndpoint,this.data.adPlaybackContextParams)}; P3.prototype.dataChanged=function(){this.data&&Yn(this.data.impressionUrls||[]);this.data&&this.data.activeView&&UP(this.ytdActiveViewBehavior,this.data.activeView,16);this.set("data.adBadge",O3.DEFAULT_AD_BADGE_RENDERER)}; g.Object.defineProperties(P3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xlb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wlb){var d=document.createElement("template");d.innerHTML=""; wlb=d}d=wlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xlb=a}a=xlb;return a}}}); var Q3=O3=P3;O3.prototype.dataChanged=O3.prototype.dataChanged;O3.prototype.onTap=O3.prototype.onTap;Q3.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Z),x("design:type",Object)],Q3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],Q3.prototype,"ytRendererBehavior",void 0);w([P(VP),x("design:type",Object)],Q3.prototype,"ytdActiveViewBehavior",void 0); w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")}}), x("design:type",Boolean)],Q3.prototype,"watchFeedBigThumbs",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_feed_big_thumbs")?"9999":"168"}}), x("design:type",String)],Q3.prototype,"thumbnailWidth",void 0);w([R(),x("design:type",Object)],Q3.prototype,"data",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q3.prototype,"onTap",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Q3.prototype,"dataChanged",null);Q3=O3=w([V({is:"ytd-compact-promoted-video-renderer"})],Q3);var ylb;var zlb;var R3,S3=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-mute-ad-action":"handleMuteAd"};return a}; p(S3,O);S3.prototype.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.mediaHoverOverlay":{id:"media-hover-overlay",mapping:{buttonRenderer:{component:"ytd-button-renderer",params:{verticallyAligned:!0}}}}}}; S3.prototype.dataChanged=function(){this.data&&this.data.impressionCommands&&(this.set("data.adBadge",R3.DEFAULT_AD_BADGE_RENDERER),this.toggleClass("variable-image-ratio",this.data.variableImageRatio),this.toggleClass("sparkles-light-cta",!0),this.data.activeView&&UP(this.ytdActiveViewBehavior,this.data.activeView,16),this.data.impressionCommands.forEach(function(a){a=k(a.loggingUrls||[]);for(var b=a.next();!b.done;b=a.next())b=b.value,b.baseUrl&&Xn(b.baseUrl)}))}; S3.prototype.onTap=function(a){this.data&&this.data.navigationEndpoint&&(a.preventDefault(),this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint}))}; S3.prototype.handleMuteAd=function(){this.collapsed=!0}; g.Object.defineProperties(S3.prototype,{hideHoverOverlay:{configurable:!0,enumerable:!0,get:function(){return!this.data||!this.data.mediaHoverOverlay}}}); g.Object.defineProperties(S3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zlb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n [[getSimpleString(data.title)]]\n

\n
\n [[getSimpleString(data.description)]]\n
\n
\n \n \n
\n [[getSimpleString(data.websiteText)]]\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ylb){var d=document.createElement("template");d.innerHTML=""; ylb=d}d=ylb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zlb=a}a=zlb;return a}}}); var T3=R3=S3;R3.prototype.dataChanged=R3.prototype.dataChanged;T3.DEFAULT_AD_BADGE_RENDERER={metadataBadgeRenderer:{label:YK("AD_BADGE_TEXT",void 0,"Ad"),style:"BADGE_STYLE_TYPE_AD"}};w([P(Z),x("design:type",Object)],T3.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],T3.prototype,"ytRendererBehavior",void 0);w([P(VP),x("design:type",Object)],T3.prototype,"ytdActiveViewBehavior",void 0); w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],T3.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],T3.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],T3.prototype,"collapsed",void 0);w([R({reflectToAttribute:!0}),BE("data.mediaHoverOverlay"),x("design:type",Boolean),x("design:paramtypes",[])],T3.prototype,"hideHoverOverlay",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],T3.prototype,"dataChanged",null);T3=R3=w([V({is:"ytd-promoted-sparkles-web-renderer"})],T3);var Alb;var Blb;var U3=function(){return O.apply(this,arguments)||this}; p(U3,O);U3.prototype.configureRendererStamper=function(){return{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}}}}; g.Object.defineProperties(U3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Blb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]][[getSimpleString(data.subtitle)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Alb){var d=document.createElement("template");d.innerHTML=""; Alb=d}d=Alb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Blb=a}a=Blb;return a}}}); var V3=U3;w([P(X.YtRendererBehavior),x("design:type",Object)],V3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],V3.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],V3.prototype,"data",void 0);V3=w([V({is:"ytd-compact-tvfilm-entry-point-renderer"})],V3);var Clb;var Dlb;var W3=function(){var a=O.apply(this,arguments)||this;a.badges=[{textBadge:{label:kL("CC")}}];return a}; p(W3,O);e=W3.prototype;e.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}}; e.dataChanged=function(){var a=this.get("data.offerButton.buttonRenderer.serviceEndpoint");a&&a.commandMetadata&&a.commandMetadata.webHandleServiceEndpointExtension&&a.commandMetadata.webHandleServiceEndpointExtension.fireAutomatically?this.actionSenderBehavior.sendServiceRequestAction([a]):a&&a.webHandleServiceEndpointExtension&&a.webHandleServiceEndpointExtension.fireAutomatically&&this.actionSenderBehavior.sendServiceRequestAction([a])}; e.isEmptyContent=function(a){return this.isStorefrontEntryPointEmpty(a)&&this.shouldHideOfferModule(a)}; e.isStorefrontEntryPointEmpty=function(a){return!a||!a.storefrontEntryPoint}; e.shouldHideOfferModule=function(a){return!!a.hideVideoDetails}; e.isOfferModuleNavigationInactive=function(a){return!a.navigationEndpoint&&!a.serviceEndpoint}; e.maybeNavigateWithServiceEndpoint=function(){this.data&&this.data.navigationEndpoint||this.data&&this.data.serviceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint])}; g.Object.defineProperties(W3,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dlb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Clb){var d=document.createElement("template");d.innerHTML=""; Clb=d}d=Clb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dlb=a}a=Dlb;return a}}}); var X3=W3;w([P(X.YtRendererBehavior),x("design:type",Object)],X3.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],X3.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],X3.prototype,"actionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],X3.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"isEmptyContent(data)"}),x("design:type",Boolean)],X3.prototype,"hidden",void 0); w([R(),x("design:type",Object)],X3.prototype,"badges",void 0);X3=w([V({is:"ytd-movie-offer-module-renderer"})],X3);var Elb;var Flb;var Glb=function(){return O.apply(this,arguments)||this}; p(Glb,O); g.Object.defineProperties(Glb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Flb){var a=document.createElement("template");a.innerHTML="\n\n-\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Elb){var d=document.createElement("template");d.innerHTML=""; Elb=d}d=Elb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Flb=a}a=Flb;return a}}}); var Y3=Glb;w([P(X.YtRendererBehavior),x("design:type",Object)],Y3.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],Y3.prototype,"data",void 0);Y3=w([V({is:"ytd-offer-review-renderer"})],Y3);var Hlb;var Ilb;var Z3=function(){return O.apply(this,arguments)||this}; p(Z3,O);Z3.prototype.ready=function(){this.initializeDefs_()}; Z3.prototype.initializeDefs_=function(){var a=this.meta_.byKey("yt-icons"),b=a.$$("#star"),c=a.$$("#star_half");a=a.$$("#star_border");this.$.defs.appendChild(b.cloneNode(!0));this.$.defs.appendChild(c.cloneNode(!0));this.$.defs.appendChild(a.cloneNode(!0))}; Z3.prototype.percentChanged=function(){for(var a=this.$.rating;a.firstChild;)a.removeChild(a.firstChild);var b=Math.round(this.percent/10);a=Math.floor(b/2);b%=2;var c=5-a-b;this.appendStars_("star",a,0);this.appendStars_("star_half",b,a);this.appendStars_("star_border",c,a+b)}; Z3.prototype.appendStars_=function(a,b,c){for(var d=0;d\n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hlb){var d=document.createElement("template");d.innerHTML=""; Hlb=d}d=Hlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ilb=a}a=Ilb;return a}}}); var $3=Z3;$3.prototype.percentChanged=$3.prototype.percentChanged;w([R(),x("design:type",Number)],$3.prototype,"percent",void 0);w([R({value:6}),x("design:type",Object)],$3.prototype,"spacing",void 0);w([R({value:Polymer.Base.create("iron-meta",{type:"iconset"})}),x("design:type",Object)],$3.prototype,"meta_",void 0);w([U("percent"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$3.prototype,"percentChanged",null);$3=w([V({is:"ytd-ratings"})],$3);var Jlb;var Klb;var a4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-autonav-state-changed-action":"onYtAutonavStateChangedAction"};return a}; p(a4,O);e=a4.prototype;e.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{compactRadioRenderer:"ytd-compact-radio-renderer",compactVideoRenderer:"ytd-compact-video-renderer"}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap;var a=wL.getInstance().getState();this.toggle.checked=1!==a;this.clientVe=On(113957)}; e.onToggleChanged=function(){var a=this.toggle.checked?2:1;wL.getInstance().setState(a);this.logClick()}; e.onYtAutonavStateChangedAction=function(a){this.toggle.checked=1!==a}; e.logClick=function(){var a=Tn(),b=Sn();a&&b&&this.clientVe&&(yJ(a,b,this.clientVe),BJ(a,this.clientVe))}; g.Object.defineProperties(a4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Klb){var a=document.createElement("template");a.innerHTML="
\n

[[getSimpleString(data.title)]]

\n
[[getSimpleString(data.toggleDescription)]]
\n \n \n [[getSimpleString(data.infoText)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jlb){var d=document.createElement("template");d.innerHTML=""; Jlb=d}d=Jlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Klb=a}a=Klb;return a}}}); var b4=a4;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],b4.prototype,"actionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],b4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],b4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],b4.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"isTwoColumns",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"maskAsVideo",void 0);w([R({value:function(){return N("kevlar_fixie_watch_layout")}, reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"fixie",void 0);w([R({reflectToAttribute:!0,value:!0}),x("design:type",Boolean)],b4.prototype,"queueIsEmpty",void 0);w([R({value:function(){return N("kevlar_watch_feed_big_thumbs")}, reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"watchFeedBigThumbs",void 0);w([R({value:function(){return N("web_player_move_autonav_toggle")}, reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"playerMoveAutonavToggle",void 0);w([R({value:function(){return N("web_hide_autonav_headline")}, reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"hideAutonavHeadline",void 0);w([R({value:function(){return N("web_hide_autonav_keyline")}, reflectToAttribute:!0}),x("design:type",Boolean)],b4.prototype,"hideAutonavKeyline",void 0);w([CE("#contents"),x("design:type",xX)],b4.prototype,"contents",void 0);w([CE("#toggle"),x("design:type",Object)],b4.prototype,"toggle",void 0);b4=w([V({is:"ytd-compact-autoplay-renderer"})],b4);var Llb;var Mlb;var c4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-hide-unlimited-offer-module":"handleHideAction"};return a}; p(c4,O);e=c4.prototype;e.dataChanged=function(){this.hidden=!1}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.configureRendererStamper=function(){return{"data.storefrontEntryPoint":{id:"storefront-entry-point",mapping:{compactTvfilmEntryPointRenderer:"ytd-compact-tvfilm-entry-point-renderer"}}}}; e.onThumbnailTap=function(a){this.data&&this.data.serviceEndpoint&&(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.stopPropagation())}; e.handleHideAction=function(){this.data&&this.data.suppressIfCompanionAds&&(this.hidden=!0)}; g.Object.defineProperties(c4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mlb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n \n \n
\n \n \n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Llb){var d=document.createElement("template");d.innerHTML=""; Llb=d}d=Llb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mlb=a}a=Mlb;return a}}}); var d4=c4;d4.prototype.dataChanged=d4.prototype.dataChanged;w([P(Z),x("design:type",Object)],d4.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],d4.prototype,"rendererBehaviors",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],d4.prototype,"actionSenderBehavior",void 0);w([P([xO.YtActionHandlerBehavior]),x("design:type",Object)],d4.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],d4.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],d4.prototype,"dataChanged",null);d4=w([V({is:"ytd-unlimited-offer-module-renderer"})],d4);var Nlb;var Olb;var e4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-related-chip-command":"handleRelatedChipCommand","yt-chip-cloud-chip-select-action":"handleChipCloudChipSelectAction","yt-chip-cloud-chip-deselect-action":"handleChipCloudChipDeselectAction"};return a}; p(e4,O);e=e4.prototype;e.configureRendererStamper=function(){return{"data.chips":{id:"chips",mapping:{chipCloudChipRenderer:{component:"yt-chip-cloud-chip-renderer"}}},"data.previousButton":{id:"left-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundPrevClick]]"}}}},"data.nextButton":{id:"right-arrow",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundNextClick]]"}}}}}}; e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.dataChanged=function(){this.selected=0;this.ytScrollableChipCloudBehavior.reset()}; e.onResize=function(){fhb(this.ytScrollableChipCloudBehavior);S0(this.ytScrollableChipCloudBehavior)}; e.handleRelatedChipCommand=function(a,b){a=this.chipsSelector.indexOf(b);-1!==a&&this.chipsSelector.selectIndex(a)}; e.handleChipCloudChipSelectAction=function(a){a=this.chipsSelector.indexOf(a);-1
\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nlb){var d=document.createElement("template");d.innerHTML=""; Nlb=d}d=Nlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Olb=a}a=Olb;return a}}}); var f4=e4;f4.prototype.onResize=f4.prototype.onResize;f4.prototype.dataChanged=f4.prototype.dataChanged;w([P(Z),x("design:type",Object)],f4.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],f4.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],f4.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],f4.prototype,"actionSenderBehavior",void 0); w([P(Polymer.IronResizableBehavior),x("design:type",Object)],f4.prototype,"ironResizableBehavior",void 0);w([P(),x("design:type",T0)],f4.prototype,"ytScrollableChipCloudBehavior",void 0);w([R(),x("design:type",Object)],f4.prototype,"data",void 0);w([R({value:0}),x("design:type",Number)],f4.prototype,"selected",void 0);w([CE("#chips"),x("design:type",Object)],f4.prototype,"chipsSelector",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f4.prototype,"dataChanged",null);w([S("iron-resize"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f4.prototype,"onResize",null);f4=w([V({is:"yt-chip-cloud-renderer"})],f4);var Plb;var Qlb;var g4=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-related-chip-command":"handleRelatedChipCommand"};return a}; p(g4,O);g4.prototype.configureRendererStamper=function(){return{"data.content":{id:"content",mapping:{chipCloudRenderer:{component:"yt-chip-cloud-renderer"}}}}}; g4.prototype.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; g4.prototype.handleRelatedChipCommand=function(a){a=a.relatedChipCommand;var b=a.contents;b?this.actionSenderBehavior.sendAction("yt-item-section-replace-action",[b,a.targetSectionIdentifier]):this.actionSenderBehavior.sendAction("yt-item-section-continuation-action",[a.continuationData,a.targetSectionIdentifier])}; g.Object.defineProperties(g4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qlb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Plb){var d=document.createElement("template");d.innerHTML="";Plb=d}d=Plb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qlb=a}a=Qlb;return a}}}); var h4=g4;w([P(Z),x("design:type",Object)],h4.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],h4.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],h4.prototype,"actionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],h4.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],h4.prototype,"data",void 0);h4=w([V({is:"yt-related-chip-cloud-renderer"})],h4);var Rlb;var Slb;var i4=function(){}; i4.prototype.showFeedbackDialog=function(){}; i4.prototype.showHelpDialog=function(){}; i4.prototype.showHelpDialog=i4.prototype.showHelpDialog;i4.prototype.showFeedbackDialog=i4.prototype.showFeedbackDialog;var j4=function(){var a=O.apply(this,arguments)||this;a.currentPageUrl="";a.baseUrl="";a.isHiddenByUser=null;a.hidden=!1;a.isListeningForPlayerProgress=!1;a.playerEvents=new Map;a.isFrameReady=!1;a.player=null;a.actionMap={"yt-set-live-chat-collapsed-state-action":"setCollapsedState","yt-forward-redux-action-to-live-chat-iframe":"forwardReduxActionToIframe","yt-dark-mode-toggled-action":"onDarkModeToggledAction","yt-dark-theme-action":"onDarkThemeAction","yt-light-theme-action":"onLightThemeAction", "yt-signal-action-close-pdg-buy-flow":"onClosePdgBuyFlow"};return a}; p(j4,O);e=j4.prototype;e.onYtToggleButton=function(){this.isHiddenByUser=!this.collapsed}; e.configureRendererStamper=function(){return{"data.liveChatRenderer.showHideButton":{id:"show-hide-button",mapping:{toggleButtonRenderer:{component:"ytd-toggle-button-renderer",params:{noink:!0}}}}}}; e.created=function(){this.handleIframeEventListener=this.handleIframeEvent.bind(this);this.handleKeyboardEventListener=this.handleKeyboardEvent.bind(this);this.playerEvents.set("onVideoProgress",this.playerProgressHandler);this.playerEvents.set("onAdStart",this.playerAdStartHandler);this.playerEvents.set("onAdEnd",this.playerAdEndHandler);this.playerEvents.set("onStateChange",this.playerStateChangeHandler)}; e.attached=function(){window.addEventListener("message",this.handleIframeEventListener);window.addEventListener("keydown",this.handleKeyboardEventListener);window.addEventListener("keyup",this.handleKeyboardEventListener);this.currentPageUrl=window.location.href;this.setupPlayerProgressRelay()}; e.detached=function(){window.removeEventListener("message",this.handleIframeEventListener);window.removeEventListener("keydown",this.handleKeyboardEventListener);window.removeEventListener("keyup",this.handleKeyboardEventListener);this.currentPageUrl="";this.isListeningForPlayerProgress=!1;this.setPlayer(null);if(!N("kevlar_use_ytd_player")){var a=MM(this);this.unlisten(a,"yt-player-released","disconnectFromPlayer")}this.isFrameReady=!1}; e.computeBaseUrl=function(a){var b="/live_chat";this.isChatReplay()&&(b="/live_chat_replay");return hr(gr(mr(a).setPath(b),null),"").toString()}; e.dataChanged=function(){this.isHiddenByUser=null}; e.urlChanged=function(){if(void 0!==this.url){this.isFrameReady=!this.isChatReplay();var a=this.url;if(this.isChatReplay()&&this.player){var b=Math.floor(1E3*this.player.getProgressState().current);a=ar(mr(a),"playerOffsetMs",b.toString()).toString()}b=this.chatframe;try{if("about:blank"===a)var c=rea;else{var d=void 0===d?wea:d;var f=a;d=void 0===d?wea:d;var h,l=f.substring(0,14).indexOf(":");var m=null!==(h=yea[0>l?"":f.substr(0,l).toLowerCase()])&&void 0!==h?h:xea;var n=d.includes(m.scheme)&&m.isValid(f)? new kh(f,bh):void 0;c=n||sea}var r=b.contentDocument.location,v=r.replace;if(c instanceof qea){if(c instanceof kh)var z=c.privateDoNotAccessOrElseWrappedUrl;else throw Error("wrong type");}else z=Xb(c);v.call(r,z)}catch(C){b.src=a}}}; e.handleIframeEvent=function(a){var b=this;if(a&&Nb(this.baseUrl,a.origin)&&a.source===this.chatframe.contentWindow&&Qa(a.data))if(a.data["yt-iframed-buyflow-launcher"])this.handleBuyflowMessages(a);else if(a.data["yt-iframed-player-progress-relay"])this.handleChatFrameReady();else if(a.data["yt-show-feedback-dialog"]){var c=this.ytComponentBehaviorType.getInterface(i4);if(c){var d=a.ports,f;d&&d.length&&(f=function(){d[0].postMessage({})}); a=a.data["yt-show-feedback-dialog"];c.showFeedbackDialog(a.customProductData,a.feedbackContent,f,a.bucket)}}else a.data["yt-show-survey"]?this.fire("yt-show-survey",a.data["yt-show-survey"]):a.data["yt-purchase-membership"]?this.ytRendererBehavior.sendServiceRequestAction([a.data["yt-purchase-membership"]]):a.data["yt-open-vc-balance-widget"]?this.ytRendererBehavior.sendServiceRequestAction([a.data["yt-open-vc-balance-widget"]]).then(function(){},function(h){b.onLiveChatBuyFlowCallback({success:!1, error:h})}):a.data["yt-user-activity"]?Nk():a.data["yt-attach-live-chat-response-tracking-params"]?this.attachLiveChatResponseVeTrackingParams(a.data["yt-attach-live-chat-response-tracking-params"].trackingParams):a.data["yt-open-popup"]?this.ytOpenPopupBehavior.openPopup(a.data["yt-open-popup"]):a.data["yt-redeem-vc"]&&this.ytRendererBehavior.sendServiceRequestAction(a.data["yt-redeem-vc"]).then(function(h){if(h&&h.data&&"YPC_RESPONSE_CODE_UNKNOWN"===h.data.ypcResponseCode)b.onLiveChatBuyFlowCallback({success:!0, response:h})},function(h){b.onLiveChatBuyFlowCallback({success:!1, error:h})})}; e.attachLiveChatResponseVeTrackingParams=function(a){a=Nn(a);var b=Tn(),c=Ka("liveChatRenderer.trackingParams",this.data);b&&c&&yJ(b,Nn(c),a)}; e.handleBuyflowMessages=function(a){var b=a.data["yt-iframed-buyflow-launcher"].encryptedPurchaseParams,c=a.data["yt-iframed-buyflow-launcher"].serializedTransactionFlowLoggingParams,d=a.data["yt-iframed-buyflow-launcher"].serializedPaymentsClientParams;oWa(aO.getInstance(),b.replace(/-/g,"+").replace(/_/g,"/"),function(f){a.ports[0].postMessage({success:!0,buyFlowResponse:f})},void 0,function(f){a.ports[0].postMessage({success:!1, error:f&&f.message||"Buyflow rejected without error."})},void 0,void 0,function(){a.ports[0].postMessage({closed:!0})},c,d)}; e.setupPlayerProgressRelay=function(){if(!this.isListeningForPlayerProgress){var a=MM(this);a.getPlayerPromise().then(this.playerApiReady.bind(this));N("kevlar_use_ytd_player")||this.listen(a,"yt-player-released","disconnectFromPlayer");this.isListeningForPlayerProgress=!0}}; e.handleChatFrameReady=function(){this.isFrameReady=!0;this.player&&1===this.player.getAdState()&&this.postToContentWindow({"yt-player-ad-start":""})}; e.playerApiReady=function(a){this.setPlayer(a)}; e.playerProgressHandler=function(){if(this.player){var a=this.player.getProgressState();this.postToContentWindow({"yt-player-video-progress":a.current})}}; e.playerAdStartHandler=function(a){this.postToContentWindow({"yt-player-ad-start":a})}; e.playerAdEndHandler=function(){this.postToContentWindow({"yt-player-ad-end":!0})}; e.playerStateChangeHandler=function(a){this.postToContentWindow({"yt-player-state-change":a})}; e.disconnectFromPlayer=function(){this.setPlayer(null)}; e.setPlayer=function(a){this.player&&this.ytPlayerListenerBehavior.unlistenFromPlayerEvents(this.player,this.playerEvents);a&&(this.player=a,this.ytPlayerListenerBehavior.listenToPlayerEvents(a,this.playerEvents),this.fire("player-api-ready"))}; e.liveChatPageUrl=function(a,b,c){return!c||b?"about:blank":c.liveChatRenderer?(b=mr(this.currentPageUrl).queryData_,voa(b),a=mr(a),b.add("continuation",c.liveChatRenderer.continuations[0].reloadContinuationData.continuation),gr(a,b),a.toString()):""}; e.isCollapsed=function(a,b){return null!==b?b:a&&a.conversationBarRenderer&&a.conversationBarRenderer.availabilityMessage?!0:a&&a.liveChatRenderer?"LIVE_CHAT_DISPLAY_STATE_COLLAPSED"===a.liveChatRenderer.initialDisplayState:!1}; e.isHidden=function(a,b){var c=b&&b.conversationBarRenderer&&b.conversationBarRenderer.availabilityMessage,d=b&&b.liveChatRenderer&&b.liveChatRenderer.showHideButton;return!a||c||d?b&&b.liveChatRenderer&&b.liveChatRenderer.initialDisplayState?"LIVE_CHAT_DISPLAY_STATE_HIDDEN"===b.liveChatRenderer.initialDisplayState:!1:!0}; e.setCollapsedState=function(a){a.setLiveChatCollapsedStateAction&&(this.isHiddenByUser=!!a.setLiveChatCollapsedStateAction.collapsed)}; e.forwardReduxActionToIframe=function(a){this.postToContentWindow({"yt-live-chat-forward-redux-action":a})}; e.onDarkModeToggledAction=function(a){this.sendDarkThemePostMessage(a)}; e.onDarkThemeAction=function(){this.sendDarkThemePostMessage(!0)}; e.onLightThemeAction=function(){this.sendDarkThemePostMessage(!1)}; e.onClosePdgBuyFlow=function(){this.postToContentWindow({"yt-live-chat-close-buy-flow":!0})}; e.sendDarkThemePostMessage=function(a){this.postToContentWindow({"yt-live-chat-set-dark-theme":a})}; e.onLiveChatBuyFlowCallback=function(a){this.postToContentWindow({"yt-live-chat-buy-flow-callback":a})}; e.handleKeyboardEvent=function(a){y.containsValue(rVa,a.keyCode)&&this.postToContentWindow({"yt-live-chat-keyboard-event":{eventType:a.type,keyCode:a.keyCode}})}; e.isChatReplay=function(){return!!(this.data&&this.data.liveChatRenderer&&this.data.liveChatRenderer.isReplay)}; e.postToContentWindow=function(a){if(this.isFrameReady){var b=window.location.protocol+"//"+window.location.host;if(this.chatframe.contentWindow)try{this.chatframe.contentWindow.postMessage(a,b)}catch(c){Zm(c)}else Am(new Ul("Tried posting a message to an iframe with no content window",a))}}; g.Object.defineProperties(j4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Slb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rlb){var d=document.createElement("template");d.innerHTML=""; Rlb=d}d=Rlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Slb=a}a=Slb;return a}}}); var k4=j4;k4.prototype.onYtToggleButton=k4.prototype.onYtToggleButton;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],k4.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],k4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],k4.prototype,"ytRendererstamperBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],k4.prototype,"ytComponentBehaviorType",void 0); w([P(TP),x("design:type",Object)],k4.prototype,"ytPlayerListenerBehavior",void 0);w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],k4.prototype,"ytOpenPopupBehavior",void 0);w([R(),x("design:type",Object)],k4.prototype,"data",void 0);w([R(),x("design:type",String)],k4.prototype,"currentPageUrl",void 0);w([R({computed:"computeBaseUrl(currentPageUrl,data)"}),x("design:type",String)],k4.prototype,"baseUrl",void 0); w([R({computed:"liveChatPageUrl(baseUrl,collapsed,data)",observer:"urlChanged"}),x("design:type",String)],k4.prototype,"url",void 0);w([R(),x("design:type",Object)],k4.prototype,"isHiddenByUser",void 0);w([R({reflectToAttribute:!0,computed:"isHidden(collapsed,data)"}),x("design:type",Object)],k4.prototype,"hidden",void 0);w([R({reflectToAttribute:!0,computed:"isCollapsed(data,isHiddenByUser)"}),x("design:type",Boolean)],k4.prototype,"collapsed",void 0); w([CE("#chatframe"),x("design:type",HTMLIFrameElement)],k4.prototype,"chatframe",void 0);w([S("yt-toggle-button"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],k4.prototype,"onYtToggleButton",null);k4=w([V({is:"ytd-live-chat-frame"})],k4);var Tlb;var Ulb;var Vlb=[X.YtRendererBehavior,{_noAccessors:!0,properties:{loopOn:Boolean,shuffleOn:Boolean},listeners:{"yt-toggle-button":"onYtToggleButton_"},onYtToggleButton_:function(a){a=a.detail;void 0!=a.actions.loop&&(this.loopOn=a.actions.loop);void 0!=a.actions.shuffle&&(this.shuffleOn=a.actions.shuffle)}, setMenuData_:function(a){if(!a||!a.playlistButtons||a.isInfinite)return null;for(var b=a.playlistButtons.menuRenderer.topLevelButtons,c=b.length,d=0;d

"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tlb){var d=document.createElement("template");d.innerHTML=""; Tlb=d}d=Tlb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ulb=a}a=Ulb;return a}}}); var m4=l4;m4.prototype.onRenderStamperFinished_=m4.prototype.onRenderStamperFinished_;m4.prototype.onMouseLeave_=m4.prototype.onMouseLeave_;m4.prototype.onMouseEnter_=m4.prototype.onMouseEnter_;w([P(Polymer.IronResizableBehavior),x("design:type",Object)],m4.prototype,"ironResizableBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],m4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],m4.prototype,"ytRendererstamperBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],m4.prototype,"ytActionHandlerBehavior",void 0);w([P(Vlb),x("design:type",Object)],m4.prototype,"ytPlaylistPanelBehavior",void 0);w([P(yO.YtTaskEmitterBehavior),x("design:type",Object)],m4.prototype,"ytTaskEmitterBehavior",void 0);w([P(n8a.YtReorderableBehavior),x("design:type",Object)],m4.prototype,"ytReorderableBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],m4.prototype,"ytComponentBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],m4.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],m4.prototype,"data",void 0);w([R({computed:"setMenuData_(data)"}),x("design:type",Object)],m4.prototype,"menuRendererData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],m4.prototype,"hideHeaderText",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],m4.prototype,"fixie",void 0); w([R({reflectToAttribute:!0,computed:"computeCollapsible_(hideHeaderText)"}),x("design:type",Boolean)],m4.prototype,"collapsible",void 0);w([R({reflectToAttribute:!0,observer:"collapseChanged_"}),x("design:type",Object)],m4.prototype,"collapsed",void 0);w([R({reflectToAttribute:!0,observer:"hiddenChanged_"}),x("design:type",Boolean)],m4.prototype,"hidden",void 0);w([R({reflectToAttribute:!0,computed:"computeHasPlaylistButtons_(data)"}),x("design:type",Boolean)],m4.prototype,"hasPlaylistButtons",void 0); w([R({reflectToAttribute:!0,computed:"computeHasSeparateSaveButton_(data)"}),x("design:type",Boolean)],m4.prototype,"hasSeparateSaveButton",void 0);w([R({reflectToAttribute:!0,computed:"computeHasToolbarButton_(data, menuRendererData)"}),x("design:type",Boolean)],m4.prototype,"hasToolbar_",void 0);w([R({reflectToAttribute:!0,computed:"computePlaylistType_(data)"}),x("design:type",String)],m4.prototype,"playlistType_",void 0);w([R(),x("design:type",Object)],m4.prototype,"isHovered",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],m4.prototype,"jsPanelHeight_",void 0);w([R({value:56}),x("design:type",Number)],m4.prototype,"scrollMargin",void 0);w([R({computed:"computeCanReorder_(data)"}),x("design:type",Boolean)],m4.prototype,"canReorder_",void 0);w([R(),x("design:type",Object)],m4.prototype,"expandLabel_",void 0);w([R({computed:"computeExpandIcon_(collapsed)"}),x("design:type",String)],m4.prototype,"expandIcon_",void 0); w([S("mouseenter"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m4.prototype,"onMouseEnter_",null);w([S("mouseleave"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m4.prototype,"onMouseLeave_",null);w([S("yt-rendererstamper-finished"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m4.prototype,"onRenderStamperFinished_",null);m4=w([V({is:"ytd-playlist-panel-renderer"})],m4);var Wlb;var Xlb;var n4=function(){return O.apply(this,arguments)||this}; p(n4,O);n4.prototype.configureRendererStamper=function(){return{data:{id:"content",mapping:{playlistPanelVideoRenderer:{component:"ytd-playlist-panel-video-renderer",noInjection:!0}}}}}; g.Object.defineProperties(n4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xlb){var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wlb){var d=document.createElement("template");d.innerHTML="";Wlb=d}d=Wlb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Xlb=a}a=Xlb;return a}}}); var o4=n4;w([P(Z),x("design:type",Object)],o4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],o4.prototype,"data",void 0);o4=w([V({is:"ytd-playlist-panel-supported-items"})],o4);var Ylb;var Zlb;var p4=function(){var a=O.apply(this,arguments)||this;a.largerPlaylistThumbs_=N("kevlar_larger_playlist_thumbnails");a.thumbnailWidth_=N("kevlar_larger_playlist_thumbnails")?128:100;a.watchColorUpdate_=N("kevlar_watch_color_update");return a}; p(p4,O);e=p4.prototype;e.configureRendererStamper=function(){return{"data.menu":{id:"menu",mapping:{menuRenderer:{component:"ytd-menu-renderer",params:{buttonTooltipPosition:"left"}}}}}}; e.computeEditableClass_=function(a){return a&&a.menu?"editable":""}; e.computeSelected_=function(a){return a.selected}; e.canReorderChanged_=function(){this.touchPersistentDragHandle=N("kevlar_watch_drag_handles")&&this.canReorder}; e.onYtServiceRequestSent_=function(a,b){b.endpoint&&this.isHideEnclosingAction_(b.endpoint)&&ESa(lM(),this.data.videoId)}; e.isHideEnclosingAction_=function(a){var b=!!this.get("feedbackEndpoint.uiActions.hideEnclosingContainer",a);a="INDIFFERENT"===this.get("likeEndpoint.status",a);return b||a}; e.onHandleMouseenter_=function(){this.handleIsHovered=!0}; e.onHandleMouseleave_=function(){this.handleIsHovered=!1}; g.Object.defineProperties(p4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Zlb){var a=document.createElement("template");a.innerHTML=" \n
\n
\n \n \n \n [[getSimpleString(data.indexText)]]\n
\n
\n \n \n
\n
\n \n

\n \n \n \n [[getSimpleString(data.title)]]\n \n

\n
\n [[getSimpleString(data.shortBylineText)]]\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ylb){var d=document.createElement("template");d.innerHTML=""; Ylb=d}d=Ylb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Zlb=a}a=Zlb;return a}}}); var q4=p4;q4.prototype.onYtServiceRequestSent_=q4.prototype.onYtServiceRequestSent_;w([P(BQ.YtdMouseDownPrefetchableBehavior),x("design:type",Object)],q4.prototype,"ytdMouseDownPrefetchableBehavior",void 0);w([P(Z),x("design:type",Object)],q4.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],q4.prototype,"ytRendererBehavior",void 0);w([P(AQ.YtdLockupBehavior),x("design:type",Object)],q4.prototype,"ytdLockupBehavior",void 0); w([R(),x("design:type",Object)],q4.prototype,"data",void 0);w([R({computed:"computeSelected_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],q4.prototype,"selected",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],q4.prototype,"largerPlaylistThumbs_",void 0);w([R(),x("design:type",Object)],q4.prototype,"thumbnailWidth_",void 0);w([R({reflectToAttribute:!0,observer:"canReorderChanged_"}),x("design:type",Boolean)],q4.prototype,"canReorder",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],q4.prototype,"touchPersistentDragHandle",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],q4.prototype,"handleIsHovered",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],q4.prototype,"watchColorUpdate_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],q4.prototype,"onYtServiceRequestSent_",null); q4=w([V({is:"ytd-playlist-panel-video-renderer"})],q4);var $lb;var amb;var r4=function(){var a=O.apply(this,arguments)||this;a.storageKey="speedyg";a.activationThreshold=216E5;a.cacheExpiration=2592E3;return a}; p(r4,O);e=r4.prototype;e.activateSpeedygPromo=function(){var a=cK(this.storageKey)||{};a={lastActivation:a.lastActivation,suppressed:a.suppressed};a.lastActivation?Xa()-Number(new Date(a.lastActivation))>this.activationThreshold?this.activate(a.suppressed):this.updateSuppressedCount(a):this.activate(0)}; e.activate=function(){this.$&&(this.updateActivationTime(),this.notification.open())}; e.updateSuppressedCount=function(a){a.suppressed++;this.storeData({lastActivation:a.lastActivation,suppressed:a.suppressed})}; e.updateActivationTime=function(){var a={lastActivation:Xa(),suppressed:0};this.storeData(a)}; e.storeData=function(a){bK(this.storageKey,a,this.cacheExpiration)}; e.closePromo=function(){this.notification.close()}; g.Object.defineProperties(r4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===amb){var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$lb){var d=document.createElement("template");d.innerHTML="";$lb=d}d=$lb; c.call(b,d.content.cloneNode(!0),a.content.firstChild);amb=a}a=amb;return a}}}); var s4=r4;w([R(),x("design:type",Object)],s4.prototype,"data",void 0);w([R(),x("design:type",Object)],s4.prototype,"storageKey",void 0);w([R(),x("design:type",Object)],s4.prototype,"activationThreshold",void 0);w([R(),x("design:type",Object)],s4.prototype,"cacheExpiration",void 0);w([CE("#notification"),x("design:type",Object)],s4.prototype,"notification",void 0);s4=w([V({is:"ytd-video-quality-promo-renderer"})],s4);var bmb;var cmb;Polymer({is:"yt-notification-action-renderer",_template:function(){if(void 0!==cmb)return cmb;var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n \n
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bmb){var d=document.createElement("template");d.innerHTML=""; bmb=d}d=bmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return cmb=a}, behaviors:[X.YtRendererBehavior,OP.YtEventForwardingBehavior],properties:{data:Object,duration:Number,useCloseButton:{type:Boolean,value:!1}},open:function(){this.$.toast.open()}, close:function(){this.$.toast.close()}, tapClose:function(){this.useCloseButton||this.$.toast.close()}, setVerticalOffset:function(a){this.$.toast.verticalOffset=a;this.$.toast.fit()}, computeButtonClass_:function(a){return a?"toast-button":""}, computeText_:function(a){return nL(a)}});var dmb;var emb;var fmb;var gmb;Polymer({is:"yt-player-error-message-renderer",_template:function(){if(void 0!==gmb)return gmb;var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.reason)]]
\n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fmb){var d=document.createElement("template");d.innerHTML=""; fmb=d}d=fmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return gmb=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"},hasIcon_:{type:Boolean,reflectToAttribute:!0,computed:"computeHasIcon_(icon_)"},signInIcon_:{type:Boolean,reflectToAttribute:!0,computed:"isSignInIcon_(icon_)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeHasIcon_:function(a){return!!a}, isSignInIcon_:function(a){return"yt-icons:prompted_sign_in"==a}});var hmb;var imb;Polymer({is:"yt-player-kav-renderer",_template:function(){if(void 0!==imb)return imb;var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.reason)]]
\n
[[getSimpleString(data.subreason)]]
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hmb){var d=document.createElement("template");d.innerHTML=""; hmb=d}d=hmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return imb=a}, behaviors:[Z,X.YtRendererBehavior],properties:{data:Object,icon_:{type:String,computed:"computeIcon_(data.icon)"}},stampDom:{"data.proceedButton":{id:"button",mapping:{buttonRenderer:"yt-button-renderer"}}},computeIcon_:function(a){return a?"yt-icons:"+a.iconType.toLowerCase():"error_outline"}});Polymer({is:"yt-playability-error-supported-renderers",_template:function(){if(void 0!==emb)return emb;var a=document.createElement("template");a.innerHTML="
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dmb){var d=document.createElement("template");d.innerHTML=""; dmb=d}d=dmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return emb=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object,status:String},stampDom:{data:{id:"container",mapping:{playerErrorMessageRenderer:"yt-player-error-message-renderer",playerKavRenderer:"yt-player-kav-renderer"}}}});var jmb;var kmb;var t4=function(){return O.apply(this,arguments)||this}; p(t4,O);t4.prototype.ready=function(){var a=this.onColumnScroll_.bind(this);this.$.primary.addEventListener("scroll",a);this.$.secondary.addEventListener("scroll",a)}; t4.prototype.onColumnScroll_=function(){this.ytdWatchBehavior.markDirty()}; g.Object.defineProperties(t4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kmb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n\n\n\n
\n\n
\n\n
\n\n\n\n\n\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jmb){var d=document.createElement("template");d.innerHTML=""; jmb=d}d=jmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kmb=a}a=kmb;return a}}}); var u4=t4;w([P(F2a.YtdWatchBehavior),x("design:type",Object)],u4.prototype,"ytdWatchBehavior",void 0);w([R({reflectToAttribute:!0,value:function(){return!N("kevlar_watch_snap_sizing")}}), x("design:type",Object)],u4.prototype,"flexy_",void 0);w([R({reflectToAttribute:!0,value:function(){return N("kevlar_watch_snap_sizing")}}), x("design:type",Object)],u4.prototype,"snap_",void 0);u4=w([V({is:"ytd-watch-flexy"})],u4);Polymer({is:"yt-player-manager",provides:JM,behaviors:[a9a,f9a],factoryImpl:function(){}, ready:function(){Ha("yt.abuse.player.botguardInitialized",ZKa,void 0);Ha("yt.abuse.player.invokeBotguard",$Ka,void 0);Ha("yt.abuse.dclkstatus.checkDclkStatus",XKa,void 0);Ha("yt.player.exports.navigate",eVa,void 0);Ha("yt.util.activity.init",Mk,void 0);Ha("yt.util.activity.getTimeSinceActive",Pk,void 0);Ha("yt.util.activity.setTimestamp",Nk,void 0)}});var lmb=On(115990),mmb=On(115991),nmb=On(115992),omb=function(a,b,c,d){var f=this,h=d.dismissAction,l=d.expandAction,m=d.playlistResizeAction;this.layer=3;this.miniplayerVideoConfig={startPosition:385,draggingClass:"gesture-dragging",startAction:function(){f.startAction()}, resetAction:function(){f.resetAction()}, triggers:{down:{fade:!0,endOpacity:.3,endPosition:485,threshold:50,triggerAction:function(){f.dismissAction()}, moveAction:function(r){f.moveAction(r)}}, up:{endPosition:285,threshold:50,triggerAction:function(){f.expandAction()}}}}; this.miniplayerPlaylistConfig={startPosition:385,draggingClass:"gesture-dragging",startAction:function(){f.startAction()}, resetAction:function(){f.resetAction()}, triggers:{down:{endPosition:485,endOpacity:.3,threshold:50,fade:!0,triggerAction:function(){f.dismissAction()}, moveAction:function(r){f.moveAction(r)}}, up:{endPosition:100,threshold:50,triggerAction:function(){f.gesture.config=f.miniplayerPlaylistExpandedConfig;f.playlistResizeAction()}}}}; this.miniplayerPlaylistExpandedConfig={startPosition:100,draggingClass:"gesture-dragging",triggers:{down:{endPosition:385,threshold:50,triggerAction:function(){f.gesture.config=f.miniplayerPlaylistConfig;f.playlistResizeAction()}}, up:{endPosition:0,threshold:50,triggerAction:function(){f.expandAction()}}}}; if(N("kevlar_touch_gesture_ves")){var n=zL();EL(n,lmb,this.layer);EL(n,mmb,this.layer);EL(n,nmb,this.layer);this.dismissAction=function(){h();FL(n,{visualElement:lmb})}; this.expandAction=function(){l();FL(n,{visualElement:mmb})}; this.playlistResizeAction=function(){m();FL(n,{visualElement:nmb})}}else this.dismissAction=h,this.expandAction=l,this.playlistResizeAction=m; this.gesture=new DN(a,b,this.getConfig(c,!1));this.gesture.attach()}; e=omb.prototype;e.setPlayer=function(a){this.player=a}; e.detach=function(){this.gesture.detach()}; e.update=function(a,b){a=this.getConfig(a,b);this.gesture.config=a}; e.getConfig=function(a,b){return a?b?this.miniplayerPlaylistExpandedConfig:this.miniplayerPlaylistConfig:this.miniplayerVideoConfig}; e.startAction=function(){this.player&&(this.volume=this.player.getVolume())}; e.resetAction=function(){this.player&&this.volume&&this.player.setVolume(this.volume)}; e.moveAction=function(a){this.player&&this.volume&&this.player.setVolume(this.volume*(-.9*a+1))};var pmb;var qmb;var v4=function(){var a=O.apply(this,arguments)||this;a.active=!1;a.hasNoData=!1;a.enabled=!1;a.expanded=!1;a.disabledState=!1;a.externalPlaylistData_={};a.hasPlaylistData=!1;a.animateMiniplayer=N("desktop_animate_miniplayer");a.closed=!1;a.expandedClosed=!1;a.watchResponse_=null;a.player_=null;a.expandVe_=null;a.closeVe_=null;a.disabledInitialStateIsPlaying_=!1;a.PLAYER_EVENTS_=new Map;a.miniplayerFetchRequest_=null;a.playerElement_=null;a.gestures_=null;a.screenLayer=3;a.actionMap={"yt-activate-miniplayer-action":"activate_", "yt-cache-miniplayer-page-action":"onCacheMiniplayerPageAction_","yt-shortcut-close-miniplayer":"onShortcutCloseMiniplayer_","yt-close-miniplayer-action":"onCloseMiniplayer_","yt-collapse-miniplayer-action":"onYtCollapseMiniplayerAction_","yt-deactivate-miniplayer-action":"deactivate_","yt-expand-watch-page-action":"handleExpandWatchPageAction_","yt-get-miniplayer-component-action":"getMiniplayerComponent_","yt-miniplayer-active":"isMiniplayerActive_","yt-miniplayer-load-endpoint":"loadEndpoint_", "yt-sync-with-remote-video":"syncWithRemoteVideo_","yt-miniplayer-toast-action":"handleMiniplayerToastAction_","yt-miniplayer-update-header-action":"updateHeader_","yt-show-miniplayer-command":"showMiniplayerCommand_"};return a}; p(v4,O);e=v4.prototype;e.created=function(){this.PLAYER_EVENTS_.set("onPlayVideo",this.onPlayerPlayVideo_);this.PLAYER_EVENTS_.set("onCloseMiniplayer",this.onPlayerCloseMiniplayer_);this.PLAYER_EVENTS_.set("onExpandMiniplayer",this.handleExpandWatchPageAction_);this.PLAYER_EVENTS_.set("onStateChange",this.onPlayerStateChange)}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.animateMiniplayer&&(this.gestures_=new omb(this,this.querySelector("#video-container"),this.hasPlaylistData,{dismissAction:function(){return a.onCloseMiniplayer_()}, expandAction:function(){return a.onMetadataTap_()}, playlistResizeAction:function(){return a.playlistExpand_()}}))}; e.detached=function(){this.unlisten(this,"transitionend","resizePlaylist_");this.gestures_&&(this.gestures_.detach(),this.gestures_=null)}; e.hasPlaylistDataChanged_=function(){this.gestures_&&this.gestures_.update(this.hasPlaylistData,this.expanded)}; e.activeChanged_=function(a){void 0!==a&&this.ytActionSenderBehavior.sendAction("yt-miniplayer-active-changed-action",[a])}; e.onCacheMiniplayerPageAction_=function(a){this.backgroundPageData_=a}; e.onYtCollapseMiniplayerAction_=function(){this.backgroundPageData_?this.fire("yt-navigate-cache",{url:this.backgroundPageData_.url,endpoint:this.backgroundPageData_.endpoint,data:this.backgroundPageData_}):this.ytActionSenderBehavior.sendAction("yt-navigate-home-action")}; e.activate_=function(a,b,c){return Za(this,function f(){var h=this,l,m,n;return za(f,function(r){if(1==r.nextAddress){h.gestures_&&h.gestures_.update(h.hasPlaylistData,h.expanded);if(cRa())return r.return();c&&(h.hasNoData=!1);h.enabled||(h.enabled=!0);h.active=!0;h.expanded=!1;h.data=b;h.closed=!1;h.closedByPan_=!1;h.pannedClosed=!1;h.expandedClosed=!1;h.expandToWatch=!1;h.watchResponse_=c;h.playerElement_=a;a.preparePlayer(a);JL.getInstance().miniplayerButtonActivation=!1;JL.getInstance().userActivation= !1;JL.getInstance().playlistWatchPageActivation=!1;JL.getInstance().lockupActivation=!1;JL.getInstance().showMiniplayerCommandActivation=!1;h.logMiniplayer_();m=l=h.ytComponentBehavior.getInterface(cN);l.setPlaylistComponent(h.$.playlist);h.listen(m,"yt-navigate","onPlaylistYtNavigate_");h.listen(m,"yt-playlist-data-updated","onYtPlaylistDataUpdated_");h.onYtPlaylistDataUpdated_();a.appendTo(h.$["player-container"]);return q(r,a.getPlayerPromise(),2)}n=r.yieldResult;n.setMinimized(!0);n.setSizeStyle(!1, !0);h.ytPlayerListenerBehavior.listenToPlayerEvents(n,h.PLAYER_EVENTS_);h.player_=n;h.gestures_&&h.gestures_.setPlayer(n);JL.getInstance().playerContainer=h.$["player-container"];h.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");h.handleMiniplayerPlaybackState_();ra(r)})})}; e.deactivate_=function(){return Za(this,function b(){var c=this,d,f,h,l,m;return za(b,function(n){if(1==n.nextAddress){if(!c.active)return n.return();c.expandToWatch||(c.expanded?c.expandedClosed=!0:c.closed=!0);d=c.getPlayerElement();return q(n,d.getPlayerPromise(),2)}if(3!=n.nextAddress)return f=n.yieldResult,f.setMinimized(!1),l=h=c.ytComponentBehavior.getInterface(cN),c.unlisten(l,"yt-navigate","onPlaylistYtNavigate_"),c.unlisten(l,"yt-playlist-data-updated","onYtPlaylistDataUpdated_"),m=c.ytComponentBehavior.getInterface(IM), q(n,m.movePlayerToWatch(d),3);c.active=!1;c.data=void 0;c.watchResponse_=null;c.player_&&c.ytPlayerListenerBehavior.unlistenFromPlayerEvents(c.player_,c.PLAYER_EVENTS_);JL.getInstance().currentEndpoint=null;c.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");c.playerElement_=null;JL.getInstance().playerContainer=null;c.disabledState=!1;ra(n)})})}; e.getPlayerElement=function(){return this.playerElement_?this.playerElement_:this.$["player-container"].firstElementChild}; e.handleExpandWatchPageAction_=function(){this.onMetadataTap_()}; e.onMetadataTap_=function(){this.watchResponse_&&this.data&&this.data.watchEndpoint?(this.expandVe_&&BJ(Tn(this.screenLayer),this.expandVe_),this.fire("yt-navigate-cache",{url:this.watchResponse_.url,endpoint:this.data.watchEndpoint,data:this.watchResponse_,miniplayer:!0})):this.data&&this.data.watchEndpoint&&this.fire("yt-navigate",{endpoint:this.data.watchEndpoint});this.expandToWatch=!0}; e.onMetadataKeydown_=function(a){if(13==a.keyCode||32==a.keyCode)this.onMetadataTap_()}; e.onDisabledTap_=function(a){a.target==this.$["blocking-container"]&&(this.disabledInitialStateIsPlaying_&&this.player_.playVideo(),this.onMetadataTap_(),this.disabledState=!1)}; e.onPlaylistExpandTap_=function(a){if(this.hasPlaylistData){a=Polymer.dom(a).path||[];a=k(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;if(b==this)break;if(b.classList&&b.classList.contains("miniplayer-title"))return}this.playlistExpand_();this.gestures_&&this.gestures_.update(this.hasPlaylistData,this.expanded)}}; e.playlistExpand_=function(){this.expanded||(this.listen(this,"transitionend","resizePlaylist_"),this.ytRendererBehavior.markDirty());this.expanded=!this.expanded}; e.resizePlaylist_=function(){var a=this.$.playlist.querySelector("iron-list");a&&a.notifyResize();this.unlisten(this,"transitionend","resizePlaylist_")}; e.getExpandIcon_=function(a){return a?"miniplayer:keyboard-arrow-down":"miniplayer:keyboard-arrow-up"}; e.syncWithRemoteVideo_=function(a,b){return Za(this,function d(){var f=this,h,l,m,n,r;return za(d,function(v){if(1==v.nextAddress){h=f.ytComponentBehavior.getInterface(IM);if(!f.active&&h.isOnWatch())return v.return();l={videoId:a};b&&(l.playlistId=b);m={watchEndpoint:l};n=f.ytComponentBehavior.getInterface(FM);f.cancelActiveRequest_();f.miniplayerFetchRequest_=n.requestDataForEndpoint(m,{},void 0,{},!0);ta(v,2);return q(v,f.miniplayerFetchRequest_,4)}if(2!=v.nextAddress)return r=v.yieldResult,f.handleWatchDataResponse_(r), ua(v,0);va(v);ra(v)})})}; e.handleWatchDataResponse_=function(a){return Za(this,function c(){var d=this,f,h,l,m,n,r,v,z,C;return za(c,function(J){switch(J.nextAddress){case 1:if(!a)return J.return();d.hasNoData=!1;a.playerResponse&&!a.player&&d.canWrapPlayerResponseWithSwfConfig_()&&(a.player=NM(a.playerResponse));d.watchResponse_=a;d.logMiniplayer_();if(d.active)return l=d.getPlayerElement(),q(J,l.getPlayerPromise(),6);f=d.ytComponentBehavior.getInterface(IM);f.activateMiniplayer(a);h=d.getPlayerElement();if(!h){d.deactivate_(); vd(Error("getPlayerElement missing"));J.jumpTo(3);break}h.update(a.player);a.response&&(h.watchNextResponse=a.response);return q(J,h.getPlayerPromise(),5);case 5:d.player_=J.yieldResult;J.jumpTo(3);break;case 6:a.response&&(l.watchNextData=a.response),m=y.getValueByKeys.apply(y,[a].concat(ha(ORa))),(n=y.getValueByKeys.apply(y,[a].concat(ha(SRa))))&&m&&(r=d.ytComponentBehavior.getInterface(cN),r.setAutoplayRenderer(m)),m&&(z=(v=!eJ.getInstance().getFlag(140))?2:1,d.player_.setAutonavState(z)),C=KQ(a.response), d.set("data",C);case 3:d.handleMiniplayerPlaybackState_(),ra(J);}})})}; e.onPlayerPlayVideo_=function(a){return Za(this,function c(){var d,f,h,l=this;return za(c,function(m){d=a.sessionData&&"playnext"in a.sessionData;a.sessionData&&a.sessionData.itct&&(f=a.sessionData.itct);N("kevlar_player_watch_endpoint_navigation")&&a.watchEndpoint&&d?(h=fTa(a.watchEndpoint,f),N("kevlar_watch_navigation_clear_autoplay_count_session_data")&&a.sessionData&&delete a.sessionData.playnext):h=QL(a.videoId,a.listId,f);N("kevlar_watch_local_autoplay_count")&&d&&(a.sessionData.playnext=VM().count); a.sessionData&&cJ(h.commandMetadata.webCommandMetadata.url,a.sessionData);l.loadEndpoint_(h,!1,d);ra(m)})})}; e.loadEndpoint_=function(a,b,c){return Za(this,function f(){var h=this,l,m,n,r,v,z,C,J,E,T;return za(f,function(la){switch(la.nextAddress){case 1:return l=h,JL.getInstance().currentEndpoint=a,h.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed"),m=h.ytComponentBehavior.getInterface(FM),n=h.ytComponentBehavior.getInterface(IM),r={clientParams:{miniplayer:!0,autoSaveToQueue:!b}},v=new uM(h.getPlayerElement.bind(h),n,r,{layer:3,parentLayer:0}),z=!1,C=function(qa){qa.playlistData||( l.expanded=!1);qa.player?z=!0:!z&&qa.playerResponse&&l.canWrapPlayerResponseWithSwfConfig_()&&(qa.player=NM(qa.playerResponse));if(qa.player&&b){var Ea=eTa(qa.player);if(Ea){var yb=l.get("playerConfig.playbackStartConfig",Ea)||{};yb.startPaused=!0;l.set("playerConfig.playbackStartConfig",yb,Ea);l.set("player.args.raw_player_response",Ea,qa);l.set("player.args.player_response",void 0,qa)}}v.processChunk({endpoint:a,data:qa})},J=!1,N("kevlar_op_warm_pages")&&(J=$M(ZM.instance,a)),h.cancelActiveRequest_(), J?(E=ZM.instance,h.miniplayerFetchRequest_=aN(E,a,{},window.location.href,"watch",function(qa,Ea){C(Ea)},function(qa){return l.isNetworkPromiseStale_(qa)})):h.miniplayerFetchRequest_=m.requestDataForEndpoint(a,{pbj:"miniplayer"},C,{},!0),ta(la,2),q(la,h.miniplayerFetchRequest_,4); case 4:return T=la.yieldResult,q(la,h.handleWatchDataResponse_(T,b),5);case 5:c?VM().count++:VM().count=1;ua(la,0);break;case 2:va(la),ra(la);}})})}; e.onCloseMiniplayer_=function(){this.getPlayerElement()&&this.getPlayerElement().stop();this.closeVe_&&BJ(Tn(this.screenLayer),this.closeVe_);this.hasNoData=!0;this.cancelActiveRequest_();this.ytActionSenderBehavior.sendAction("yt-deactivate-miniplayer-action")}; e.triggerCloseMiniplayer_=function(){lM().closeMiniplayer(this)}; e.onPlayerCloseMiniplayer_=function(){this.triggerCloseMiniplayer_()}; e.onPlayerStateChange=function(){var a=this.player_.getPlayerState();this.ytActionSenderBehavior.sendAction("yt-miniplayer-play-state-changed",[1===a])}; e.onShortcutCloseMiniplayer_=function(){this.triggerCloseMiniplayer_()}; e.isMiniplayerActive_=function(){return this.active}; e.getMiniplayerComponent_=function(){return this}; e.getScreenLayer=function(){return this.screenLayer}; e.logMiniplayer_=function(){if(this.watchResponse_){var a=this.get("playerResponse.trackingParams",this.watchResponse_),b=Tn(this.screenLayer),c=Sn(this.screenLayer);a&&b&&c&&(a=Nn(a),yJ(b,c,a),this.expandVe_=On(35989),this.closeVe_=On(34699),vJ(N("use_default_events_client")?void 0:Rm,b,a,[this.expandVe_,this.closeVe_]),AJ(b,[this.expandVe_,this.closeVe_]))}}; e.onPlaylistYtNavigate_=function(a,b){return Za(this,function d(){var f=this,h,l,m,n,r,v,z,C,J,E,T,la;return za(d,function(qa){if(1==qa.nextAddress){h=f;if(!b.endpoint.watchEndpoint)return qa.return();JL.getInstance().currentEndpoint=b.endpoint;f.ytActionSenderBehavior.sendOptionalAction("yt-miniplayer-endpoint-changed");a.stopPropagation();l=f.get("endpoint.commandMetadata.webCommandMetadata.url",b);m=!1;l&&b.tempData&&!y.isEmpty(b.tempData)&&(b.tempData&&b.tempData.playnext&&(m=!0),cJ(l,b.tempData)); n=f.ytComponentBehavior.getInterface(FM);r=f.ytComponentBehavior.getInterface(IM);v={clientParams:{miniplayer:!0,autoSaveToQueue:!1}};z=new uM(f.getPlayerElement.bind(f),r,v,{layer:3});C=!1;J=function(Ea){Ea.player?C=!0:!C&&Ea.playerResponse&&h.canWrapPlayerResponseWithSwfConfig_()&&(Ea.player=NM(Ea.playerResponse));z.processChunk({endpoint:b.endpoint,data:Ea})}; E=!1;N("kevlar_op_warm_pages")&&(E=$M(ZM.instance,b.endpoint));f.cancelActiveRequest_();E?(T=ZM.instance,f.miniplayerFetchRequest_=aN(T,b.endpoint,{},window.location.href,"watch",function(Ea,yb){J(yb)},function(Ea){return h.isNetworkPromiseStale_(Ea)})):f.miniplayerFetchRequest_=n.requestDataForEndpoint(b.endpoint,{pbj:"miniplayer"},J,{},!0); ta(qa,2);return q(qa,f.miniplayerFetchRequest_,4)}if(2!=qa.nextAddress)return la=qa.yieldResult,f.handleWatchDataResponse_(la),m?VM().count++:VM().count=1,ua(qa,0);va(qa);ra(qa)})})}; e.cancelActiveRequest_=function(){this.miniplayerFetchRequest_&&(this.miniplayerFetchRequest_.cancel&&this.miniplayerFetchRequest_.cancel("Active request obsolete"),this.miniplayerFetchRequest_=null)}; e.isNetworkPromiseStale_=function(a){return a!=this.miniplayerFetchRequest_}; e.handleMiniplayerPlaybackState_=function(){var a=this.get("playerResponse.playabilityStatus.miniplayer.miniplayerRenderer",this.watchResponse_);a&&"PLAYBACK_MODE_PAUSED_ONLY"==a.playbackMode&&(this.disabledState=!0,a.minimizedEndpoint&&this.ytActionSenderBehavior.sendServiceRequestAction([a.minimizedEndpoint]),this.player_&&(a=this.player_.getPlayerState(),(this.disabledInitialStateIsPlaying_=-1===a||1===a||3===a)&&this.player_.pauseVideo()))}; e.computePlaylistData_=function(a,b){b&&b.contents?(a=lSa(b),this.updateHeader_(a?a.title:void 0,b.isCourse?b.titleText:kSa(nL(b.titleText),b.currentIndex,b.totalVideos),void 0)):this.watchResponse_&&(a=KQ(this.watchResponse_.response,!0),this.updateHeader_(a.miniplayerTitle,a.miniplayerSubtitle,a.watchEndpoint));return b}; e.computeHasPlaylistData_=function(){return!!this.playlistData&&!!this.playlistData.contents}; e.onYtPlaylistDataUpdated_=function(){this.externalPlaylistData_=this.ytComponentBehavior.getInterface(cN).getPlaylistData()||{}}; e.handleMiniplayerToastAction_=function(a,b){this.$.toast.open(a,b)}; e.updateHeader_=function(a,b,c){this.data||(this.data={miniplayerTitle:{simpleText:""},miniplayerSubtitle:{simpleText:""},playlistData:null});a&&this.set("data.miniplayerTitle",a);b&&this.set("data.miniplayerSubtitle",b);c&&this.set("data.watchEndpoint",c)}; e.computeExpandButtonHidden_=function(a,b){return!a||!b}; e.computeExpandButtonLabel_=function(a){return a?YK("MINIPLAYER_COLLAPSE_LABEL"):YK("MINIPLAYER_EXPAND_LABEL")}; e.computeDisabledStateCloseButtonLabel_=function(){return YK("MINIPLAYER_CLOSE",void 0,"Close")}; e.canWrapPlayerResponseWithSwfConfig_=function(){return!N("kevlar_player_response_swfconfig_wrapper_miniplayer_killswitch")&&!y.isEmpty(A("WEB_PLAYER_CONTEXT_CONFIGS",{}))}; e.showMiniplayerCommand_=function(a){var b,c,d;return Za(this,function h(){var l=this,m,n;return za(h,function(r){if(1==r.nextAddress){if(null===(c=null===(b=null===a||void 0===a?void 0:a.showMiniplayerCommand)||void 0===b?void 0:b.miniplayerCommand)||void 0===c||!c.watchEndpoint||l.active)return r.return();m=l.ytComponentBehavior.getInterface(IM);n=null!==(d=l.getPlayerElement())&&void 0!==d?d:m.getPlayerFromWatch();JL.getInstance().showMiniplayerCommandActivation=!0;return q(r,l.activate_(n),2)}if(3!= r.nextAddress)return q(r,l.loadEndpoint_(a.showMiniplayerCommand.miniplayerCommand,!0),3);l.set("data.miniplayerSubtitle",{simpleText:YK("CONTINUE_WATCHING",void 0,"Continue watching")});ra(r)})})}; g.Object.defineProperties(v4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qmb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pmb){var d=document.createElement("template");d.innerHTML=""; pmb=d}d=pmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qmb=a}a=qmb;return a}}}); var w4=v4;w([P(TP),x("design:type",d1a)],w4.prototype,"ytPlayerListenerBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],w4.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],w4.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],w4.prototype,"ytComponentBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],w4.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],w4.prototype,"data",void 0);w([R({reflectToAttribute:!0,observer:"activeChanged_"}),x("design:type",Object)],w4.prototype,"active",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"hasNoData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"enabled",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"expanded",void 0);w([R(),x("design:type",Object)],w4.prototype,"disabledState",void 0); w([R(),x("design:type",Object)],w4.prototype,"externalPlaylistData_",void 0);w([R({computed:"computePlaylistData_(data.playlistData, externalPlaylistData_)"}),x("design:type",Object)],w4.prototype,"playlistData",void 0);w([R({reflectToAttribute:!0,computed:"computeHasPlaylistData_(playlistData)",observer:"hasPlaylistDataChanged_"}),x("design:type",Object)],w4.prototype,"hasPlaylistData",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"animateMiniplayer",void 0); w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"closed",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],w4.prototype,"expandedClosed",void 0);w4=w([V({is:"ytd-miniplayer"})],w4);var rmb;var smb;var x4=function(){var a=O.apply(this,arguments)||this;a.duration=2500;return a}; p(x4,O);e=x4.prototype;e.configureRendererStamper=function(){return{button:{id:"button",mapping:{buttonRenderer:{component:"ytd-button-renderer",noInjection:!0}}}}}; e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability()}; e.ready=function(){N("kevlar_frontend_video_list_undo")&&this.addEventListener("yt-service-request-sent",this.onServiceRequestSent.bind(this))}; e.open=function(a,b){this.data=a;this.label=b;this.opened=!0;this.closed=!1;this.fire("iron-announce",{text:this.label+" "+this.componentBehavior.getSimpleString(a.title)});this.async(this.close,this.duration)}; e.close=function(){this.closed=!0}; e.onServiceRequestSent=function(a){if(a=a.detail.actions)for(var b=0;b\n
\n
[[label]]
\n
[[getSimpleString(data.title)]]
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rmb){var d=document.createElement("template");d.innerHTML=""; rmb=d}d=rmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);smb=a}a=smb;return a}}}); var y4=x4;w([P(kO.YtComponentBehavior),x("design:type",Object)],y4.prototype,"componentBehavior",void 0);w([P(Z),x("design:type",Object)],y4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],y4.prototype,"data",void 0);w([R(),x("design:type",String)],y4.prototype,"label",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],y4.prototype,"opened",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],y4.prototype,"closed",void 0); w([R(),x("design:type",Object)],y4.prototype,"duration",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],y4.prototype,"button",null);y4=w([V({is:"ytd-miniplayer-toast"})],y4);var tmb;var umb;var vmb;var wmb={};wmb.YtConditionalRendererBehavior=[X.YtRendererBehavior,{_noAccessors:!0,properties:{hidden:{type:Boolean,reflectToAttribute:!0}},observers:["updateHidden_(data, isAttached)"],updateHidden_:function(a,b){this.hidden=!this.shouldShow_(a,b)}, shouldShow_:function(a,b){return b?a&&a.supportedDatas&&a.supportedDatas.rendererVisibilityConditionData&&a.supportedDatas.rendererVisibilityConditionData.showIf?this.isVisibilityConditionSatisfied_(a.supportedDatas.rendererVisibilityConditionData.showIf):a&&a.visibilityCondition&&a.visibilityCondition.showIf?this.isVisibilityConditionSatisfied_(a.visibilityCondition.showIf):a&&a.visibilityConditionType?this.isLegacyVisibilityConditionSatisfied_(a.visibilityConditionType):!0:!1}, isVisibilityConditionSatisfied_:function(a){switch(a){case"VISIBILITY_CONDITION_TYPE_MDX_CONNECTED":return this.isMdxConnected_();case"VISIBILITY_CONDITION_TYPE_MDX_DISCONNECTED":return!this.isMdxConnected_();default:return!1;}}, isLegacyVisibilityConditionSatisfied_:function(a){switch(a){case"MDX_CONNECTED":return this.isMdxConnected_();default:return!1;}}, isMdxConnected_:function(){var a=this.sendAction("yt-get-mdx-status");return 1==a.length&&a[0].connected}}];var z4=function(){return O.apply(this,arguments)||this}; p(z4,O);e=z4.prototype;e.ready=function(){this.listen(this,"tap","onEndpointTapExtra")}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuitem")}; e.onFocus=function(){this.$$("paper-item").focus()}; e.onEndpointTapExtra=function(a){this.fire("iron-activate");var b=this.data.navigationEndpoint;b&&b.userFeedbackEndpoint&&(a.stopPropagation(),this.ytActionSenderBehavior.sendInnerTubeActions([b],this))}; e.computeIcon=function(a){return a&&a.iconType?jO(a.iconType):""}; e.computeHasSeparator=function(){return!(!this.data||!this.data.hasSeparator)}; e.computeIconHidden=function(){return this.useIcons?!1:!this.icon}; e.forceUpdateStylesOnLegacyBrowsers=function(){N("kevlar_legacy_browsers")&&this.updateStyles()}; g.Object.defineProperties(z4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vmb){var a=document.createElement("template");a.innerHTML="\n"; var b=a.content,c=b.insertBefore;if(void 0===umb){var d=document.createElement("template");d.innerHTML="";umb=d}d=umb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); a.content.insertBefore(HJa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);b=a.content;c=b.insertBefore;void 0===tmb&&(d=document.createElement("template"),d.innerHTML="", tmb=d);d=tmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vmb=a}a=vmb;return a}}}); var A4=z4;A4.prototype.forceUpdateStylesOnLegacyBrowsers=A4.prototype.forceUpdateStylesOnLegacyBrowsers;A4.prototype.onFocus=A4.prototype.onFocus;w([P(W.YtActionSenderBehavior),x("design:type",Object)],A4.prototype,"ytActionSenderBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],A4.prototype,"ytdOpenPopupBehavior",void 0);w([P(wmb.YtConditionalRendererBehavior),x("design:type",Object)],A4.prototype,"ytConditionalRendererBehavior",void 0); w([P(OO.YtEndpointBehavior),x("design:type",Object)],A4.prototype,"ytEndpointBehavior",void 0);w([R(),x("design:type",Object)],A4.prototype,"data",void 0);w([R({computed:"computeIcon(data.icon)",value:""}),x("design:type",String)],A4.prototype,"icon",void 0);w([R({reflectToAttribute:!0,value:!1}),x("design:type",Boolean)],A4.prototype,"useIcons",void 0);w([R({computed:"computeHasSeparator(data.hasSeparator)",reflectToAttribute:!0}),x("design:type",Boolean)],A4.prototype,"hasSeparator",void 0); w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A4.prototype,"onFocus",null);w([U("useIcons","hasSeparator"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A4.prototype,"forceUpdateStylesOnLegacyBrowsers",null);A4=w([V({is:"ytd-menu-navigation-item-renderer"})],A4);var xmb;var ymb;var zmb=kL(YK("DOWNLOAD",{},"Download")),Amb=kL(YK("DELETE_FROM_DOWNLOADS",{},"Delete from downloads")),Bmb=kL(YK("RETRY",{},"Retry")),B4=function(){var a=O.apply(this,arguments)||this;a.text=zmb;a.iconType="OFFLINE_DOWNLOAD";a.downloadStatus=0;return a}; p(B4,O);B4.prototype.onTap=function(){this.ytActionSenderBehavior.sendOptionalAction("yt-menu-service-item-selected-action",[this.data]);var a=this.data.serviceEndpoint;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; B4.prototype.onDownloadStatusChange=function(a){switch(a){case 0:this.text=zmb;this.iconType="OFFLINE_DOWNLOAD";break;case 4:this.text=Bmb;this.iconType="OFFLINE_DOWNLOAD";break;case 1:this.text=Amb;this.iconType="DELETE";break;case 2:this.text=Amb;this.iconType="DELETE";break;case 3:this.text=Amb;this.iconType="DELETE";break;default:this.text=zmb,this.iconType="OFFLINE_DOWNLOAD";}}; g.Object.defineProperties(B4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ymb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xmb){var d=document.createElement("template");d.innerHTML=""; xmb=d}d=xmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ymb=a}a=ymb;return a}}}); var C4=B4;C4.prototype.onDownloadStatusChange=C4.prototype.onDownloadStatusChange;C4.prototype.onTap=C4.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],C4.prototype,"ytRendererBehavior",void 0);w([P(CQ),x("design:type",Object)],C4.prototype,"ytdReduxBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],C4.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],C4.prototype,"data",void 0); w([R(),x("design:type",Object)],C4.prototype,"text",void 0);w([R(),x("design:type",String)],C4.prototype,"iconType",void 0);w([R({selector:fQ,selectorArgs:["data.serviceEndpoint.offlineVideoEndpoint.videoId"]}),x("design:type",Number)],C4.prototype,"downloadStatus",void 0);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C4.prototype,"onTap",null); w([U("downloadStatus"),x("design:type",Function),x("design:paramtypes",[Number]),x("design:returntype",void 0)],C4.prototype,"onDownloadStatusChange",null);C4=w([V({is:"ytd-menu-service-item-download-renderer"})],C4);var Cmb;var Dmb;var D4=function(){var a=O.apply(this,arguments)||this;a.useIcons=!1;return a}; p(D4,O);e=D4.prototype;e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","menuitem")}; e.onFocus_=function(){this.$$("paper-item").focus()}; e.onTap_=function(){this.ytActionSenderBehavior.sendOptionalAction("yt-menu-service-item-selected-action",[this.data]);var a=this.data.serviceEndpoint,b=this.data.command;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a]);b&&this.ytActionSenderBehavior.sendInnerTubeActions([b],this)}; e.computeIcon_=function(a){return a&&a.iconType?jO(a.iconType):""}; e.computeIconHidden_=function(){return this.useIcons?!1:!this.icon_}; e.computeHasSeparator_=function(){var a;return!(null===(a=this.data)||void 0===a||!a.hasSeparator)}; e.forceUpdateStylesOnLegacyBrowsers_=function(){N("kevlar_legacy_browsers")&&this.updateStyles()}; e.computeIsSelected_=function(){var a;return!(null===(a=this.data)||void 0===a||!a.isSelected)}; g.Object.defineProperties(D4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dmb){var a=document.createElement("template");a.innerHTML="\n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cmb){var d=document.createElement("template");d.innerHTML=""; Cmb=d}d=Cmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dmb=a}a=Dmb;return a}}}); var E4=D4;E4.prototype.forceUpdateStylesOnLegacyBrowsers_=E4.prototype.forceUpdateStylesOnLegacyBrowsers_;E4.prototype.onTap_=E4.prototype.onTap_;E4.prototype.onFocus_=E4.prototype.onFocus_;w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],E4.prototype,"ytdOpenPopupBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],E4.prototype,"ytActionSenderBehavior",void 0); w([P(wmb.YtConditionalRendererBehavior),x("design:type",Object)],E4.prototype,"ytConditionalRendererBehavior",void 0);w([R(),x("design:type",Object)],E4.prototype,"data",void 0);w([R({computed:"computeIcon_(data.icon)",value:""}),x("design:type",String)],E4.prototype,"icon_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],E4.prototype,"useIcons",void 0); w([R({computed:"computeHasSeparator_(data.hasSeparator)",reflectToAttribute:!0}),x("design:type",Boolean)],E4.prototype,"hasSeparator_",void 0);w([R({computed:"computeIsSelected_(data.isSelected)",reflectToAttribute:!0}),x("design:type",Boolean)],E4.prototype,"isSelected",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],E4.prototype,"onFocus_",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],E4.prototype,"onTap_",null);w([U("useIcons","hasSeparator_"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],E4.prototype,"forceUpdateStylesOnLegacyBrowsers_",null);E4=w([V({is:"ytd-menu-service-item-renderer"})],E4);var Emb;var Fmb;var F4=function(){return O.apply(this,arguments)||this}; p(F4,O);e=F4.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDataChanged=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){a.postbox.openDialog();a.focus();a.fire("yt-refit")})}; e.focus=function(){this.postbox.focus()}; e.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onYtCommentboxDismiss=function(){this.closePopup()}; g.Object.defineProperties(F4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Fmb){var a=document.createElement("template");a.innerHTML="
\n
\n [[getSimpleString(data.dialogRenderer.backstagePostDialogRenderer.title)]]\n
\n \n \n \n
\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Emb){var d=document.createElement("template");d.innerHTML=""; Emb=d}d=Emb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fmb=a}a=Fmb;return a}}}); var G4=F4;G4.prototype.onYtCommentboxDismiss=G4.prototype.onYtCommentboxDismiss;w([P(X.YtRendererBehavior),x("design:type",Object)],G4.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],G4.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],G4.prototype,"data",void 0);w([R({value:function(){return YK("SBOX_INAPPROPRIATE_CANCEL")}}), x("design:type",String)],G4.prototype,"closeButtonAriaLabel",void 0);w([CE("#postbox"),x("design:type",Object)],G4.prototype,"postbox",void 0);w([S("yt-commentbox-dismiss"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G4.prototype,"onYtCommentboxDismiss",null);G4=w([V({is:"ytd-backstage-post-dialog-popup-renderer"})],G4);var Gmb;var Hmb;var Imb=function(){return O.apply(this,arguments)||this}; p(Imb,O); g.Object.defineProperties(Imb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hmb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.text)]]
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gmb){var d=document.createElement("template");d.innerHTML=""; Gmb=d}d=Gmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hmb=a}a=Hmb;return a}}}); var H4=Imb;w([P(X.YtRendererBehavior),x("design:type",Object)],H4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],H4.prototype,"data",void 0);H4=w([V({is:"ytd-sender-id-section-renderer"})],H4);var Jmb;var Kmb;var I4=function(){return O.apply(this,arguments)||this}; p(I4,O);I4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{senderIdSectionRenderer:"ytd-sender-id-section-renderer",thirdPartyNetworkSection:"yt-third-party-network-section-renderer"}}}}; I4.prototype.onDataChanged_=function(){var a=this;this.data&&this.data.contents&&(this.setAttribute("links-only",!0),this.toggleAttribute("can-post",this.hasCommunityPostRenderer_()),Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")}))}; I4.prototype.hasCommunityPostRenderer_=function(){var a,b,c,d;return!(null===(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.header)||void 0===b?void 0:b.sharePanelHeaderRenderer)||void 0===c?void 0:c.communityPost)||void 0===d||!d.communityPostSectionRenderer)}; I4.prototype.onTapClose_=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-unified-share-panel-renderer"])}; g.Object.defineProperties(I4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kmb){var a=document.createElement("template");a.innerHTML="\n\n \n\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jmb){var d=document.createElement("template");d.innerHTML=""; Jmb=d}d=Jmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kmb=a}a=Kmb;return a}}}); var J4=I4;w([P(Z),x("design:type",Object)],J4.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],J4.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],J4.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],J4.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged_"}),x("design:type",Object)],J4.prototype,"data",void 0); w([R({value:YK("SBOX_INAPPROPRIATE_CANCEL")}),x("design:type",String)],J4.prototype,"closeButtonAriaLabel",void 0);J4=w([V({is:"ytd-unified-share-panel-renderer"})],J4);var Lmb;var Mmb;var K4=function(){return O.apply(this,arguments)||this}; p(K4,O);K4.prototype.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(K4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mmb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n \n \n
\n
[[getSimpleString(data.subtitle)]]
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lmb){var d=document.createElement("template");d.innerHTML=""; Lmb=d}d=Lmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mmb=a}a=Mmb;return a}}}); var L4=K4;w([P(X.YtRendererBehavior),x("design:type",Object)],L4.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],L4.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],L4.prototype,"data",void 0);L4=w([fO({is:"yt-community-post-section-renderer",noInjection:!0})],L4);var Nmb;var Omb;var M4=function(){return O.apply(this,arguments)||this}; p(M4,O);M4.prototype.configureRendererStamper=function(){return{"data.title":{id:"title",mapping:{sharePanelTitleV15Renderer:"yt-share-panel-title-v15-renderer"}},"data.communityPost":{id:"community-post",mapping:{communityPostSectionRenderer:"yt-community-post-section-renderer"}}}}; g.Object.defineProperties(M4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Omb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nmb){var d=document.createElement("template");d.innerHTML="";Nmb=d}d=Nmb;c.call(b,d.content.cloneNode(!0), a.content.firstChild);Omb=a}a=Omb;return a}}}); var N4=M4;w([P(W.YtActionSenderBehavior),x("design:type",Object)],N4.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],N4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],N4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],N4.prototype,"data",void 0);N4=w([fO({is:"yt-share-panel-header-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],N4);var Pmb;var Qmb;var Rmb=function(){return O.apply(this,arguments)||this}; p(Rmb,O); g.Object.defineProperties(Rmb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qmb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pmb){var d=document.createElement("template");d.innerHTML="";Pmb=d}d=Pmb; c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qmb=a}a=Qmb;return a}}}); var O4=Rmb;w([P(X.YtRendererBehavior),x("design:type",Object)],O4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],O4.prototype,"data",void 0);O4=w([fO({is:"yt-share-panel-title-v15-renderer",noInjection:!0})],O4);var Smb;var Tmb;Polymer({is:"yt-start-at-renderer",_template:function(){if(void 0!==Tmb)return Tmb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Smb){var d=document.createElement("template");d.innerHTML=""; Smb=d}d=Smb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Tmb=a}, actionMap:{"yt-open-popup-action":"onOpen_"},behaviors:[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,X.YtRendererBehavior],properties:{data:Object,isStartAtChecked_:{type:Boolean,value:!1,notify:!0},currentTimeSecs_:Number},attached:function(){this.onOpen_()}, updateTimeSecs_:function(a){this.currentTimeSecs_=a;this.$["start-at-timestamp"].value=this.getTimeString_()}, getTimeString_:function(){var a=this.currentTimeSecs_+"",b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wmb){var d=document.createElement("template");d.innerHTML=""; Wmb=d}d=Wmb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xmb=a}a=Xmb;return a}}}); var Q4=P4;Q4.prototype.onTap=Q4.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],Q4.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],Q4.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],Q4.prototype,"data",void 0);w([BE("data.title"),x("design:type",Object),x("design:paramtypes",[])],Q4.prototype,"title",null);w([BE("data.serviceName"),x("design:type",String),x("design:paramtypes",[])],Q4.prototype,"icon",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],Q4.prototype,"onTap",null);Q4=w([fO({is:"yt-share-target-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],Q4);var Ymb;var Zmb=document.head,$mb=Zmb.appendChild,anb; if(void 0===Ymb){var bnb=document.createElement("template");bnb.innerHTML="";Ymb= bnb}anb=Ymb;$mb.call(Zmb,anb.content);var cnb;var dnb;Polymer({is:"yt-third-party-share-target-section-renderer",_template:function(){if(void 0!==dnb)return dnb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n\n \n\n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cnb){var d=document.createElement("template");d.innerHTML=""; cnb=d}d=cnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return dnb=a}, actionMap:{"yt-share-panel-reset-action":"onReset_"},behaviors:[Z,xO.YtActionHandlerBehavior,X.YtRendererBehavior],listeners:{wheel:"onScrollWheel_"},properties:{data:{type:Object,observer:"onDataChanged_"}},stampDom:{"data.shareTargets":{id:"contents",mapping:{shareTargetRenderer:{component:"yt-share-target-renderer",attributes:{role:"option"}}}}},SHARE_TARGET_WIDTH_:70,SHARE_TARGET_MARGIN_RIGHT_:8,PAGE_SCROLL_SPEED_:9,onDataChanged_:function(){this.data&&this.data.shareTargets&&(this.$["scroll-button-back"].hidden= !0,this.$["scroll-button-forward"].hidden=6>=this.data.shareTargets.length)}, onReset_:function(){this.$.list&&(uD(this.$.list,eBa(this.$.list)),this.updateScrollButtons_())}, onScrollBack_:function(){this.smoothScrollByOnePage_(!1)}, onScrollForward_:function(){this.smoothScrollByOnePage_(!0)}, onScrollWheel_:function(a){a.stopPropagation();a.preventDefault();var b=tD(this.$.list);uD(this.$.list,b+(Math.abs(a.deltaX)>Math.abs(a.deltaY)?a.deltaX:a.deltaY));this.updateScrollButtons_()}, smoothScrollByOnePage_:function(a){var b=this.$.list,c=(Math.floor(b.clientWidth/this.SHARE_TARGET_WIDTH_)*(this.SHARE_TARGET_WIDTH_+this.SHARE_TARGET_MARGIN_RIGHT_)-this.SHARE_TARGET_MARGIN_RIGHT_)/2,d=tD(b),f=c*(a?1:-1),h=this.PAGE_SCROLL_SPEED_,l=this.updateScrollButtons_.bind(this),m=0,n;(function v(){m+=h;n=m/c*2;uD(b,d+f*(1>n?n*n:-n*n+4*n-2));m=a;this.$["scroll-button-forward"].hidden=a>=b}});Polymer({is:"yt-third-party-network-section-renderer",_template:function(){if(void 0!==Vmb)return Vmb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Umb){var d=document.createElement("template");d.innerHTML=""; Umb=d}d=Umb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Vmb=a}, behaviors:[X.YtRendererBehavior,Z],properties:{data:Object},stampDom:{"data.shareTargetContainer":{id:"share-targets",mapping:{thirdPartyShareTargetSectionRenderer:"yt-third-party-share-target-section-renderer"}},"data.copyLinkContainer":{id:"copy-link",mapping:{copyLinkRenderer:"yt-copy-link-renderer"}},"data.startAtContainer":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}}});var enb;var fnb;var R4=function(){return O.apply(this,arguments)||this}; p(R4,O);R4.prototype.attached=function(){this.setAttribute("modal","true")}; g.Object.defineProperties(R4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fnb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===enb){var d=document.createElement("template");d.innerHTML=""; enb=d}d=enb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fnb=a}a=fnb;return a}}}); var S4=R4;w([R(),x("design:type",Object)],S4.prototype,"data",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],S4.prototype,"ytRendererBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],S4.prototype,"ytEventForwardingBehavior",void 0);S4=w([V({is:"ytd-modal-with-title-and-button-renderer"})],S4);var gnb;var hnb;var inb=function(){return O.apply(this,arguments)||this}; p(inb,O); g.Object.defineProperties(inb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hnb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gnb){var d=document.createElement("template");d.innerHTML=""; gnb=d}d=gnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hnb=a}a=hnb;return a}}}); var T4=inb;w([P(X.YtRendererBehavior),x("design:type",Object)],T4.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],T4.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],T4.prototype,"page",void 0);T4=w([V({is:"ytd-account-item-section-header-renderer"})],T4);var jnb;var knb;var U4=function(){return O.apply(this,arguments)||this}; p(U4,O);U4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItem:{component:"ytd-account-item-renderer",properties:{onAccountItemTap:"[[onAccountItemTap]]"}},accountItemRenderer:{component:"ytd-account-item-renderer",properties:{onAccountItemTap:"[[onAccountItemTap]]"}},compactLinkRenderer:"ytd-compact-link-renderer",continuationItemRenderer:{component:"ytd-continuation-item-renderer",params:{showButton:!0}}}},"data.header":{id:"header",mapping:{accountItemSectionHeaderRenderer:"ytd-account-item-section-header-renderer"}}}}; U4.prototype.configureContinuationPathMap=function(){return{"yt-append-continuation-items-action":"contents"}}; g.Object.defineProperties(U4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===knb){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jnb){var d=document.createElement("template");d.innerHTML=""; jnb=d}d=jnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);knb=a}a=knb;return a}}}); var V4=U4;w([P(X.YtRendererBehavior),x("design:type",Object)],V4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],V4.prototype,"ytRendererstamperBehavior",void 0);w([P(yU),x("design:type",Object)],V4.prototype,"ytContinuationHandlerBehavior",void 0);w([R(),x("design:type",Object)],V4.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],V4.prototype,"onAccountItemTap",void 0);V4=w([V({is:"ytd-account-item-section-renderer"})],V4);var lnb;var mnb;var W4=function(){return O.apply(this,arguments)||this}; p(W4,O);W4.prototype.configureRendererStamper=function(){return{"data.contents":{id:"contents",mapping:{accountItemSectionRenderer:"ytd-account-item-section-renderer",compactLinkRenderer:"ytd-compact-link-renderer"}}}}; g.Object.defineProperties(W4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mnb){var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lnb){var d=document.createElement("template");d.innerHTML="";lnb=d}d=lnb;c.call(b, d.content.cloneNode(!0),a.content.firstChild);mnb=a}a=mnb;return a}}}); var X4=W4;w([P(X.YtRendererBehavior),x("design:type",Object)],X4.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],X4.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],X4.prototype,"data",void 0);w([R({notify:!0}),x("design:type",String)],X4.prototype,"page",void 0);X4=w([V({is:"ytd-account-section-list-renderer"})],X4);var nnb;var onb;var Y4=function(){return O.apply(this,arguments)||this}; p(Y4,O);Y4.prototype.dataChanged=function(){if(this.data)this.avatar.onShow()}; g.Object.defineProperties(Y4,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===onb){var a=document.createElement("template");a.innerHTML="\n\n
\n \n \n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nnb){var d=document.createElement("template");d.innerHTML=""; nnb=d}d=nnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);onb=a}a=onb;return a}}}); var Z4=Y4;Z4.prototype.dataChanged=Z4.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],Z4.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],Z4.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],Z4.prototype,"data",void 0);w([CE("#avatar"),x("design:type",Object)],Z4.prototype,"avatar",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],Z4.prototype,"dataChanged",null);Z4=w([V({is:"ytd-active-account-header-renderer"})],Z4);var pnb;var qnb;var $4=function(){var a=O.apply(this,arguments)||this;a.covered=!1;a.hideMenu=!1;a.hasYourDataEntryButton=N("your_data_entrypoint");a.scrolledByTouch=!1;a.scrollbarRework=N("kevlar_scrollbar_rework");a.HIGH_PRIORITY_NOTIFICATION_DISPLAY_TIMEOUT_MS=4E3;return a}; p($4,O);e=$4.prototype; e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{activeAccountHeaderRenderer:"ytd-active-account-header-renderer",flowHeaderRenderer:"yt-flow-header-renderer",simpleMenuHeaderRenderer:"ytd-simple-menu-header-renderer",reportChannelModalHeaderRenderer:"ytd-report-channel-modal-header-renderer"}},"data.sections":{id:"sections",mapping:{additionalContextRenderer:"ytd-report-channel-modal-additional-context-renderer",abuseTypeSelectorRenderer:"ytd-abuse-type-selector-renderer",accountSectionListRenderer:"ytd-account-section-list-renderer", backgroundPromoRenderer:"ytd-background-promo-renderer",commentVideoThumbnailHeaderRenderer:"ytd-comment-video-thumbnail-header-renderer",impersonationScreenRenderer:"ytd-report-channel-modal-impersonation-renderer",itemSectionRenderer:"ytd-comments",messageRenderer:"ytd-message-renderer",multiPageMenuNotificationSectionRenderer:"yt-multi-page-menu-section-renderer",multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer",postConfirmationFlowStepRenderer:"yt-post-confirmation-flow-step-renderer", refundConfirmationFlowStepRenderer:"yt-refund-confirmation-flow-step-renderer",selectableVideoListRenderer:"ytd-selectable-video-list-renderer",surveyFlowStepRenderer:"ytd-survey-flow-step-renderer",toggleItemRenderer:"ytd-toggle-item-renderer"},events:!0},"data.footer":{id:"footer",mapping:{multiPageMenuSectionRenderer:"yt-multi-page-menu-section-renderer",reportChannelModalFooterRenderer:"ytd-report-channel-modal-footer-renderer",flowFooterRenderer:"ytd-flow-footer-renderer"}}}}; e.ready=function(){this.$.container.addEventListener("scroll",this.ytRendererBehavior.markDirty.bind(this))}; e.detached=function(){this.unlisten(this,"yt-rendererstamper-finished","focusOnStampFinished_")}; e.focusFirstItem=function(){this.doFocus_();this.listen(this,"yt-rendererstamper-finished","focusOnStampFinished_")}; e.reset=function(){this.closeJobId_&&(Fk.cancelJob(this.closeJobId_),this.closeJobId_=0);this.covered=!1}; e.focusOnStampFinished_=function(a){a.detail.container==this.$.sections&&(this.unlisten(this,"yt-rendererstamper-finished","focusOnStampFinished_"),this.doFocus_())}; e.doFocus_=function(){var a=hI(Polymer.IronFocusablesHelper,this.$.sections);a.length&&a[0].focus()}; e.computeMenuStyle_=function(a){return a?a.toLowerCase().replace(/_/g,"-"):""}; e.computeHideMenu_=function(a,b){return a||!(!b||!b.showLoadingSpinner)}; e.onPopupClosed_=function(){this.isPopUpOpen=!1;var a=Polymer.dom(this.root).querySelectorAll("yt-multi-page-menu-section-renderer");if(a){a=k(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&(b=Polymer.dom(b.root).querySelectorAll("ytd-notification-renderer"))&&this.setNotificationsSeen_(b)}}; e.onPopupOpened_=function(a,b){this.isPopUpOpen=!0;"ytd-multi-page-menu-renderer"==b.is&&(this.reset(),this.fire("yt-refit"),"MULTI_PAGE_MENU_STYLE_TYPE_REPORT_CHANNEL"===this.data.style&&this.dispatch(KL({type:"CHANNEL_REPORT_RESET"})))}; e.onYtNavigate_=function(a,b){this.shouldCloseOnNavigateEvent_(b.endpoint)&&this.ytActionSenderBehavior.sendAction("yt-close-all-popups-action")}; e.onServiceRequestSentOrCompleted_=function(a,b){a.detail&&a.detail.endpoint&&a.detail.endpoint.getCommentsFromInboxCommand&&(this.$.spinner.hidden=!1,this.$.header.hidden=!0,this.$.container.hidden=!0,this.$.submenu.hidden=!0);if(b.actions){a=b.actions;b=0;for(var c=a.length;b\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pnb){var d=document.createElement("template");d.innerHTML=""; pnb=d}d=pnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qnb=a}a=qnb;return a}}}); var a5=$4;a5.prototype.onRetrieveLocation_=a5.prototype.onRetrieveLocation_;a5.prototype.onSubmenuClosed_=a5.prototype.onSubmenuClosed_;a5.prototype.onMenuBackTap_=a5.prototype.onMenuBackTap_;a5.prototype.onServiceRequestSentOrCompleted_=a5.prototype.onServiceRequestSentOrCompleted_;a5.prototype.onYtNavigate_=a5.prototype.onYtNavigate_;a5.prototype.onPopupOpened_=a5.prototype.onPopupOpened_;a5.prototype.onPopupClosed_=a5.prototype.onPopupClosed_; w([P(X.YtRendererBehavior),x("design:type",Object)],a5.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],a5.prototype,"ytActionSenderBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],a5.prototype,"ytActionHandlerBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],a5.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],a5.prototype,"ytRendererstamperBehavior",void 0); w([P(DQ.YtdReduxBehavior),x("design:type",Object)],a5.prototype,"ytdReduxBehavior",void 0);w([R({observer:"refitAfterRender_"}),x("design:type",Object)],a5.prototype,"data",void 0);w([R(),x("design:type",Object)],a5.prototype,"covered",void 0);w([R({computed:"computeHideMenu_(covered, data)"}),x("design:type",Object)],a5.prototype,"hideMenu",void 0);w([R({reflectToAttribute:!0,computed:"computeMenuStyle_(data.style)"}),x("design:type",String)],a5.prototype,"menuStyle",void 0); w([R(),x("design:type",Boolean)],a5.prototype,"isPopUpOpen",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],a5.prototype,"hasYourDataEntryButton",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],a5.prototype,"scrolledByTouch",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],a5.prototype,"scrollbarRework",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],a5.prototype,"onPopupClosed_",null); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Element]),x("design:returntype",void 0)],a5.prototype,"onPopupOpened_",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],a5.prototype,"onYtNavigate_",null); w([S("yt-service-request-completed"),S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],a5.prototype,"onServiceRequestSentOrCompleted_",null);w([S("yt-menu-back-tapped"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],a5.prototype,"onMenuBackTap_",null); w([S("yt-submenu-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],a5.prototype,"onSubmenuClosed_",null);w([S("yt-retrieve-location"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],a5.prototype,"onRetrieveLocation_",null);a5=w([V({is:"ytd-multi-page-menu-renderer"})],a5);var rnb;var snb;var b5=function(){return O.apply(this,arguments)||this}; p(b5,O);b5.prototype.configureRendererStamper=function(){return{"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; b5.prototype.onBackTap=function(){this.fire("yt-menu-back-tapped")}; g.Object.defineProperties(b5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===snb){var a=document.createElement("template");a.innerHTML="\n

\n \n

\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rnb){var d=document.createElement("template");d.innerHTML=""; rnb=d}d=rnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);snb=a}a=snb;return a}}}); var c5=b5;w([P(X.YtRendererBehavior),x("design:type",Object)],c5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],c5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],c5.prototype,"data",void 0);c5=w([V({is:"ytd-simple-menu-header-renderer"})],c5);var tnb;var unb;var vnb=function(){return O.apply(this,arguments)||this}; p(vnb,O); g.Object.defineProperties(vnb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===unb){var a=document.createElement("template");a.innerHTML="\n \n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tnb){var d=document.createElement("template");d.innerHTML=""; tnb=d}d=tnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);unb=a}a=unb;return a}}}); var d5=vnb;w([P(X.YtRendererBehavior),x("design:type",Object)],d5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],d5.prototype,"data",void 0);d5=w([V({is:"ytd-comment-video-thumbnail-header-renderer"})],d5);var wnb;var xnb;var ynb=function(){return O.apply(this,arguments)||this}; p(ynb,O); g.Object.defineProperties(ynb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===xnb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
[[getSimpleString(data.footer)]]
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wnb){var d=document.createElement("template");d.innerHTML=""; wnb=d}d=wnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xnb=a}a=xnb;return a}}}); var e5=ynb;w([P(X.YtRendererBehavior),x("design:type",Object)],e5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],e5.prototype,"data",void 0);e5=w([V({is:"ytd-abuse-type-selector-renderer"})],e5);var znb;var Anb;Polymer({is:"yt-options-renderer",_template:function(){if(void 0!==Anb)return Anb;var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===znb){var d=document.createElement("template");d.innerHTML=""; znb=d}d=znb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Anb=a}, behaviors:[kO.YtComponentBehavior,X.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},itemSelected_:{type:Number,value:-1},value:{type:Number,computed:"computeItemSelected_(itemSelected_)"},restoreFocusOnClose:{type:Boolean,value:!1},increasedTooltipTarget:{type:Boolean,reflectToAttribute:!0,value:function(){return N("desktop_adjust_touch_target")}}, tooltipTapped:{type:Boolean,reflectToAttribute:!0,value:!1},animationDelay:{type:Number,value:function(){return N("desktop_adjust_touch_target")?0:500}}, preselectedSubreason:{type:Number,value:-1}},listeners:{transitionend:"onPaperRippleTransitionEnd_"},computePreselectedOption:function(a,b){return b===parseInt(this.itemSelected_,10)?a:void 0}, dataChanged_:function(){var a=this;this.preselectedSubreason=this.itemSelected_=-1;this.data.key&&Polymer.RenderStatus.afterNextRender(this,function(){var b=parseInt(a.data.key,10);!Number.isNaN(b)&&(a.itemSelected_=b,b=(b=a.data.items[b])&&b.optionSelectableItemRenderer&&b.optionSelectableItemRenderer.preselectedIndex)&&(a.preselectedSubreason=b)})}, isSubReasonHidden_:function(a,b){return a!=b}, onTopItemSelected_:function(a,b){for(var c=Polymer.dom(this.root).querySelectorAll("paper-listbox"),d=0,f=c.length;d\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bnb){var d=document.createElement("template");d.innerHTML=""; Bnb=d}d=Bnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cnb=a}a=Cnb;return a}}}); var g5=f5;w([P(CQ),x("design:type",Object)],g5.prototype,"ytdReduxBehavior",void 0);w([R({observer:"handleAdditionalContextChanged"}),x("design:type",String)],g5.prototype,"additionalContext",void 0);w([R({selector:function(a){return a.reportChannelAbuse.additionalContext}}), x("design:type",String)],g5.prototype,"additionalContextRedux",void 0);w([R(),x("design:type",Object)],g5.prototype,"data",void 0);w([CE("yt-text-input-form-field-renderer"),x("design:type",i0)],g5.prototype,"additionalContextInput",void 0);g5=w([V({is:"ytd-report-channel-modal-additional-context-renderer"})],g5);var Dnb;var Enb;var h5=function(){var a=O.apply(this,arguments)||this;a.nextButtonDisabled=null;a.submitEndpoint=null;a.navigationEndpoint=null;a.actionMap={"yt-report-form-update":"handleReportFormEndpointUpdateAction","yt-signal-action-submit-form":"handleSignalActionSubmitForm","ytd-report-channel-modal-disable-next-button-action":"handleReportChannelModalDisableNextButtonAction"};return a}; p(h5,O);e=h5.prototype;e.computeNextButtonData=function(a,b,c){var d={};b&&(d.navigationEndpoint=b);c&&(d.serviceEndpoint=c);a&&a.buttonRenderer&&y.extend(d,a.buttonRenderer);return d}; e.handleReportChannelModalDisableNextButtonAction=function(a){this.setNextButtonIsDisabled(a)}; e.handleReportFormEndpointUpdateAction=function(a){this.setNextButtonIsDisabled(!!a.disableSubmitButton);this.resetEndpointData();a.submitEndpoint?this.submitEndpoint=a.submitEndpoint:a.submitNavigationEndpoint&&(this.navigationEndpoint=a.submitNavigationEndpoint)}; e.handleSignalActionSubmitForm=function(){var a,b,c,d,f=Object.keys((null===(a=this.reportChannelAbuseForm)||void 0===a?void 0:a.selectedVideoIds)||{}),h=(null===(b=this.reportChannelAbuseForm)||void 0===b?void 0:b.additionalContext)||"";f={impersonated_channel_url:(null===(c=this.reportChannelAbuseForm)||void 0===c?void 0:c.impersonatedChannelUrl)||"",text:h,video_ids:f};this.ytActionSenderBehavior.sendServiceRequestAction([null===(d=this.data)||void 0===d?void 0:d.submitEndpoint,f]);this.setNextButtonIsDisabled(!0)}; e.onYtServiceRequestCompleted=function(){this.resetEndpointData()}; e.onYtServiceRequestError=function(a){this.setNextButtonIsDisabled(!1);this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.setNextButtonIsDisabled=function(a){this.set("data.nextButton.buttonRenderer.isDisabled",a)}; e.resetEndpointData=function(){this.submitEndpoint=this.navigationEndpoint=null}; g.Object.defineProperties(h5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Enb){var a=document.createElement("template");a.innerHTML="\n\n \n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dnb){var d=document.createElement("template");d.innerHTML=""; Dnb=d}d=Dnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Enb=a}a=Enb;return a}}}); var i5=h5;i5.prototype.onYtServiceRequestError=i5.prototype.onYtServiceRequestError;i5.prototype.onYtServiceRequestCompleted=i5.prototype.onYtServiceRequestCompleted;w([R(),x("design:type",Object)],i5.prototype,"data",void 0);w([R(),x("design:type",Object)],i5.prototype,"nextButtonDisabled",void 0);w([P(CQ),x("design:type",Object)],i5.prototype,"ytdReduxBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],i5.prototype,"ytActionHandlerBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],i5.prototype,"ytActionSenderBehavior",void 0);w([P($V),x("design:type",Object)],i5.prototype,"ytOpenToastBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],i5.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],i5.prototype,"submitEndpoint",void 0);w([R(),x("design:type",Object)],i5.prototype,"navigationEndpoint",void 0);w([R({selector:function(a){return a.reportChannelAbuse}}), x("design:type",Object)],i5.prototype,"reportChannelAbuseForm",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],i5.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],i5.prototype,"onYtServiceRequestError",null);i5=w([V({is:"ytd-report-channel-modal-footer-renderer"})],i5);var Fnb;var Gnb;var j5=function(){var a=O.apply(this,arguments)||this;a.boundOnTapDismissButton=function(){a.closePopup()}; return a}; p(j5,O);j5.prototype.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapDismissButton]]"}}}}}}; j5.prototype.handleDataChanged=function(){pk(this)}; j5.prototype.closePopup=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(j5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gnb){var a=document.createElement("template");a.innerHTML="
\n [[getSimpleString(data.title)]]\n [[getSimpleString(data.subtitle)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fnb){var d=document.createElement("template");d.innerHTML=""; Fnb=d}d=Fnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gnb=a}a=Gnb;return a}}}); var k5=j5;w([R(),x("design:type",Object)],k5.prototype,"boundOnTapDismissButton",void 0);w([R({observer:"handleDataChanged"}),x("design:type",Object)],k5.prototype,"data",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],k5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],k5.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],k5.prototype,"ytActionSenderBehavior",void 0); k5=w([V({is:"ytd-report-channel-modal-header-renderer"})],k5);var Hnb;var Inb;var l5=function(){var a=O.apply(this,arguments)||this;a.autoValidate=!1;a.invalid=!1;a.actionMap={"yt-modify-report-form-command":"handleModifyReportFormCommand"};return a}; p(l5,O);l5.prototype.attached=function(){var a=this;this.impersonatedChannelUrlRedux?(this.impersonatedChannelUrl=this.impersonatedChannelUrlRedux,this.handleImpersonatedChannelUrlChanged(this.impersonatedChannelUrl)):this.impersonatedChannelUrl="";requestAnimationFrame(function(){a.channelUrlInput.focusTextInput()})}; l5.prototype.disableNextButton=function(a){this.ytActionSenderBehavior.sendAction("ytd-report-channel-modal-disable-next-button-action",[a])}; l5.prototype.handleImpersonatedChannelUrlChanged=function(a){var b=this;this.disableNextButton(!0);this.invalid=!1;this.debounce("ytd-report-channel-impersonated-channel-update",function(){var c,d=a.trim();b.ytdReduxBehavior.dispatch(KL({type:"IMPERSONATED_CHANNEL_URL_UPDATED",payload:d}));(null===(c=b.data)||void 0===c?0:c.submitEndpoint)&&d&&b.ytActionSenderBehavior.sendServiceRequestAction([b.data.submitEndpoint,{impersonated_channel_url:d}])},500)}; l5.prototype.handleModifyReportFormCommand=function(a){this.invalid="REPORT_FORM_ACTION_ENABLE_SUBMIT_BUTTON"!==this.get("modifyReportFormCommand.action",a);this.disableNextButton(this.invalid)}; g.Object.defineProperties(l5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Inb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Hnb){var d=document.createElement("template");d.innerHTML=""; Hnb=d}d=Hnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Inb=a}a=Inb;return a}}}); var m5=l5;w([P([W.YtActionSenderBehavior]),x("design:type",Object)],m5.prototype,"ytActionSenderBehavior",void 0);w([P(CQ),x("design:type",Object)],m5.prototype,"ytdReduxBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],m5.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],m5.prototype,"autoValidate",void 0);w([R(),x("design:type",Object)],m5.prototype,"invalid",void 0); w([R({observer:"handleImpersonatedChannelUrlChanged"}),x("design:type",String)],m5.prototype,"impersonatedChannelUrl",void 0);w([R({selector:function(a){return a.reportChannelAbuse.impersonatedChannelUrl}}), x("design:type",String)],m5.prototype,"impersonatedChannelUrlRedux",void 0);w([R(),x("design:type",Object)],m5.prototype,"data",void 0);w([CE("#text-input"),x("design:type",i0)],m5.prototype,"channelUrlInput",void 0);m5=w([V({is:"ytd-report-channel-modal-impersonation-renderer"})],m5);var Jnb;var Knb;var n5=function(){var a=O.apply(this,arguments)||this;a.monitorScroll=!0;return a}; p(n5,O);n5.prototype.configureRendererStamper=function(){return{"data.selectableVideos":{id:"selectable-videos",mapping:{selectableVideoRenderer:{component:"ytd-selectable-video-renderer"}},events:!0}}}; g.Object.defineProperties(n5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Knb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Jnb){var d=document.createElement("template");d.innerHTML=""; Jnb=d}d=Jnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Knb=a}a=Knb;return a}}}); var o5=n5;w([P(X.YtRendererBehavior),x("design:type",Object)],o5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],o5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],o5.prototype,"data",void 0);o5=w([V({is:"ytd-selectable-video-list-renderer"})],o5);var Lnb;var Mnb;var p5=function(){return O.apply(this,arguments)||this}; p(p5,O);p5.prototype.onCheckboxToggled=function(a){var b,c,d;if(null===(d=null===(c=null===(b=this.data)||void 0===b?void 0:b.video)||void 0===c?void 0:c.videoRenderer)||void 0===d?0:d.videoId){var f=this.data.video.videoRenderer.videoId;this.ytdReduxBehavior.dispatch(a.target.checked?KL({type:"VIDEO_SELECTED",payload:f}):KL({type:"VIDEO_UNSELECTED",payload:f}))}}; p5.prototype.configureRendererStamper=function(){return{video:{id:"video",mapping:{videoRenderer:{component:"ytd-video-renderer",params:{isPostCompactVideo:!0}}}}}}; g.Object.defineProperties(p5.prototype,{video:{configurable:!0,enumerable:!0,get:function(){var a,b,c,d=null===(a=this.data)||void 0===a?void 0:a.video;if(!d)return{};var f=null===(b=d.videoRenderer)||void 0===b?void 0:b.navigationEndpoint;if(!f)return d;if(null===(c=null===f||void 0===f?void 0:f.commandMetadata)||void 0===c?0:c.webCommandMetadata)f.commandMetadata.webCommandMetadata.ignoreNavigation=!0;return d}}}); g.Object.defineProperties(p5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Mnb){var a=document.createElement("template");a.innerHTML="\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lnb){var d=document.createElement("template");d.innerHTML=""; Lnb=d}d=Lnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mnb=a}a=Mnb;return a}}}); var q5=p5;w([R({reflectToAttribute:!0,selector:function(a,b){return b in a.reportChannelAbuse.selectedVideoIds}, selectorArgs:["data.video.videoRenderer.videoId"]}),x("design:type",Boolean)],q5.prototype,"checked",void 0);w([R(),x("design:type",Object)],q5.prototype,"data",void 0);w([BE("data"),x("design:type",Object),x("design:paramtypes",[])],q5.prototype,"video",null);w([P(X.YtRendererBehavior),x("design:type",Object)],q5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],q5.prototype,"ytRendererstamperBehavior",void 0); w([P(CQ),x("design:type",Object)],q5.prototype,"ytdReduxBehavior",void 0);q5=w([V({is:"ytd-selectable-video-renderer"})],q5);var Nnb;var Onb;TO("multiPageMenuSectionItems","toggleItemRenderer","ytd-toggle-item-renderer");var r5=function(){return O.apply(this,arguments)||this}; p(r5,O);r5.prototype.onChange=function(a){(a=Polymer.dom(a).rootTarget.checked?this.data.toggleOnActions:this.data.toggleOffActions)&&this.ytActionSenderBehavior.sendInnerTubeActions(a,this)}; r5.prototype.isEnabled=function(){return!!this.data.toggleOnActions||!!this.data.toggleOffActions}; g.Object.defineProperties(r5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Onb){var a=document.createElement("template");a.innerHTML="\n
\n
[[getSimpleString(data.label)]]
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nnb){var d=document.createElement("template");d.innerHTML=""; Nnb=d}d=Nnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Onb=a}a=Onb;return a}}}); var s5=r5;w([P(X.YtRendererBehavior),x("design:type",Object)],s5.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],s5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],s5.prototype,"data",void 0);w([R({computed:"isEnabled(data)"}),x("design:type",Boolean)],s5.prototype,"enabled",void 0);s5=w([V({is:"ytd-toggle-item-renderer"})],s5);var Pnb;var Qnb;var Rnb=function(){return O.apply(this,arguments)||this}; p(Rnb,O); g.Object.defineProperties(Rnb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qnb){var a=document.createElement("template");a.innerHTML="\n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pnb){var d=document.createElement("template");d.innerHTML="";Pnb=d}d=Pnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qnb=a}a=Qnb;return a}}}); var t5=Rnb;w([P(X.YtRendererBehavior),x("design:type",Object)],t5.prototype,"ytRendererBehavior",void 0);w([P(CQ),x("design:type",Object)],t5.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],t5.prototype,"data",void 0);w([R({selector:function(a){return a.ypc.surveyFeedbackData}}), x("design:type",Object)],t5.prototype,"surveyFeedbackData",void 0);t5=w([V({is:"ytd-flow-footer-renderer"})],t5);var Snb;var Tnb;var u5=function(){var a=O.apply(this,arguments)||this;a.setVisible=!1;a.boundOnSubmitButtonClick=function(){a.onSubmitButtonClick()}; a.actionMap={"yt-survey-flow-step-option-changed":"handleSurveyFlowStepOptionChanged"};return a}; p(u5,O);u5.prototype.configureRendererStamper=function(){return{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[boundOnSubmitButtonClick]]"},params:{noink:!0}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},params:{noink:!0}}}}}}; u5.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; u5.prototype.handleSurveyFlowStepOptionChanged=function(){this.setVisible=!0}; u5.prototype.onSubmitButtonClick=function(){var a;(null===(a=this.data)||void 0===a?0:a.submitEndpoint)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitEndpoint,{formData:{ypcBrowseFormData:{problemFlowFormData:{surveyFeedbackData:this.surveyFeedbackData}}}}])}; g.Object.defineProperties(u5.prototype,{visibilityHidden:{configurable:!0,enumerable:!0,get:function(){var a;return!(null===(a=this.data)||void 0===a||!a.hiddenByDefault)&&!this.setVisible}}}); g.Object.defineProperties(u5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tnb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Snb){var d=document.createElement("template");d.innerHTML=""; Snb=d}d=Snb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tnb=a}a=Tnb;return a}}}); var v5=u5;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],v5.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],v5.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],v5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],v5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],v5.prototype,"setVisible",void 0); w([R(),x("design:type",Object)],v5.prototype,"data",void 0);w([R(),x("design:type",Object)],v5.prototype,"surveyFeedbackData",void 0);w([R(),x("design:type",Object)],v5.prototype,"boundOnSubmitButtonClick",void 0);w([R({reflectToAttribute:!0}),BE("data","setVisible"),x("design:type",Object),x("design:paramtypes",[])],v5.prototype,"visibilityHidden",null);v5=w([fO({is:"yt-flow-footer-renderer",noInjection:!0})],v5);var Unb;var Vnb;var w5=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-survey-flow-step-option-changed":"handleSurveyFlowStepOptionChanged"};return a}; p(w5,O);w5.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; w5.prototype.handleSurveyFlowStepOptionChanged=function(a){this.ytdReduxBehavior.dispatch(KL({type:"YPC_UPDATE_SURVEY_FEEDBACK_DATA",payload:a}))}; g.Object.defineProperties(w5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vnb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Unb){var d=document.createElement("template");d.innerHTML="";Unb=d}d=Unb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); Vnb=a}a=Vnb;return a}}}); var x5=w5;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],x5.prototype,"ytActionHandlerBehavior",void 0);w([P(CQ),x("design:type",Object)],x5.prototype,"ytdReduxBehavior",void 0);w([R(),x("design:type",Object)],x5.prototype,"data",void 0);x5=w([V({is:"ytd-survey-flow-step-renderer"})],x5);var Wnb;var Xnb;var y5=function(){return O.apply(this,arguments)||this}; p(y5,O);y5.prototype.selectedItemChanged=function(a){this.ytActionSenderBehavior.sendAction("yt-survey-flow-step-option-changed",[a.feedbackData])}; g.Object.defineProperties(y5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xnb){var a=document.createElement("template");a.innerHTML="\n \n\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wnb){var d=document.createElement("template");d.innerHTML=""; Wnb=d}d=Wnb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xnb=a}a=Xnb;return a}}}); var z5=y5;z5.prototype.selectedItemChanged=z5.prototype.selectedItemChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],z5.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],z5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],z5.prototype,"data",void 0);w([R(),x("design:type",Object)],z5.prototype,"selectedItem",void 0); w([U("selectedItem"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],z5.prototype,"selectedItemChanged",null);z5=w([V({is:"yt-survey-flow-step-renderer"})],z5);var Ynb;var Znb;Polymer({is:"yt-multi-page-menu-section-renderer",_template:function(){if(void 0!==Znb)return Znb;var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ynb){var d=document.createElement("template");d.innerHTML=""; Ynb=d}d=Ynb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Znb=a}, behaviors:[X.YtRendererBehavior,Z,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior],listeners:{"yt-service-request-completed":"onServiceRequestCompleted_"},properties:{data:Object},actionMap:{"yt-broadcast-user-invalidation-action":"updateMenu_","yt-hide-enclosing-action":"handleHideEnclosingAction_"},stampDom:{"data.items":{id:"items",mapping:UO("multiPageMenuSectionItems")}},handleHideEnclosingAction_:function(a){if(this.data&&this.data.items)for(var b=0;b
\n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===$nb){var d=document.createElement("template");d.innerHTML=""; $nb=d}d=$nb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);aob=a}a=aob;return a}}}); var B5=A5;w([P(X.YtRendererBehavior),x("design:type",Object)],B5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],B5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],B5.prototype,"data",void 0);w([BE("data.progress"),x("design:type",Boolean),x("design:paramtypes",[])],B5.prototype,"showProgressBar",null);w([BE("data.progress"),x("design:type",Number),x("design:paramtypes",[])],B5.prototype,"progress",null); B5=w([fO({is:"yt-flow-header-renderer",noInjection:!0})],B5);var bob;var cob;var C5=function(){return O.apply(this,arguments)||this}; p(C5,O);C5.prototype.configureRendererStamper=function(){return{"data.text":{id:"text",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}}; g.Object.defineProperties(C5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===cob){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===bob){var d=document.createElement("template");d.innerHTML=""; bob=d}d=bob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);cob=a}a=cob;return a}}}); var D5=C5;w([P(X.YtRendererBehavior),x("design:type",Object)],D5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],D5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],D5.prototype,"data",void 0);D5=w([fO({is:"yt-post-confirmation-flow-step-renderer",noInjection:!0})],D5);var dob;var eob;var E5=function(){return O.apply(this,arguments)||this}; p(E5,O); E5.prototype.configureRendererStamper=function(){return{"data.userInfo":{id:"user-info",mapping:{cardItemTextWithImageRenderer:{component:"yt-card-item-text-with-image-renderer"}}},"data.confirmationText":{id:"confirmation-text",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}},"data.confirmationDetailsHeader":{id:"confirmation-details",mapping:{cardItemTextRenderer:{component:"yt-card-item-text-renderer"}}},"data.productDetails":{id:"product-details",mapping:{activityItemRenderer:{component:"yt-activity-item-renderer"}}}, "data.billingDetails":{id:"billing-details",mapping:{cardItemTextCollectionRenderer:{component:"yt-card-item-text-collection-renderer"}}}}}; g.Object.defineProperties(E5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===eob){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dob){var d=document.createElement("template");d.innerHTML=""; dob=d}d=dob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);eob=a}a=eob;return a}}}); var F5=E5;w([P(X.YtRendererBehavior),x("design:type",Object)],F5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],F5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],F5.prototype,"data",void 0);F5=w([fO({is:"yt-refund-confirmation-flow-step-renderer",noInjection:!0})],F5);var fob;var gob;var G5=function(){return O.apply(this,arguments)||this}; p(G5,O);G5.prototype.created=function(){this.showTooltips=!0}; G5.prototype.computeAccessibility_=function(a){return this.get("accessibility.accessibilityData",a)||null}; G5.prototype.onTap=function(){var a,b,c=this.ytActionSenderBehavior.sendOptionalAction("yt-get-popup-opened-action",["ytd-multi-page-menu-renderer"]);c&&1===c.length&&c[0]?this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]):(null===(a=this.data)||void 0===a?0:a.menuRenderer)?this.ytdOpenPopupBehavior.openPopup({openPopupAction:{popupType:"DROPDOWN",popup:this.data.menuRenderer}}):(null===(b=this.data)||void 0===b?0:b.menuRequest)&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.menuRequest])}; g.Object.defineProperties(G5.prototype,{container:{configurable:!0,enumerable:!0,get:function(){return this.$.button}}}); g.Object.defineProperties(G5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gob){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fob){var d=document.createElement("template");d.innerHTML=""; fob=d}d=fob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gob=a}a=gob;return a}}}); var H5=G5;H5.prototype.onTap=H5.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],H5.prototype,"ytRendererBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],H5.prototype,"ytdOpenPopupBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],H5.prototype,"ytActionSenderBehavior",void 0);w([P(RO.YtButtonBehavior),x("design:type",Object)],H5.prototype,"ytButtonBehavior",void 0);w([R(),x("design:type",Object)],H5.prototype,"data",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H5.prototype,"onTap",null);H5=w([V({is:"ytd-topbar-menu-button-renderer"})],H5);var hob;var iob;var I5=function(){return O.apply(this,arguments)||this}; p(I5,O);e=I5.prototype;e.onPopupOpened=function(){this.ytActionSenderBehavior.sendAction("yt-mute-ad-action",["ytd-ad-feedback-renderer",this])}; e.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}}; e.computeCancelButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.cancelLabel}}; e.onConfirmTap=function(){var a=this.reasons.selected;void 0!==a&&(a=this.data.reasons[a].endpoint)&&(this.ytActionSenderBehavior.sendServiceRequestAction([a]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"),this.sendFeedbackSubmitToastAction())}; e.sendFeedbackSubmitToastAction=function(){this.data.completionMessage&&this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:this.data.completionMessage}}}},this])}; e.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(I5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===iob){var a=document.createElement("template");a.innerHTML="\n\n\n\n \n\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hob){var d=document.createElement("template");d.innerHTML=""; hob=d}d=hob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iob=a}a=iob;return a}}}); var J5=I5;J5.prototype.onPopupOpened=J5.prototype.onPopupOpened;w([P(X.YtRendererBehavior),x("design:type",Object)],J5.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],J5.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],J5.prototype,"data",void 0);w([CE("#reasons"),x("design:type",Object)],J5.prototype,"reasons",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],J5.prototype,"onPopupOpened",null);J5=w([V({is:"ytd-ad-feedback-renderer"})],J5);var job;var kob;var K5=function(){return O.apply(this,arguments)||this}; p(K5,O);K5.prototype.computeConfirmButton=function(a){return{style:"STYLE_BLUE_TEXT",size:"SIZE_DEFAULT",text:a.confirmLabel}}; K5.prototype.onConfirmTap=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-ad-info-dialog-renderer"])}; K5.prototype.onPopupClosed=function(){this.data&&this.data.confirmServiceEndpoint&&this.actionSenderBehavior.sendServiceRequestAction([this.data.confirmServiceEndpoint])}; g.Object.defineProperties(K5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kob){var a=document.createElement("template");a.innerHTML="\n\n\n\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===job){var d=document.createElement("template");d.innerHTML=""; job=d}d=job;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kob=a}a=kob;return a}}}); var L5=K5;L5.prototype.onPopupClosed=L5.prototype.onPopupClosed;w([P(X.YtRendererBehavior),x("design:type",Object)],L5.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],L5.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],L5.prototype,"data",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],L5.prototype,"onPopupClosed",null); L5=w([V({is:"ytd-ad-info-dialog-renderer"})],L5);var lob;var mob;var M5=function(){var a=O.apply(this,arguments)||this;a.data=null;a.isError=!1;a.isLoading=!1;return a}; p(M5,O);e=M5.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.toggleCreateChannelButton()}; e.dataChanged=function(){this.set("isLoading",!1);this.set("isError",!1)}; e.onYtServiceRequestSent=function(){this.set("data.createChannelButton.buttonRenderer.isDisabled",!0);this.set("data.cancelButton.buttonRenderer.isDisabled",!0);this.set("data.clearProfilePhotoButton.buttonRenderer.isDisabled",!0);this.set("isLoading",!0);this.set("isError",!1)}; e.onYtServiceRequestError=function(){this.set("data.createChannelButton.buttonRenderer.isDisabled",!1);this.set("data.cancelButton.buttonRenderer.isDisabled",!1);this.set("data.clearProfilePhotoButton.buttonRenderer.isDisabled",this.data.isDefaultProfilePhoto);this.set("isLoading",!1);this.set("isError",!0)}; e.onCreateTap=function(){var a;null!==(a=this.nameInput)&&void 0!==a&&a.value&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.createChannelButton.buttonRenderer.serviceEndpoint,{name:this.nameInput.value}])}; e.toggleCreateChannelButton=function(){var a;this.set("data.createChannelButton.buttonRenderer.isDisabled",!(null===(a=this.nameInput)||void 0===a?0:a.value))}; e.onClearProfilePhotoTap=function(){this.set("data.isDefaultProfilePhoto",!0);this.set("data.clearProfilePhotoButton.buttonRenderer.isDisabled",!0)}; g.Object.defineProperties(M5.prototype,{photoThumbnail:{configurable:!0,enumerable:!0,get:function(){if(this.data)return this.data.isDefaultProfilePhoto?this.data.defaultProfilePhoto:this.data.profilePhoto}}}); g.Object.defineProperties(M5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mob){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n \n \n \n
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lob){var d=document.createElement("template");d.innerHTML=""; lob=d}d=lob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mob=a}a=mob;return a}}}); var N5=M5;N5.prototype.onYtServiceRequestError=N5.prototype.onYtServiceRequestError;N5.prototype.onYtServiceRequestSent=N5.prototype.onYtServiceRequestSent;w([P(W.YtActionSenderBehavior),x("design:type",Object)],N5.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],N5.prototype,"data",void 0);w([R(),x("design:type",Object)],N5.prototype,"isError",void 0);w([R(),x("design:type",Object)],N5.prototype,"isLoading",void 0); w([CE("#title-input"),x("design:type",Object)],N5.prototype,"nameInput",void 0);w([BE("data","data.isDefaultProfilePhoto"),x("design:type",Object),x("design:paramtypes",[])],N5.prototype,"photoThumbnail",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],N5.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],N5.prototype,"onYtServiceRequestError",null);N5=w([V({is:"ytd-channel-creation-dialog-renderer"})],N5);var nob;var oob;var O5=function(){return O.apply(this,arguments)||this}; p(O5,O);O5.prototype.configureRendererStamper=function(){return{"data.button":{id:"button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.feedback":{id:"feedback",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(O5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===oob){var a=document.createElement("template");a.innerHTML="
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nob){var d=document.createElement("template");d.innerHTML=""; nob=d}d=nob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);oob=a}a=oob;return a}}}); var P5=O5;w([P(X.YtRendererBehavior),x("design:type",Object)],P5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],P5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P5.prototype,"data",void 0);P5=w([V({is:"ytd-channel-switcher-footer-renderer"})],P5);var pob;var qob;var Q5=function(){var a=O.apply(this,arguments)||this;a.dontAskAgain=!1;a.showPopup=!1;a.boundDontAskAgainChanged=a.dontAskAgainChanged.bind(a);a.boundOnAccountItemTap=a.onAccountItemTap.bind(a);return a}; p(Q5,O);e=Q5.prototype; e.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{accountItemSectionRenderer:{component:"ytd-account-item-section-renderer",properties:{onAccountItemTap:"[[boundOnAccountItemTap]]"}}}},"data.header":{id:"header",mapping:{simpleMenuHeaderRenderer:"ytd-simple-menu-header-renderer"}},"data.footer":{id:"footer",mapping:{channelSwitcherFooterRenderer:"ytd-channel-switcher-footer-renderer",identityPromptFooterRenderer:{component:"ytd-identity-prompt-footer-renderer",properties:{onDontAskAgainChanged:"[[boundDontAskAgainChanged]]"}}}}}}; e.ready=function(){this.$.container.addEventListener("scroll",this.ytRendererBehavior.markDirty.bind(this))}; e.dontAskAgainChanged=function(a){this.dontAskAgain=a}; e.onAccountItemTap=function(a){if(a){var b={};this.dontAskAgain&&(b={dont_ask_again:this.dontAskAgain});SN(a,b)}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(){this.data&&this.redirectOnlyAccount(this.data)}; e.redirectOnlyAccount=function(a){var b,c,d,f;a.sections&&0=(null===(f=null===(d=a.sections[0])||void 0===d?void 0:d.accountItemSectionRenderer)||void 0===f?void 0:f.contents.length)?(a=nl(window.location.href),(null===a||void 0===a?0:a.next)&&rl(a.next)?SN(a.next):SN("/")):this.showPopup=!0}; g.Object.defineProperties(Q5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qob){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pob){var d=document.createElement("template");d.innerHTML=""; pob=d}d=pob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qob=a}a=qob;return a}}}); var R5=Q5;w([P(X.YtRendererBehavior),x("design:type",Object)],R5.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],R5.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],R5.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Boolean)],R5.prototype,"dontAskAgain",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],R5.prototype,"showPopup",void 0); w([R({reflectToAttribute:!1}),x("design:type",Object)],R5.prototype,"boundDontAskAgainChanged",void 0);w([R({reflectToAttribute:!1}),x("design:type",Object)],R5.prototype,"boundOnAccountItemTap",void 0);R5=w([V({is:"ytd-channel-switcher-renderer"})],R5);var rob;var sob;var S5=function(){return O.apply(this,arguments)||this}; p(S5,O);S5.prototype.onIronChange=function(){if(this.checkbox&&this.onDontAskAgainChanged)this.onDontAskAgainChanged(this.checkbox.checked)}; g.Object.defineProperties(S5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sob){var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rob){var d=document.createElement("template");d.innerHTML=""; rob=d}d=rob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sob=a}a=sob;return a}}}); var T5=S5;T5.prototype.onIronChange=T5.prototype.onIronChange;w([R(),x("design:type",Object)],T5.prototype,"data",void 0);w([R({reflectToAttribute:!1}),x("design:type",Function)],T5.prototype,"onDontAskAgainChanged",void 0);w([CE("#checkbox"),x("design:type",Object)],T5.prototype,"checkbox",void 0);w([S("iron-change"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],T5.prototype,"onIronChange",null);T5=w([V({is:"ytd-identity-prompt-footer-renderer"})],T5);var tob;var uob;var U5=function(){var a=O.apply(this,arguments)||this;a.data=null;a.isError=!1;a.isLoading=!1;return a}; p(U5,O);e=U5.prototype;e.configureRendererStamper=function(){return{"data.personalAccountTile.selectButton":{id:"personal-account-tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.brandAccountTile.selectButton":{id:"brand-account-tile-select-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(){this.set("isLoading",!1);this.set("isError",!1)}; e.computeProfileName=function(a){return a?a.givenNameValue+" "+a.familyNameValue:""}; e.onYtServiceRequestSent=function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!0);this.set("data.cancelButton.buttonRenderer.isDisabled",!0);this.set("isLoading",!0);this.set("isError",!1)}; e.onYtServiceRequestError=function(){this.set("data.personalAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.brandAccountTile.selectButton.buttonRenderer.isDisabled",!1);this.set("data.cancelButton.buttonRenderer.isDisabled",!1);this.set("isLoading",!1);this.set("isError",!0)}; g.Object.defineProperties(U5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===uob){var a=document.createElement("template");a.innerHTML="
\n
\n

\n \n \n

\n
\n
\n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n \n
\n
[[profileName]]
\n
\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tob){var d=document.createElement("template");d.innerHTML=""; tob=d}d=tob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);uob=a}a=uob;return a}}}); var V5=U5;V5.prototype.onYtServiceRequestError=V5.prototype.onYtServiceRequestError;V5.prototype.onYtServiceRequestSent=V5.prototype.onYtServiceRequestSent;w([P(Z),x("design:type",Object)],V5.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],V5.prototype,"data",void 0);w([R({computed:"computeProfileName(data.personalAccountTile.contents.createCoreIdentityChannelContentRenderer)"}),x("design:type",String)],V5.prototype,"profileName",void 0); w([R(),x("design:type",Object)],V5.prototype,"isError",void 0);w([R(),x("design:type",Object)],V5.prototype,"isLoading",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],V5.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],V5.prototype,"onYtServiceRequestError",null); V5=w([V({is:"ytd-channel-warm-welcome-cont-renderer"})],V5);var vob;var wob;var W5=function(){var a=O.apply(this,arguments)||this;a.data=null;return a}; p(W5,O);W5.prototype.configureRendererStamper=function(){return{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:"ytd-button-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; W5.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("autofocus")||this.setAttribute("autofocus","true")}; g.Object.defineProperties(W5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===wob){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n
\n

\n \n \n

\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vob){var d=document.createElement("template");d.innerHTML=""; vob=d}d=vob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wob=a}a=wob;return a}}}); var X5=W5;w([P(Z),x("design:type",Object)],X5.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],X5.prototype,"data",void 0);X5=w([V({is:"ytd-channel-warm-welcome-renderer"})],X5);var xob;var yob;var Y5=function(){return O.apply(this,arguments)||this}; p(Y5,O);Y5.prototype.configureRendererStamper=function(){return{"data.doneButton":{id:"done-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; g.Object.defineProperties(Y5,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yob){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n
\n
\n \n
\n
\n
\n [[getSimpleString(data.thankYouMessage)]]\n
\n
\n [[getSimpleString(data.additionalInfo)]]\n
\n
\n
\n
\n
\n \n
\n
\n
\n [[getSimpleString(data.creatorMessage.description)]]\n
\n
\n [[getSimpleString(data.creatorMessage.title)]]\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xob){var d=document.createElement("template");d.innerHTML=""; xob=d}d=xob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yob=a}a=yob;return a}}}); var Z5=Y5;w([P(Z),x("design:type",Object)],Z5.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],Z5.prototype,"ytRendererBehavior",void 0);w([R({}),x("design:type",Object)],Z5.prototype,"data",void 0);Z5=w([V({is:"ytd-donation-post-transaction-renderer"})],Z5);var zob;var Aob;var $5=function(){return O.apply(this,arguments)||this}; p($5,O);e=$5.prototype;e.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{checkboxSurveyOptionRenderer:"ytd-checkbox-survey-option-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged_=function(){for(var a=0;a
\n \n \n \n \n
\n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zob){var d=document.createElement("template");d.innerHTML=""; zob=d}d=zob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aob=a}a=Aob;return a}}}); var a6=$5;a6.prototype.onOptionChange_=a6.prototype.onOptionChange_;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],a6.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],a6.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],a6.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],a6.prototype,"ytRendererBehavior",void 0); w([P(m2a),x("design:type",Object)],a6.prototype,"ytdHatsSurveyBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],a6.prototype,"data",void 0);w([S("ytd-checkbox-survey-option-changed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],a6.prototype,"onOptionChange_",null);a6=w([V({is:"ytd-checkbox-survey-renderer"})],a6);var Bob;var Cob;var b6=function(){return O.apply(this,arguments)||this}; p(b6,O);e=b6.prototype;e.created=function(){this.selectedFeedbackTokens=new Tr}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.configureRendererStamper=function(){return{"data.reasons":{id:"reasons",mapping:{dismissalReasonTextRenderer:"ytd-dismissal-reason-text-renderer",dismissalReasonVideoRenderer:"ytd-dismissal-reason-video-renderer"}}}}; e.dataChanged=function(){this.hasReasonsSelected=!1;this.selectedFeedbackTokens.clear()}; e.onDismissalReasonSelected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.add(b);this.hasReasonsSelected=!0}; e.onDismissalReasonDeselected=function(a,b){this.fire("yt-invalidate-popup-tabbables");this.selectedFeedbackTokens.remove(b);this.hasReasonsSelected=!this.selectedFeedbackTokens.isEmpty()}; e.onCancelTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onSubmitTap=function(){var a={feedback_tokens:this.selectedFeedbackTokens.getValues()};this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitFeedbackEndpoint,a]);this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(b6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cob){var a=document.createElement("template");a.innerHTML="
\n \n \n
\n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bob){var d=document.createElement("template");d.innerHTML=""; Bob=d}d=Bob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cob=a}a=Cob;return a}}}); var c6=b6;c6.prototype.onDismissalReasonDeselected=c6.prototype.onDismissalReasonDeselected;c6.prototype.onDismissalReasonSelected=c6.prototype.onDismissalReasonSelected;c6.prototype.dataChanged=c6.prototype.dataChanged;w([P(Z),x("design:type",Object)],c6.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],c6.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],c6.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],c6.prototype,"data",void 0);w([R(),x("design:type",Boolean)],c6.prototype,"hasReasonsSelected",void 0);w([R(),x("design:type",Tr)],c6.prototype,"selectedFeedbackTokens",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],c6.prototype,"dataChanged",null); w([S("yt-dismissal-reason-selected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,String]),x("design:returntype",void 0)],c6.prototype,"onDismissalReasonSelected",null);w([S("yt-dismissal-reason-deselected"),x("design:type",Function),x("design:paramtypes",[CustomEvent,String]),x("design:returntype",void 0)],c6.prototype,"onDismissalReasonDeselected",null);c6=w([V({is:"ytd-dismissal-follow-up-renderer"})],c6);var Dob;var Eob;var Fob=function(){return O.apply(this,arguments)||this}; p(Fob,O); g.Object.defineProperties(Fob,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Eob){var a=document.createElement("template");a.innerHTML="\n \n\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dob){var d=document.createElement("template");d.innerHTML="";Dob=d}d=Dob;c.call(b,d.content.cloneNode(!0),a.content.firstChild); Eob=a}a=Eob;return a}}}); var d6=Fob;w([P(X.YtRendererBehavior),x("design:type",Object)],d6.prototype,"ytRendererBehavior",void 0);w([P(s1a),x("design:type",Object)],d6.prototype,"ytdDismissalReasonBehavior",void 0);w([R(),x("design:type",Object)],d6.prototype,"data",void 0);d6=w([V({is:"ytd-dismissal-reason-text-renderer"})],d6);var Gob;var Hob;var Iob=function(){return O.apply(this,arguments)||this}; p(Iob,O); g.Object.defineProperties(Iob,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hob){var a=document.createElement("template");a.innerHTML="\n \n \n\n
\n \n
\n \n \n \n \n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gob){var d=document.createElement("template");d.innerHTML=""; Gob=d}d=Gob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hob=a}a=Hob;return a}}}); var e6=Iob;w([P(X.YtRendererBehavior),x("design:type",Object)],e6.prototype,"ytRendererBehavior",void 0);w([P(s1a),x("design:type",Object)],e6.prototype,"ytdDismissalReasonBehavior",void 0);w([R(),x("design:type",Object)],e6.prototype,"data",void 0);e6=w([V({is:"ytd-dismissal-reason-video-renderer"})],e6);var Job;var Kob;var f6=function(){return O.apply(this,arguments)||this}; p(f6,O);f6.prototype.onCheckedChange=function(){this.multiselect||this.fire("yt-feedback-single-select-changed");this.$.freeform.focus();this.fire("yt-refit")}; f6.prototype.showTextBox=function(a,b){return a&&b}; f6.prototype.dataChanged=function(a){a&&(void 0===a.resultText&&this.set("data.resultText",""),void 0===a.checked&&this.set("data.checked",!1),void 0===a.allowFreeTextInput&&this.set("data.allowFreeTextInput",!1))}; g.Object.defineProperties(f6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Kob){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Job){var d=document.createElement("template");d.innerHTML=""; Job=d}d=Job;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Kob=a}a=Kob;return a}}}); var g6=f6;w([P(X.YtRendererBehavior),x("design:type",Object)],g6.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],g6.prototype,"data",void 0);w([R({value:!1}),x("design:type",Boolean)],g6.prototype,"multiselect",void 0);g6=w([V({is:"ytd-feedback-option-renderer"})],g6);var Lob;var Mob;var h6=function(){return O.apply(this,arguments)||this}; p(h6,O);h6.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{feedbackOptionRenderer:{component:"ytd-feedback-option-renderer",properties:{multiselect:"[[data.multiSelect]]"}}}}}}; h6.prototype.onSingleSelectCheckedChanged=function(a){a=Polymer.dom(a).rootTarget;for(var b=0;b
\n [[getSimpleString(data.question)]]\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Lob){var d=document.createElement("template");d.innerHTML=""; Lob=d}d=Lob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Mob=a}a=Mob;return a}}}); var i6=h6;i6.prototype.onSingleSelectCheckedChanged=i6.prototype.onSingleSelectCheckedChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],i6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],i6.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],i6.prototype,"data",void 0); w([S("yt-feedback-single-select-changed"),x("design:type",Function),x("design:paramtypes",[Event]),x("design:returntype",void 0)],i6.prototype,"onSingleSelectCheckedChanged",null);i6=w([V({is:"ytd-feedback-question-renderer"})],i6);var Nob;var Oob;var j6=function(){return O.apply(this,arguments)||this}; p(j6,O);j6.prototype.configureRendererStamper=function(){return{"data.questions":{id:"questions",mapping:{feedbackQuestionRenderer:"ytd-feedback-question-renderer"}}}}; j6.prototype.getSelectedFeedbackResults=function(){for(var a={},b=0;b
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Nob){var d=document.createElement("template");d.innerHTML=""; Nob=d}d=Nob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Oob=a}a=Oob;return a}}}); var k6=j6;w([P(W.YtActionSenderBehavior),x("design:type",Object)],k6.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],k6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],k6.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],k6.prototype,"data",void 0);k6=w([V({is:"ytd-feedback-survey-renderer"})],k6);var Pob;var Qob;var l6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-survey-set-stage-index":"jumpToStage"};return a}; p(l6,O);e=l6.prototype;e.configureRendererStamper=function(){return{currentStage:{id:"current-stage",mapping:{singleSelectQuestionRenderer:"ytd-single-select-question-renderer",simpleMessageRenderer:"ytd-simple-message-renderer"}}}}; e.dataChanged=function(){this.jumpToStage(0)}; e.jumpToStage=function(a){var b,c;null!==(c=null===(b=this.data)||void 0===b?void 0:b.stages)&&void 0!==c&&c[a]&&(this.currentStage=this.data.stages[a],this.refitAfterRender())}; e.computeAlt=function(a){return nL(a)}; e.computeSimpleMessage=function(a){var b;return null===(b=null===a||void 0===a?void 0:a.simpleSurveyMessageRenderer)||void 0===b?void 0:b.messageText}; e.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action");this.ytActionSenderBehavior.sendServiceRequestAction([this.data.dismissalEndpoint])}; e.refitAfterRender=function(){var a=this;Polymer.RenderStatus.afterNextRender(this,function(){a.fire("yt-refit")})}; g.Object.defineProperties(l6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Qob){var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Pob){var d=document.createElement("template");d.innerHTML=""; Pob=d}d=Pob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Qob=a}a=Qob;return a}}}); var m6=l6;m6.prototype.dataChanged=m6.prototype.dataChanged;w([P(W.YtActionSenderBehavior),x("design:type",Object)],m6.prototype,"ytActionSenderBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],m6.prototype,"eventForwardingBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],m6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],m6.prototype,"ytRendererstamperBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],m6.prototype,"ytActionHandlerBehavior",void 0);w([P(m2a),x("design:type",Object)],m6.prototype,"ytdHatsSurveyBehavior",void 0);w([R(),x("design:type",Object)],m6.prototype,"data",void 0);w([R(),x("design:type",Object)],m6.prototype,"currentStage",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m6.prototype,"dataChanged",null);m6=w([V({is:"ytd-multi-stage-survey-renderer"})],m6);var Rob;var Sob;var n6=function(){return O.apply(this,arguments)||this}; p(n6,O);n6.prototype.computeAlt=function(a){return nL(a)}; n6.prototype.submitResponse=function(){var a,b;null!==(a=this.data)&&void 0!==a&&a.feedbackToken&&void 0!==(null===(b=this.data)||void 0===b?void 0:b.nextStageIndex)&&(this.ytActionSenderBehavior.sendOptionalAction("yt-single-select-submit-feedback",[this.data.feedbackToken]),this.ytActionSenderBehavior.sendOptionalAction("yt-survey-set-stage-index",[this.data.nextStageIndex]))}; n6.prototype.onClick=function(){this.submitResponse()}; g.Object.defineProperties(n6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Sob){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rob){var d=document.createElement("template");d.innerHTML=""; Rob=d}d=Rob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Sob=a}a=Sob;return a}}}); var o6=n6;o6.prototype.onClick=o6.prototype.onClick;w([P(X.YtRendererBehavior),x("design:type",Object)],o6.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],o6.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],o6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],o6.prototype,"vertical",void 0); w([S("click"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o6.prototype,"onClick",null);o6=w([V({is:"ytd-single-select-answer-option-renderer"})],o6);var Tob;var Uob;var p6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-single-select-submit-feedback":"submitFeedback"};return a}; p(p6,O);p6.prototype.configureRendererStamper=function(){return{"data.answerOptions":{id:"options",mapping:{singleSelectAnswerOptionRenderer:{component:"ytd-single-select-answer-option-renderer",properties:{vertical:"[[vertical]]"}}}}}}; p6.prototype.dataChanged=function(a){var b;this.vertical="SURVEY_LAYOUT_TYPE_VERTICAL"===(null!==(b=null===a||void 0===a?void 0:a.answerOrientation)&&void 0!==b?b:"SURVEY_LAYOUT_TYPE_HORIZONTAL")}; p6.prototype.submitFeedback=function(a){var b;(null===(b=this.data)||void 0===b?0:b.responseEndpoint)&&a&&this.ytActionSenderBehavior.sendServiceRequestAction([this.data.responseEndpoint,{extra_feedback_tokens:[a]}])}; g.Object.defineProperties(p6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Uob){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tob){var d=document.createElement("template");d.innerHTML=""; Tob=d}d=Tob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Uob=a}a=Uob;return a}}}); var q6=p6;w([P(W.YtActionSenderBehavior),x("design:type",Object)],q6.prototype,"ytActionSenderBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],q6.prototype,"ytActionHandlerBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],q6.prototype,"eventForwardingBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],q6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],q6.prototype,"ytRendererstamperBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],q6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],q6.prototype,"vertical",void 0);q6=w([V({is:"ytd-single-select-question-renderer"})],q6);var Vob;var Wob;var r6=function(){return O.apply(this,arguments)||this}; p(r6,O);r6.prototype.computeAlt=function(a){return nL(a)}; r6.prototype.submitResponse=function(){this.data&&this.data.submissionEndpoint&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submissionEndpoint]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-single-option-survey-renderer"]))}; r6.prototype.onTap=function(){this.vertical&&this.submitResponse()}; g.Object.defineProperties(r6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wob){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vob){var d=document.createElement("template");d.innerHTML=""; Vob=d}d=Vob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wob=a}a=Wob;return a}}}); var s6=r6;s6.prototype.onTap=s6.prototype.onTap;w([P(X.YtRendererBehavior),x("design:type",Object)],s6.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],s6.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],s6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],s6.prototype,"vertical",void 0); w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s6.prototype,"onTap",null);s6=w([V({is:"ytd-single-option-survey-option-renderer"})],s6);var Xob;var Yob;var t6=function(){return O.apply(this,arguments)||this}; p(t6,O);e=t6.prototype;e.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{singleOptionSurveyOptionRenderer:{component:"ytd-single-option-survey-option-renderer",properties:{vertical:"[[vertical]]"}}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(a){this.vertical="VERTICAL"===(a&&a.surveyOrientation&&a.surveyOrientation.type||"HORIZONTAL")}; e.computeAlt=function(a){return nL(a)}; e.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action");this.ytActionSenderBehavior.sendServiceRequestAction([this.data.dismissalEndpoint])}; g.Object.defineProperties(t6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Yob){var a=document.createElement("template");a.innerHTML="
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xob){var d=document.createElement("template");d.innerHTML=""; Xob=d}d=Xob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Yob=a}a=Yob;return a}}}); var u6=t6;w([P(W.YtActionSenderBehavior),x("design:type",Object)],u6.prototype,"ytActionSenderBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],u6.prototype,"eventForwardingBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],u6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],u6.prototype,"ytRendererstamperBehavior",void 0);w([P(m2a),x("design:type",Object)],u6.prototype,"ytdHatsSurveyBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],u6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],u6.prototype,"vertical",void 0);u6=w([V({is:"ytd-single-option-survey-renderer"})],u6);var Zob;var $ob;var v6=function(){return O.apply(this,arguments)||this}; p(v6,O);v6.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; v6.prototype.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; v6.prototype.onNavigate=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(v6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$ob){var a=document.createElement("template");a.innerHTML="
\n \n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zob){var d=document.createElement("template");d.innerHTML=""; Zob=d}d=Zob;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$ob=a}a=$ob;return a}}}); var w6=v6;w6.prototype.onNavigate=w6.prototype.onNavigate;w([P(X.YtRendererBehavior),x("design:type",Object)],w6.prototype,"ytRendererBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],w6.prototype,"ytEventForwardingBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],w6.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],w6.prototype,"data",void 0); w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],w6.prototype,"onNavigate",null);w6=w([V({is:"ytd-survey-follow-up-renderer"})],w6);var apb;var bpb;var x6=function(){return O.apply(this,arguments)||this}; p(x6,O);e=x6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.$.scroller.dialogElement=this.parentNode}; e.dataChanged_=function(){var a=this;this.$.description.value="";this.seconds_=this.minutes_=this.$["full-name"].value="";this.toggleSubmitButton_(!1);this.showTimestamp_&&MM(this).getPlayerPromise().then(function(b){b=b.getCurrentTime();a.minutes_=Math.floor(b/60).toString();a.seconds_=(Math.floor(b)%60).toString()})}; e.onTapSubmit_=function(a){a.stopPropagation();this.serviceEndpoint_&&(a={flag_description:this.descriptionText_.trim(),flag_issue_type:this.issueType_,flag_affiliation:this.affiliation_},this.fullNameText_&&(a.flag_full_name=this.fullNameText_.trim()),this.showTimestamp_&&(a.minutes=this.minutes_,a.seconds=this.seconds_),this.ytActionSenderBehavior.sendServiceRequestAction([this.serviceEndpoint_,a]))}; e.onYtServiceRequestSent_=function(){this.toggleSubmitButton_(!1)}; e.onYtServiceRequestCompleted_=function(a,b){var c;b=b.actions;if(Array.isArray(b))for(var d=0,f=b.length;d

[[getSimpleString(data.title)]]

\n\n \n
\n \n \n \n \n \n
\n \n \n \n \n \n \n
[[getSimpleString(data.nameSubtext)]]
\n
[[getSimpleString(data.footerText)]]
\n
\n
\n
[[getSimpleString(data.requiredLabel)]]
\n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===apb){var d=document.createElement("template");d.innerHTML=""; apb=d}d=apb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bpb=a}a=bpb;return a}}}); var y6=x6;y6.prototype.handleInput_=y6.prototype.handleInput_;y6.prototype.onYtServiceRequestError_=y6.prototype.onYtServiceRequestError_;y6.prototype.onYtServiceRequestCompleted_=y6.prototype.onYtServiceRequestCompleted_;y6.prototype.onYtServiceRequestSent_=y6.prototype.onYtServiceRequestSent_;w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],y6.prototype,"ytOpenPopupBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],y6.prototype,"ytActionHandlerBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],y6.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],y6.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],y6.prototype,"data",void 0);w([R({computed:"computeShowTimestamp_(data.timestampLabel)"}),x("design:type",Boolean)],y6.prototype,"showTimestamp_",void 0); w([R({readOnly:!0,computed:"computeServiceEndpoint_(data)"}),x("design:type",Object)],y6.prototype,"serviceEndpoint_",void 0);w([R({computed:"computeSubmitButton_(data)"}),x("design:type",Object)],y6.prototype,"submitButton_",void 0);w([R(),x("design:type",String)],y6.prototype,"descriptionText_",void 0);w([R(),x("design:type",Number)],y6.prototype,"issueType_",void 0);w([R(),x("design:type",Number)],y6.prototype,"affiliation_",void 0); w([R(),x("design:type",String)],y6.prototype,"fullNameText_",void 0);w([R(),x("design:type",String)],y6.prototype,"minutes_",void 0);w([R(),x("design:type",String)],y6.prototype,"seconds_",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],y6.prototype,"onYtServiceRequestSent_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],y6.prototype,"onYtServiceRequestCompleted_",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],y6.prototype,"onYtServiceRequestError_",null); w([U("descriptionText_","issueType_","affiliation_","fullNameText_","minutes_","seconds_"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y6.prototype,"handleInput_",null);y6=w([V({is:"ytd-legal-report-details-form-renderer"})],y6);var cpb;var dpb;var z6=function(){var a=O.apply(this,arguments)||this;a.polymer2="Element"in Polymer;return a}; p(z6,O);z6.prototype.ready=function(){this.secondsEl.addEventListener("blur",this.formatSeconds.bind(this))}; z6.prototype.secondsChanged=function(){this.secondsEl.focused||this.formatSeconds()}; z6.prototype.formatSeconds=function(){1===this.seconds.length&&(this.seconds="0"+this.seconds)}; g.Object.defineProperties(z6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===dpb){var a=document.createElement("template");a.innerHTML="\n\n : \n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===cpb){var d=document.createElement("template");d.innerHTML=""; cpb=d}d=cpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dpb=a}a=dpb;return a}}}); var A6=z6;A6.prototype.secondsChanged=A6.prototype.secondsChanged;w([R({notify:!0}),x("design:type",String)],A6.prototype,"minutes",void 0);w([R({notify:!0}),x("design:type",String)],A6.prototype,"seconds",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],A6.prototype,"polymer2",void 0);w([CE("#seconds"),x("design:type",Object)],A6.prototype,"secondsEl",void 0); w([U("seconds"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A6.prototype,"secondsChanged",null);A6=w([fO({is:"yt-timestamp-input",noInjection:!0,notifyObserversOnUndefined:!1})],A6);var epb;var fpb;var B6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm","yt-signal-action-submit-popup-form-fields":"handleSignalActionSubmitPopupFormFields"};return a}; p(B6,O);e=B6.prototype;e.configureRendererStamper=function(){return{"data.form":{id:"form",mapping:{formRenderer:"yt-form-renderer"}},"data.buttons":{id:"buttons",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.handleSignalActionSubmitForm=function(){if(this.formRenderer){var a=this.formRenderer.getForm();a&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.submitEndpoint,a]),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"))}}; e.handleSignalActionSubmitPopupFormFields=function(){this.formRenderer&&(this.formRenderer.submitFormFields(),this.ytActionSenderBehavior.sendAction("yt-close-popup-action"))}; e.onPopupClosed=function(){this.formRenderer&&this.formRenderer.reset()}; e.onPopupOpened=function(){this.fire("yt-invalidate-popup-tabbables")}; e.onYtServiceRequestCompleted=function(a,b){b.data&&b.data.success&&(this.set("data.buttons.1.buttonRenderer.isDisabled",!1),this.fire("yt-invalidate-popup-tabbables"))}; g.Object.defineProperties(B6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fpb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===epb){var d=document.createElement("template");d.innerHTML=""; epb=d}d=epb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fpb=a}a=fpb;return a}}}); var C6=B6;C6.prototype.onYtServiceRequestCompleted=C6.prototype.onYtServiceRequestCompleted;C6.prototype.onPopupOpened=C6.prototype.onPopupOpened;C6.prototype.onPopupClosed=C6.prototype.onPopupClosed;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],C6.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],C6.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],C6.prototype,"ytActionSenderBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],C6.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],C6.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],C6.prototype,"data",void 0);w([CE("yt-form-renderer"),x("design:type",f_)],C6.prototype,"formRenderer",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C6.prototype,"onPopupClosed",null); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C6.prototype,"onPopupOpened",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],C6.prototype,"onYtServiceRequestCompleted",null);C6=w([V({is:"ytd-form-popup-renderer"})],C6);var gpb;var hpb;var D6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-share-panel-reset-action":"onReset"};return a}; p(D6,O);D6.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; D6.prototype.configureRendererStamper=function(){return{"data.contacts":{id:"contents",mapping:{enrolledContactRenderer:{component:"yt-enrolled-contact-renderer",attributes:{role:"checkbox"}},suggestedContactRenderer:{component:"yt-suggested-contact-renderer",attributes:{role:"checkbox"}}}}}}; D6.prototype.onDataChanged=function(){this.data&&this.data.selectMessageRenderer&&this.data.selectMessageRenderer.contactSelectMessageRenderer&&this.ytActionSenderBehavior.sendAction("yt-share-panel-set-select-message-renderer-action",[this.data.selectMessageRenderer.contactSelectMessageRenderer])}; D6.prototype.onReset=function(){for(var a=this.$.contents.getElementsByClassName("selected"),b=a.length-1;0<=b;b--)a[b].classList.toggle("selected")}; g.Object.defineProperties(D6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hpb){var a=document.createElement("template");a.innerHTML="\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gpb){var d=document.createElement("template");d.innerHTML=""; gpb=d}d=gpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hpb=a}a=hpb;return a}}}); var E6=D6;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],E6.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],E6.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],E6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],E6.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],E6.prototype,"data",void 0); E6=w([fO({is:"yt-contact-section-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],E6);var ipb;var jpb;var F6=function(){return O.apply(this,arguments)||this}; p(F6,O);F6.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()}; F6.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}; F6.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!1,serialization:a?this.data.serializedContactInvitee:null,undoFn:this.onTap.bind(this)}, this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])}; g.Object.defineProperties(F6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jpb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ipb){var d=document.createElement("template");d.innerHTML=""; ipb=d}d=ipb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jpb=a}a=jpb;return a}}}); var G6=F6;w([P(W.YtActionSenderBehavior),x("design:type",Object)],G6.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],G6.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],G6.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),x("design:type",String)],G6.prototype,"componentTitle",void 0);w([CE("#thumbnail"),x("design:type",Object)],G6.prototype,"thumbnail",void 0); G6=w([fO({is:"yt-enrolled-contact-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],G6);var kpb;var lpb;var H6=function(){return O.apply(this,arguments)||this}; p(H6,O);H6.prototype.onDataChanged=function(){if(this.thumbnail)this.thumbnail.onShow()}; H6.prototype.onFocus=function(){"none"===this.getComputedStyleValue("pointer-events")?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}; H6.prototype.onTap=function(a){if(this.classList.contains("selected")||this.ytActionSenderBehavior.sendSingletonAction("yt-share-panel-can-select-contact-action"))a&&a.detail&&(a.detail.x||a.detail.y)&&this.$.target.blur(),(a=this.classList.toggle("selected"))?this.setAttribute("aria-checked","true"):this.removeAttribute("aria-checked"),a={name:this.componentTitle,id:this.data.contactId,isGroup:!1,isSuggested:!0,serialization:a?this.data.serializedSuggestedContact:null,undoFn:this.onTap.bind(this)}, this.ytActionSenderBehavior.sendAction("yt-share-panel-select-contact-action",[a])}; g.Object.defineProperties(H6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lpb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===kpb){var d=document.createElement("template");d.innerHTML=""; kpb=d}d=kpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lpb=a}a=lpb;return a}}}); var I6=H6;w([P(W.YtActionSenderBehavior),x("design:type",Object)],I6.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],I6.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],I6.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"getSimpleString(data.name)"}),x("design:type",String)],I6.prototype,"componentTitle",void 0);w([CE("#thumbnail"),x("design:type",Object)],I6.prototype,"thumbnail",void 0); I6=w([fO({is:"yt-suggested-contact-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],I6);var mpb;var npb;var J6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(J6,O);e=J6.prototype;e.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.linkButton":{id:"link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable&&(this.scrollable.dialogElement=this.parentNode);QLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.closeDialog()}; e.onYtServiceRequestError=function(a){this.closeDialog();this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; e.closeDialog=function(){this.isLoading=!1;this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-connect-gpg-dialog-renderer"])}; g.Object.defineProperties(J6.prototype,{hasDescription:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||!this.data.description)}}}); g.Object.defineProperties(J6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===npb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mpb){var d=document.createElement("template");d.innerHTML=""; mpb=d}d=mpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);npb=a}a=npb;return a}}}); var K6=J6;K6.prototype.onDomChange=K6.prototype.onDomChange;K6.prototype.onYtServiceRequestError=K6.prototype.onYtServiceRequestError;K6.prototype.onYtServiceRequestCompleted=K6.prototype.onYtServiceRequestCompleted;K6.prototype.onYtServiceRequestSent=K6.prototype.onYtServiceRequestSent;w([P(Z),x("design:type",Object)],K6.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],K6.prototype,"ytRendererBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],K6.prototype,"ytActionSenderBehavior",void 0);w([P($V),x("design:type",Object)],K6.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],K6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],K6.prototype,"isLoading",void 0);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],K6.prototype,"hasDescription",null); w([CE("paper-dialog-scrollable"),x("design:type",Object)],K6.prototype,"scrollable",void 0);w([CE("#header"),x("design:type",HTMLElement)],K6.prototype,"header",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onYtServiceRequestError",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],K6.prototype,"onDomChange",null); K6=w([V({is:"ytd-connect-gpg-dialog-renderer"})],K6);var opb;var ppb;var L6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(L6,O);e=L6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");QLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-account-link-confirm-dialog-renderer"])}; e.fireOnCloseActions=function(){this.isLoading=!1;this.data&&this.data.onClosedActions&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onClosedActions,this)}; e.closePopupHandler=function(){this.fireOnCloseActions()}; e.onHeaderImageChanged=function(){if(this.data){this.data.headerImage?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image");var a=this.get("data.headerImage.thumbnails");a&&(a=wO(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")")}}; e.onYtNavigate=function(a){(a=Polymer.dom(a).rootTarget)&&a.parentElement===this.$["confirm-button"]&&this.parentElement&&this.parentElement.close()}; g.Object.defineProperties(L6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===ppb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n
\n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===opb){var d=document.createElement("template");d.innerHTML=""; opb=d}d=opb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);ppb=a}a=ppb;return a}}}); var M6=L6;M6.prototype.onYtNavigate=M6.prototype.onYtNavigate;M6.prototype.onHeaderImageChanged=M6.prototype.onHeaderImageChanged;M6.prototype.closePopupHandler=M6.prototype.closePopupHandler;M6.prototype.onYtServiceRequestCompleted=M6.prototype.onYtServiceRequestCompleted;M6.prototype.onYtServiceRequestSent=M6.prototype.onYtServiceRequestSent;w([P(W.YtActionSenderBehavior),x("design:type",Object)],M6.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],M6.prototype,"ytRendererBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],M6.prototype,"ytEventForwardingBehavior",void 0);w([R(),x("design:type",Object)],M6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],M6.prototype,"isLoading",void 0); w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],M6.prototype,"onYtServiceRequestSent",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],M6.prototype,"onYtServiceRequestCompleted",null); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],M6.prototype,"closePopupHandler",null);w([U("data.headerImage"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],M6.prototype,"onHeaderImageChanged",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],M6.prototype,"onYtNavigate",null); M6=w([V({is:"ytd-gaming-account-link-confirm-dialog-renderer"})],M6);var qpb;var rpb;var N6=function(){var a=O.apply(this,arguments)||this;a.isLoading=!1;return a}; p(N6,O);e=N6.prototype;e.configureRendererStamper=function(){return{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.linkButton":{id:"link-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable&&(this.scrollable.dialogElement=this.parentNode);QLa(this)}; e.onYtServiceRequestSent=function(){this.isLoading=!0}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-gaming-account-link-setting-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onDomChange=function(){this.ytRendererBehavior.markDirty()}; e.onDataChanged=function(){this.isLoading=!1;var a=this.get("data.headerImage.thumbnails");a&&(a=wO(a,this.clientWidth),this.header.style.backgroundImage="url("+a+")");a=Tn();var b=Sn(),c=this.get("data.trackingParams");c&&b&&a&&yJ(a,b,Nn(c))}; g.Object.defineProperties(N6.prototype,{hasDescription:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||!this.data.descriptions)}}}); g.Object.defineProperties(N6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===rpb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qpb){var d=document.createElement("template");d.innerHTML=""; qpb=d}d=qpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);rpb=a}a=rpb;return a}}}); var O6=N6;O6.prototype.onDataChanged=O6.prototype.onDataChanged;O6.prototype.onDomChange=O6.prototype.onDomChange;O6.prototype.onYtServiceRequestError=O6.prototype.onYtServiceRequestError;O6.prototype.onYtServiceRequestCompleted=O6.prototype.onYtServiceRequestCompleted;O6.prototype.onYtServiceRequestSent=O6.prototype.onYtServiceRequestSent;w([P(Z),x("design:type",Object)],O6.prototype,"ytRendererstamperBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],O6.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],O6.prototype,"ytActionSenderBehavior",void 0);w([P($V),x("design:type",Object)],O6.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],O6.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],O6.prototype,"isLoading",void 0); w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],O6.prototype,"hasDescription",null);w([CE("paper-dialog-scrollable"),x("design:type",Object)],O6.prototype,"scrollable",void 0);w([CE("#header"),x("design:type",HTMLElement)],O6.prototype,"header",void 0);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],O6.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],O6.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],O6.prototype,"onYtServiceRequestError",null);w([S("dom-change"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],O6.prototype,"onDomChange",null); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],O6.prototype,"onDataChanged",null);O6=w([V({is:"ytd-gaming-account-link-setting-renderer"})],O6);var spb;var tpb;var P6=function(){return O.apply(this,arguments)||this}; p(P6,O);e=P6.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("role")||this.setAttribute("role","dialog");this.hasAttribute("aria-modal")||this.setAttribute("aria-modal","true")}; e.ready=function(){var a=Tn(),b=Sn(),c=this.data.trackingParams;c&&b&&a&&yJ(a,b,Nn(c))}; e.getParentElement=function(a){var b=this.ytRendererBehavior.parentComponent;return b&&b.querySelector(a)}; e.openPopupHandler=function(a){var b=this;a.currentTarget===this&&(Gi(function(){b.focus()}),(a=this.getParentElement("#content"))&&a.setAttribute("aria-hidden","true"))}; e.closeDialog=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-queue-to-play-dialog-renderer"])}; e.onPopupClosed=function(a){a.currentTarget===this&&(a=this.getParentElement("#content"),this.getParentElement("ytd-queue-to-play-state-renderer"),a&&(a.setAttribute("aria-hidden","false"),this.actionSenderBehavior.sendAction("yt-focus-queue-to-play-state-renderer")))}; g.Object.defineProperties(P6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===tpb){var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.title)]]

\n
\n \n
\n
    \n \n
\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===spb){var d=document.createElement("template");d.innerHTML=""; spb=d}d=spb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);tpb=a}a=tpb;return a}}}); var Q6=P6;Q6.prototype.onPopupClosed=Q6.prototype.onPopupClosed;Q6.prototype.openPopupHandler=Q6.prototype.openPopupHandler;w([P(X.YtRendererBehavior),x("design:type",Object)],Q6.prototype,"ytRendererBehavior",void 0);w([P([W.YtActionSenderBehavior]),x("design:type",Object)],Q6.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],Q6.prototype,"data",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],Q6.prototype,"openPopupHandler",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],Q6.prototype,"onPopupClosed",null);Q6=w([V({is:"ytd-queue-to-play-dialog-renderer"})],Q6);var upb;var vpb;Polymer({is:"yt-confirm-dialog-renderer",_template:function(){if(void 0!==vpb)return vpb;var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===upb){var d=document.createElement("template");d.innerHTML=""; upb=d}d=upb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return vpb=a}, hostAttributes:{dialog:!0},properties:{data:Object,primaryIsCancel:{type:Object,computed:"computePrimaryIsCancel_(data.primaryIsCancel)",reflectToAttribute:!0,readOnly:!0},isCancelButtonHidden:{type:Object,computed:"computeIsCancelButtonHidden_(data)",readOnly:!0},useOverlayForSpinner_:{type:Boolean,value:!1,computed:"computeUseOverlayForSpinner_(data.showLoadingSpinnerOnAction, isActionInProgress_)",reflectToAttribute:!0},showSpinner_:{type:Boolean,value:!1,computed:"computeShowSpinner_(useOverlayForSpinner_, data.showLoadingSpinner)"}, isActionInProgress_:{type:Boolean,value:!1}},observers:["onHeaderImageChanged_(data.headerImage)","onThumbnailChanged_(data.thumbnail)"],behaviors:[X.YtRendererBehavior,OP.YtEventForwardingBehavior],listeners:{"yt-img-shadow-loaded":"onThumbnailLoaded_","yt-navigate":"onYtNavigate_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_","yt-service-request-sent":"onYtServiceRequestSent_","yt-service-request-completed":"onYtServiceRequestCompleted_"},attached:function(){var a= this;this.$.scroller.dialogElement=this.parentNode;window.requestAnimationFrame(function(){a.$.thumbnail.onShow()})}, computeUseOverlayForSpinner_:function(a,b){return!!a&&b}, computeShowSpinner_:function(a,b){return a||!!b}, fireOnCloseActions_:function(){this.data.onClosedActions&&this.sendInnerTubeActions(this.data.onClosedActions,this)}, fireOnOpenCommands_:function(a){this.data.onOpenCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onOpenCommands,this))}, fireOnDismissCommands_:function(a){this.data.onDismissCommands&&(a.stopImmediatePropagation(),this.sendInnerTubeActions(this.data.onDismissCommands,this))}, openPopupHandler_:function(a){a.detail==this&&this.fireOnOpenCommands_(a)}, closePopupHandler_:function(a,b){this.sendOptionalAction("yt-confirm-dialog-close-action",[b]);this.fireOnCloseActions_();(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.fireOnDismissCommands_(a)}, onHeaderImageChanged_:function(a){a?this.setAttribute("dialog-with-header-image",""):this.removeAttribute("dialog-with-header-image")}, onThumbnailChanged_:function(a){a?(this.setAttribute("dialog-with-thumbnail",""),this.$.scroller.scrollTarget.style.maxHeight="139px"):(this.removeAttribute("dialog-with-thumbnail"),this.$.scroller.scrollTarget.style.maxHeight="none")}, onYtNavigate_:function(a){a=Polymer.dom(a).rootTarget;Polymer.dom(this.$["confirm-button"]).deepContains(a)&&this.parentElement.close()}, computePrimaryIsCancel_:function(a){return a}, computeIsCancelButtonHidden_:function(a){return a.skipCancelButton||!a.cancelButton}, onThumbnailLoaded_:function(){this.parentElement&&this.parentElement.fit()}, onYtServiceRequestSent_:function(){this.isActionInProgress_=!0}, onYtServiceRequestCompleted_:function(){this.data.showLoadingSpinnerOnAction&&this.parentElement&&this.parentElement.close&&this.parentElement.opened&&this.parentElement.close();this.isActionInProgress_=!1}});var wpb;var xpb;var R6=function(){var a=O.apply(this,arguments)||this;a.userToggled_=!1;return a}; p(R6,O);e=R6.prototype;e.getItemsPath=function(){return"data.expandableItems"}; e.configureRendererStamper=function(){return{shownItems:{id:"expandable-items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0}}}}}; e.onExpanderItemTapped_=function(a){this._setExpanded(!0);this.userToggled_=!0;this.ytLazyListBehavior.fillRemainingListItems();a.preventDefault()}; e.onCollapserItemTapped_=function(a){this._setExpanded(!1);this.userToggled_=!0;a.preventDefault()}; e.observeActiveEndpoint_=function(){for(var a=this.activeEndpoint,b=this.data,c=this.$["expandable-items"].children,d=0,f=c.length;d\n\n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wpb){var d=document.createElement("template");d.innerHTML=""; wpb=d}d=wpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);xpb=a}a=xpb;return a}}}); var S6=R6;S6.prototype.observeActiveEndpoint_=S6.prototype.observeActiveEndpoint_;w([P(X.YtRendererBehavior),x("design:type",Object)],S6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],S6.prototype,"ytRendererstamperBehavior",void 0);w([P(HQ),x("design:type",Object)],S6.prototype,"ytLazyListBehavior",void 0);w([R(),x("design:type",Object)],S6.prototype,"data",void 0);w([R({readOnly:!0,reflectToAttribute:!0}),x("design:type",Boolean)],S6.prototype,"expanded",void 0); w([R({value:0}),x("design:type",Number)],S6.prototype,"initialCount",void 0);w([R(),x("design:type",Object)],S6.prototype,"activeEndpoint",void 0);w([U("data","activeEndpoint","canShowMore"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],S6.prototype,"observeActiveEndpoint_",null);S6=w([V({is:"ytd-guide-collapsible-entry-renderer"})],S6);var ypb;var zpb;var T6=function(){return O.apply(this,arguments)||this}; p(T6,O);e=T6.prototype;e.prepareSubsHintActions=function(){if(N("kevlar_mysubs_edu")&&this.active&&this.guideOpened){var a=this.componentBehavior.getInterfaceForTs("ytd-page-manager");a&&(a=a.getCurrentPage())&&"filteredsubscriptions"===a.pageSubtype&&this.set("data.targetId","subs-filtered-by-channel")}}; e.triggerHintActions=function(){var a=this;this.data&&this.data.hintActions&&Ck(this.taskEmitterBehavior.getTaskManager(),function(){var b=a.actionSenderBehavior.sendOptionalAction("yt-get-opened-popups-action");!(b&&1===b.length?b[0]:[]).some(function(c){c=c.openPopupAction.popupType;return"SURVEY"===c||"MEALBAR"===c||"HINT"===c})&&a.data.hintActions&&a.guideOpened&&(a.actionSenderBehavior.sendInnerTubeActions(a.data.hintActions,a),a.data.hintActions=void 0)})}; e.prepareHintActions=function(){if(!N("kevlar_nitrate_driven_tooltips")&&this.data.targetId){var a=this.data.targetId;a&&(a=yM(a))&&this.set("data.hintActions",a)}}; e.getIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; e.getBadgeIconType=function(a){return a&&a.liveBroadcasting?"live":null}; e.onTap=function(a){this.data.serviceEndpoint?(this.actionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint]),a.preventDefault()):this.data.navigationEndpoint&&!NR(Polymer.dom(a).path||[],this,["A".toString()])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}; e.computeActive=function(a,b){var c,d,f,h;if(!a||!b)return!1;if(a.browseEndpoint&&b.browseEndpoint)return a=a.browseEndpoint.browseId,b=b.browseEndpoint.browseId,void 0!==a&&void 0!==b&&(a===b||"VLWL"===a&&"FEwatch_later"===b||"FEwatch_later"===a&&"VLWL"===b);a=null===(d=null===(c=a.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d?void 0:d.url;b=null===(h=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===h?void 0:h.url;return!(!a||!b||a!==b&&a!== Bd(b))}; e.computeIsPrimary=function(a){return!!a}; g.Object.defineProperties(T6.prototype,{active:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.computeActive(this.data.navigationEndpoint,this.activeEndpoint)}}, isPrimary:{configurable:!0,enumerable:!0,get:function(){return this.computeIsPrimary(this.data.isPrimary)}}, lineEndStyle:{configurable:!0,enumerable:!0,get:function(){return this.data?this.data.badges&&this.getBadgeIconType(this.data.badges)?"badge":"GUIDE_ENTRY_PRESENTATION_STYLE_NEW_CONTENT"===this.data.presentationStyle?"dot":this.data.count?"count":"none":"none"}}, ariaLabel:{configurable:!0,enumerable:!0,get:function(){var a=this.get("data.accessibility.accessibilityData.label");if("none"!==this.lineEndStyle&&a)return a}}, ariaSelected:{configurable:!0,enumerable:!0,get:function(){return this.active.toString()}}}); g.Object.defineProperties(T6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===zpb){var a=document.createElement("template");a.innerHTML="\n \n \n \n \n \n [[data.count]]\n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ypb){var d=document.createElement("template");d.innerHTML=""; ypb=d}d=ypb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);zpb=a}a=zpb;return a}}}); var U6=T6;U6.prototype.onTap=U6.prototype.onTap;U6.prototype.prepareHintActions=U6.prototype.prepareHintActions;U6.prototype.triggerHintActions=U6.prototype.triggerHintActions;U6.prototype.prepareSubsHintActions=U6.prototype.prepareSubsHintActions;w([P(kO.YtComponentBehavior),x("design:type",Object)],U6.prototype,"componentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],U6.prototype,"rendererBehavior",void 0); w([P(yO.YtTaskEmitterBehavior),x("design:type",Object)],U6.prototype,"taskEmitterBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],U6.prototype,"actionSenderBehavior",void 0);w([R(),x("design:type",Object)],U6.prototype,"activeEndpoint",void 0);w([R(),x("design:type",Object)],U6.prototype,"data",void 0);w([R(),x("design:type",Boolean)],U6.prototype,"guideOpened",void 0);w([R(),x("design:type",String)],U6.prototype,"type",void 0); w([R({reflectToAttribute:!0}),BE("data","activeEndpoint"),x("design:type",Boolean),x("design:paramtypes",[])],U6.prototype,"active",null);w([R({reflectToAttribute:!0}),BE("data"),x("design:type",Boolean),x("design:paramtypes",[])],U6.prototype,"isPrimary",null);w([R({reflectToAttribute:!0}),BE("data.count","data.presentationStyle","data.badges.*"),x("design:type",String),x("design:paramtypes",[])],U6.prototype,"lineEndStyle",null); w([BE("lineEndStyle"),x("design:type",Object),x("design:paramtypes",[])],U6.prototype,"ariaLabel",null);w([BE("active"),x("design:type",Object),x("design:paramtypes",[])],U6.prototype,"ariaSelected",null);w([U("active","guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],U6.prototype,"prepareSubsHintActions",null); w([U("data.hintActions","guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],U6.prototype,"triggerHintActions",null);w([U("data.targetId"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],U6.prototype,"prepareHintActions",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],U6.prototype,"onTap",null); U6=w([fO({is:"ytd-guide-entry-renderer",notifyObserversOnUndefined:!0,noInjection:!0})],U6);var Apb;var Bpb;var V6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-add-to-guide-section-action":"handleAddToGuideSectionAction","yt-remove-from-guide-section-action":"handleRemoveFromGuideSectionAction"};return a}; p(V6,O);e=V6.prototype;e.attached=function(){this.actionHandlerBehavior.actionMap=this.actionMap}; e.configureRendererStamper=function(){return{"data.sectionItems":{id:"section-items",mapping:{guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}},guideEntryRenderer:{component:"ytd-guide-entry-renderer",noInjection:!0,properties:{activeEndpoint:"[[activeEndpoint]]"}}}}}}; e.activeEndpointChanged=function(){if(this.activeEndpoint){this.headerEntry.activeEndpoint=this.activeEndpoint;for(var a=this.sectionItems.children,b=0,c=a.length;b
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Apb){var d=document.createElement("template");d.innerHTML=""; Apb=d}d=Apb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Bpb=a}a=Bpb;return a}}}); var W6=V6;W6.prototype.activeEndpointChanged=W6.prototype.activeEndpointChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],W6.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],W6.prototype,"actionHandlerBehavior",void 0);w([P(Z),x("design:type",Object)],W6.prototype,"ytRendererstamperBehavior",void 0);w([CE("#section-items"),x("design:type",HTMLDivElement)],W6.prototype,"sectionItems",void 0); w([CE("#header-entry"),x("design:type",U6)],W6.prototype,"headerEntry",void 0);w([R(),x("design:type",Object)],W6.prototype,"data",void 0);w([R(),x("design:type",Object)],W6.prototype,"activeEndpoint",void 0);w([U("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W6.prototype,"activeEndpointChanged",null);W6=w([V({is:"ytd-guide-collapsible-section-entry-renderer"})],W6);var Cpb;var Dpb;var X6=function(){var a=O.apply(this,arguments)||this;a.showFooter_=!1;return a}; p(X6,O);X6.prototype.configureRendererStamper=function(){return{shownItems:{id:"sections",mapping:{guideSectionRenderer:{component:"ytd-guide-section-renderer",noInjection:!0},guideSigninPromoRenderer:{component:"ytd-guide-signin-promo-renderer",noInjection:!0},guideSubscriptionsSectionRenderer:{component:"ytd-guide-section-renderer",params:{type:"subscriptions"},noInjection:!0}}}}}; X6.prototype.attached=function(){return Za(this,function b(){var c=this,d;return za(b,function(f){if(1==f.nextAddress)return(d=c.ytComponentBehavior.getInterfaceForTs("yt-guide-manager"))?q(f,d.setGuideData(c),3):f.jumpTo(0);c.ytLazyListBehavior.initialCount=2;return f.return()})})}; X6.prototype.dataChanged_=function(){this.data&&(this.showFooter_=!0)}; g.Object.defineProperties(X6,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Dpb){var a=document.createElement("template");a.innerHTML="
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Cpb){var d=document.createElement("template");d.innerHTML=""; Cpb=d}d=Cpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Dpb=a}a=Dpb;return a}}}); var Y6=X6;w([P(X.YtRendererBehavior),x("design:type",Object)],Y6.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],Y6.prototype,"ytComponentBehavior",void 0);w([P(HQ),x("design:type",Object)],Y6.prototype,"ytLazyListBehavior",void 0);w([P(Z),x("design:type",Object)],Y6.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],Y6.prototype,"data",void 0); w([R(),x("design:type",Object)],Y6.prototype,"showFooter_",void 0);w([R({value:!0}),x("design:type",Boolean)],Y6.prototype,"autoFill",void 0);Y6=w([V({is:"ytd-guide-renderer"})],Y6);var Epb;var Fpb;var Z6=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-add-to-guide-section-action":"handleAddToGuideSectionAction_","yt-remove-from-guide-section-action":"handleRemoveFromGuideSectionAction_","yt-reset-channel-unread-count-command":"handleResetChannelUnreadCountCommand_"};return a}; p(Z6,O);e=Z6.prototype; e.configureRendererStamper=function(){return{shownItems:{id:"items",mapping:{guideEntryRenderer:{component:"ytd-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",guideOpened:"[[guideOpened]]",type:"[[type]]"},noInjection:!0},guideCollapsibleEntryRenderer:{component:"ytd-guide-collapsible-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"},noInjection:!0},guideCollapsibleSectionEntryRenderer:{component:"ytd-guide-collapsible-section-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]"}, noInjection:!0}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.observeForEdu_=function(){if(N("kevlar_mysubs_edu")&&"subscriptions"==this.type&&this.data){var a=this.ytComponentBehavior.getInterfaceForTs("ytd-page-manager");a&&(a=(a=a.getCurrentPage())?a.pageSubtype:null,N("kevlar_mysubs_single_guide_section")&&"home"==a&&this.setEduTarget_(0,"subs-guide-item"))}}; e.setEduTarget_=function(a,b){this.data.items&&this.data.items.length>a&&this.data.items[a].guideEntryRenderer&&this.set("data.items."+a+".guideEntryRenderer.targetId",b)}; e.persistentGuideChanged_=function(){if(!this.ytdGuideStateAwareBehavior.guidePersistentAndVisible){var a=this.ytActionSenderBehavior.sendOptionalAction("yt-get-popup-opened-action",["yt-bubble-hint-renderer"]);a&&1==a.length&&a[0]&&this.ytActionSenderBehavior.sendOptionalAction("yt-close-popup-action",["yt-bubble-hint-renderer"])}}; e.handleResetChannelUnreadCountCommand_=function(a){a.resetChannelUnreadCountCommand&&a.resetChannelUnreadCountCommand.channelId&&this.data&&this.data.items&&(a=this.getPathToEntryMatchingId_(a.resetChannelUnreadCountCommand.channelId))&&(this.set(a+".guideEntryRenderer.count",0),this.set(a+".guideEntryRenderer.presentationStyle","GUIDE_ENTRY_PRESENTATION_STYLE_NONE"))}; e.getPathToEntryMatchingId_=function(a){if(this.data&&this.data.items){var b=this.getEntryIndexMatchingId_(a,this.data.items);if(-1\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Epb){var d=document.createElement("template");d.innerHTML=""; Epb=d}d=Epb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Fpb=a}a=Fpb;return a}}}); var $6=Z6;$6.prototype.guideOpenedChanged_=$6.prototype.guideOpenedChanged_;$6.prototype.activeEndpointChanged_=$6.prototype.activeEndpointChanged_;$6.prototype.persistentGuideChanged_=$6.prototype.persistentGuideChanged_;$6.prototype.observeForEdu_=$6.prototype.observeForEdu_;w([P(X.YtRendererBehavior),x("design:type",Object)],$6.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],$6.prototype,"ytRendererstamperBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],$6.prototype,"ytActionHandlerBehavior",void 0);w([P(HQ),x("design:type",Object)],$6.prototype,"ytLazyListBehavior",void 0);w([P(xQ),x("design:type",Object)],$6.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],$6.prototype,"ytActionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],$6.prototype,"ytComponentBehavior",void 0); w([R(),x("design:type",Object)],$6.prototype,"data",void 0);w([R(),x("design:type",String)],$6.prototype,"type",void 0);w([R({value:20}),x("design:type",Number)],$6.prototype,"initialCount",void 0);w([R({value:10}),x("design:type",Number)],$6.prototype,"targetFramerate",void 0);w([R({value:!0}),x("design:type",Boolean)],$6.prototype,"autoFill",void 0);w([R({value:50}),x("design:type",Number)],$6.prototype,"renderDelay",void 0); w([U("data","activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"observeForEdu_",null);w([U("guidePersistentAndVisible"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"persistentGuideChanged_",null);w([U("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"activeEndpointChanged_",null); w([U("guideOpened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$6.prototype,"guideOpenedChanged_",null);$6=w([V({is:"ytd-guide-section-renderer"})],$6);var Gpb;var Hpb;var a7=function(){return O.apply(this,arguments)||this}; p(a7,O);a7.prototype.onSignInTap=function(){var a=this.ytComponentBehavior.getInterface({});a&&a.signIn()}; g.Object.defineProperties(a7.prototype,{alignByText:{configurable:!0,enumerable:!0,get:function(){return"STYLE_BLUE_TEXT"===this.get("data.signInButton.buttonRenderer.style")}}}); g.Object.defineProperties(a7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Hpb){var a=document.createElement("template");a.innerHTML="\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Gpb){var d=document.createElement("template");d.innerHTML=""; Gpb=d}d=Gpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Hpb=a}a=Hpb;return a}}}); var b7=a7;w([P(X.YtRendererBehavior),x("design:type",Object)],b7.prototype,"rendererBehaviors",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],b7.prototype,"ytComponentBehavior",void 0);w([R(),x("design:type",Object)],b7.prototype,"data",void 0);w([R(),BE("data.signInButton.buttonRenderer.style"),x("design:type",Object),x("design:paramtypes",[])],b7.prototype,"alignByText",null);b7=w([V({is:"ytd-guide-signin-promo-renderer"})],b7);var Ipb;var Jpb;var c7=function(){return O.apply(this,arguments)||this}; p(c7,O);e=c7.prototype;e.attached=function(){this.setAttribute("role","tab");this.setAttribute("tabindex","0")}; e.dataChanged=function(){this.setAttribute("aria-selected",""+this.active);this.setAttribute("aria-label",""+this.ytRendererBehavior.getSimpleString(this.data.formattedTitle))}; e.onActiveStateChange=function(){this.setAttribute("aria-selected",""+this.active)}; e.onTap=function(a){var b;(null===(b=this.data)||void 0===b?0:b.navigationEndpoint)&&!NR(Polymer.dom(a).path||[],this,["A".toString()])&&this.fire("yt-navigate",{endpoint:this.data.navigationEndpoint})}; e.computeActive=function(a,b){var c,d,f,h;if(!a||!b)return!1;if(a.browseEndpoint&&b.browseEndpoint)return a.browseEndpoint.browseId===b.browseEndpoint.browseId&&a.browseEndpoint.params===b.browseEndpoint.params;a=null===(d=null===(c=a.commandMetadata)||void 0===c?void 0:c.webCommandMetadata)||void 0===d?void 0:d.url;b=null===(h=null===(f=b.commandMetadata)||void 0===f?void 0:f.webCommandMetadata)||void 0===h?void 0:h.url;return!(!a||!b||a!==b&&a!==Bd(b))}; e.computeTitle=function(a,b){return b?"":this.ytRendererBehavior.getSimpleString(a)}; g.Object.defineProperties(c7.prototype,{ariaSelected:{configurable:!0,enumerable:!0,get:function(){if(void 0!==this.active)return this.active.toString()}}}); g.Object.defineProperties(c7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jpb){var a=document.createElement("template");a.innerHTML="\n \n \n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Ipb){var d=document.createElement("template");d.innerHTML=""; Ipb=d}d=Ipb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jpb=a}a=Jpb;return a}}}); var d7=c7;d7.prototype.onTap=d7.prototype.onTap;d7.prototype.onActiveStateChange=d7.prototype.onActiveStateChange;d7.prototype.dataChanged=d7.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],d7.prototype,"ytRendererBehavior",void 0);w([P(dI),x("design:type",Object)],d7.prototype,"ironButtonState",void 0);w([R(),x("design:type",Object)],d7.prototype,"data",void 0);w([R(),x("design:type",Object)],d7.prototype,"activeEndpoint",void 0); w([R({reflectToAttribute:!0}),x("design:type",Boolean)],d7.prototype,"noLabels",void 0);w([R({reflectToAttribute:!0,computed:"computeActive(data.navigationEndpoint,activeEndpoint)"}),x("design:type",Boolean)],d7.prototype,"active",void 0);w([BE("active"),x("design:type",Object),x("design:paramtypes",[])],d7.prototype,"ariaSelected",null);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],d7.prototype,"dataChanged",null); w([U("active"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],d7.prototype,"onActiveStateChange",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],d7.prototype,"onTap",null);d7=w([V({is:"ytd-mini-guide-entry-renderer"})],d7);var Kpb;var Lpb;var e7=function(){var a=O.apply(this,arguments)||this;a.noLabels_=N("kevlar_mini_guide_no_labels");return a}; p(e7,O);e=e7.prototype;e.configureRendererStamper=function(){return{miniGuideItems_:{id:"items",mapping:{guideEntryRenderer:{component:"ytd-mini-guide-entry-renderer",properties:{activeEndpoint:"[[activeEndpoint]]",noLabels:"[[noLabels_]]"},noInjection:!0}}}}}; e.attached=function(){this.hasAttribute("role")||this.setAttribute("role","navigation")}; e.visibleChanged_=function(a){a&&!this.data&&(a=this.ytComponentBehavior.getInterfaceForTs("yt-guide-manager"))&&a.setGuideData(this)}; e.dataChanged=function(){var a,b=[];null!==(a=this.data)&&void 0!==a&&a.items&&this.data.items.forEach(function(c){var d,f;null===(f=null===(d=c.guideSectionRenderer)||void 0===d?void 0:d.items)||void 0===f?void 0:f.forEach(function(h){var l,m;h.guideEntryRenderer?(h=h.guideEntryRenderer,h.isPrimary&&b.push({guideEntryRenderer:h})):h.guideCollapsibleSectionEntryRenderer&&((null===(m=null===(l=h.guideCollapsibleSectionEntryRenderer.headerEntry)||void 0===l?void 0:l.guideEntryRenderer)||void 0===m? 0:m.isPrimary)&&b.push({guideEntryRenderer:h.guideCollapsibleSectionEntryRenderer.headerEntry.guideEntryRenderer}),(h=h.guideCollapsibleSectionEntryRenderer.sectionItems)&&h.forEach(function(n){var r;(null===(r=n.guideEntryRenderer)||void 0===r?0:r.isPrimary)&&b.push({guideEntryRenderer:n.guideEntryRenderer})}))})}); this.miniGuideItems_=b}; e.activeEndpointChanged_=function(){for(var a=this.$.items.children,b=0;b
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kpb){var d=document.createElement("template");d.innerHTML=""; Kpb=d}d=Kpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lpb=a}a=Lpb;return a}}}); var f7=e7;f7.prototype.activeEndpointChanged_=f7.prototype.activeEndpointChanged_;w([P(X.YtRendererBehavior),x("design:type",Object)],f7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],f7.prototype,"ytRendererstamperBehavior",void 0);w([P(xQ),x("design:type",Object)],f7.prototype,"ytdGuideStateAwareBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],f7.prototype,"ytComponentBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],f7.prototype,"data",void 0);w([R({observer:"visibleChanged_"}),x("design:type",Boolean)],f7.prototype,"visible",void 0);w([R(),x("design:type",Object)],f7.prototype,"miniGuideItems_",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],f7.prototype,"noLabels_",void 0);w([U("activeEndpoint"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],f7.prototype,"activeEndpointChanged_",null); f7=w([V({is:"ytd-mini-guide-renderer"})],f7);var Mpb;var Npb;var g7=function(){return O.apply(this,arguments)||this}; p(g7,O);g7.prototype.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{hotkeyDialogSectionRenderer:"ytd-hotkey-dialog-section-renderer"}}}}; g7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable.dialogElement=this.parentElement}; g7.prototype.onCloseTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(g7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Npb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n\n
\n
\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mpb){var d=document.createElement("template");d.innerHTML=""; Mpb=d}d=Mpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Npb=a}a=Npb;return a}}}); var h7=g7;w([P(W.YtActionSenderBehavior),x("design:type",Object)],h7.prototype,"ytActionSenderBehavior",void 0);w([P(Z),x("design:type",Object)],h7.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],h7.prototype,"ytRendererBehavior",void 0);w([CE("#scrollable"),x("design:type",Object)],h7.prototype,"scrollable",void 0);w([R(),x("design:type",Object)],h7.prototype,"data",void 0);h7=w([V({is:"ytd-hotkey-dialog-renderer"})],h7);var Opb;var Ppb;var Qpb=function(){return O.apply(this,arguments)||this}; p(Qpb,O); g.Object.defineProperties(Qpb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ppb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.label)]]
\n
[[data.hotkey]]
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Opb){var d=document.createElement("template");d.innerHTML=""; Opb=d}d=Opb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ppb=a}a=Ppb;return a}}}); var i7=Qpb;w([P(X.YtRendererBehavior),x("design:type",Object)],i7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],i7.prototype,"data",void 0);i7=w([V({is:"ytd-hotkey-dialog-section-option-renderer"})],i7);var Rpb;var Spb;var j7=function(){return O.apply(this,arguments)||this}; p(j7,O);j7.prototype.configureRendererStamper=function(){return{"data.options":{id:"options",mapping:{hotkeyDialogSectionOptionRenderer:"ytd-hotkey-dialog-section-option-renderer"}}}}; g.Object.defineProperties(j7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Spb){var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Rpb){var d=document.createElement("template");d.innerHTML=""; Rpb=d}d=Rpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Spb=a}a=Spb;return a}}}); var k7=j7;w([P(Z),x("design:type",Object)],k7.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],k7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k7.prototype,"data",void 0);k7=w([V({is:"ytd-hotkey-dialog-section-renderer"})],k7);var Tpb;var Upb;var l7=function(){return O.apply(this,arguments)||this}; p(l7,O);e=l7.prototype; e.configureRendererStamper=function(){return{"data.items":{id:"items",mapping:{menuNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuConditionalNavigationItemRenderer:{component:"ytd-menu-navigation-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuConditionalServiceItemRenderer:{component:"ytd-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}}, toggleMenuServiceItemRenderer:{component:"ytd-toggle-menu-service-item-renderer",properties:{useIcons:"[[useIcons_]]"}},menuCustomIconItemRenderer:{component:"ytd-menu-custom-icon-item-renderer"},menuServiceItemDownloadRenderer:{component:"ytd-menu-service-item-download-renderer"}}},"data.footer":{id:"footer",mapping:{menuPopupTipRenderer:"ytd-menu-popup-tip-renderer"}}}}; e.computeAriaLabel_=function(a){return a}; e.onPopupOpened_=function(){var a=this;this.$.items.selected=null;Polymer.dom(this.$.items).children.forEach(function(c){c.popupPositionTarget=a.positionTarget}); var b=this.$$("ytd-menu-popup-tip-renderer");b&&"ytd-menu-popup-tip-renderer"==b.is&&(b.setTip(this.source),this.source=void 0);this.veData&&(b=Tn())&&AJ(b,[this.veData])}; e.onPopupClosed_=function(){var a=this.$$("ytd-menu-popup-tip-renderer");a&&"ytd-menu-popup-tip-renderer"==a.is&&a.clearTip()}; e.onIronActivate_=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-menu-popup-renderer"]);if(this.veData){var a=Tn();a&&BJ(a,this.veData)}}; e.computeUseIcons_=function(){return this.data&&this.data.items?this.data.items.some(function(a){var b=Object.keys(a)[0];return!!a[b].icon}):!1}; g.Object.defineProperties(l7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Upb){var a=document.createElement("template");a.innerHTML="\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Tpb){var d=document.createElement("template");d.innerHTML=""; Tpb=d}d=Tpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Upb=a}a=Upb;return a}}}); var m7=l7;m7.prototype.onPopupClosed_=m7.prototype.onPopupClosed_;m7.prototype.onPopupOpened_=m7.prototype.onPopupOpened_;w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],m7.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],m7.prototype,"ytRendererstamperBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],m7.prototype,"ytActionSenderBehavior",void 0); w([P(X.YtRendererBehavior),x("design:type",Object)],m7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],m7.prototype,"data",void 0);w([R(),x("design:type",Object)],m7.prototype,"veData",void 0);w([R({reflectToAttribute:!0,readOnly:!0,computed:"computeAriaLabel_(data.menuPopupAccessibility.label)"}),x("design:type",String)],m7.prototype,"ariaLabel",void 0);w([R({computed:"computeUseIcons_(data)",reflectToAttribute:!0}),x("design:type",Boolean)],m7.prototype,"useIcons_",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m7.prototype,"onPopupOpened_",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],m7.prototype,"onPopupClosed_",null);m7=w([V({is:"ytd-menu-popup-renderer"})],m7);var Vpb;var Wpb;var n7=function(){return O.apply(this,arguments)||this}; p(n7,O);n7.prototype.setTip=function(a){var b=this;this.data&&(this.tip=TSa(RSa.getInstance(),a,this.data),Polymer.RenderStatus.afterNextRender(this,function(){b.fire("yt-refit")}))}; n7.prototype.clearTip=function(){this.tip=void 0}; n7.prototype.computeHidden=function(a){return!a}; g.Object.defineProperties(n7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Wpb){var a=document.createElement("template");a.innerHTML="\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Vpb){var d=document.createElement("template");d.innerHTML=""; Vpb=d}d=Vpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Wpb=a}a=Wpb;return a}}}); var o7=n7;w([P(X.YtRendererBehavior),x("design:type",Object)],o7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],o7.prototype,"data",void 0);w([R({reflectToAttribute:!0,computed:"computeHidden(tip)",value:!0}),x("design:type",Boolean)],o7.prototype,"hidden",void 0);w([R(),x("design:type",Object)],o7.prototype,"tip",void 0);o7=w([V({is:"ytd-menu-popup-tip-renderer"})],o7);var Xpb;var Ypb;var p7=function(){var a=O.apply(this,arguments)||this;a.useIcons=!1;return a}; p(p7,O);e=p7.prototype;e.onFocus=function(){this.$$("paper-item").focus()}; e.computeText=function(a,b,c){return this.componentBehavior.getSimpleString(a?c:b)}; e.onTap=function(){var a=this.data.isToggled?this.data.toggledServiceEndpoint:this.data.defaultServiceEndpoint;a&&this.ytActionSenderBehavior.sendServiceRequestAction([a])}; e.onYtServiceRequestCompleted=function(){this.set("data.isToggled",!this.data.isToggled)}; e.computeIcon=function(a,b,c){return(a=a?c:b)&&a.iconType?jO(a.iconType):""}; e.computeIconHidden=function(){return this.useIcons?!1:!this.icon}; g.Object.defineProperties(p7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Ypb){var a=document.createElement("template");a.innerHTML="\n \n [[computeText(data.isToggled, data.defaultText, data.toggledText)]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xpb){var d=document.createElement("template");d.innerHTML=""; Xpb=d}d=Xpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Ypb=a}a=Ypb;return a}}}); var q7=p7;q7.prototype.onYtServiceRequestCompleted=q7.prototype.onYtServiceRequestCompleted;q7.prototype.onTap=q7.prototype.onTap;q7.prototype.onFocus=q7.prototype.onFocus;w([P(X.YtRendererBehavior),x("design:type",Object)],q7.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],q7.prototype,"ytActionSenderBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],q7.prototype,"componentBehavior",void 0); w([R(),x("design:type",Object)],q7.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],q7.prototype,"useIcons",void 0);w([R({computed:"computeIcon(data.isToggled,data.defaultIcon,data.toggledIcon)",value:""}),x("design:type",String)],q7.prototype,"icon",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q7.prototype,"onFocus",null); w([S("tap"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],q7.prototype,"onTap",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q7.prototype,"onYtServiceRequestCompleted",null);q7=w([V({is:"ytd-toggle-menu-service-item-renderer"})],q7);var Zpb;var $pb;var r7=function(){return O.apply(this,arguments)||this}; p(r7,O);r7.prototype.onFocus=function(){this.$$("paper-item").focus()}; g.Object.defineProperties(r7.prototype,{imageSource:{configurable:!0,enumerable:!0,get:function(){if(this.data&&this.data.iconUrl)return ac(this.data.iconUrl)}}}); g.Object.defineProperties(r7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$pb){var a=document.createElement("template");a.innerHTML="\n \n \"icon\"\n
\n [[getSimpleString(data.actionText)]]\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zpb){var d=document.createElement("template");d.innerHTML=""; Zpb=d}d=Zpb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$pb=a}a=$pb;return a}}}); var s7=r7;s7.prototype.onFocus=s7.prototype.onFocus;w([P(X.YtRendererBehavior),x("design:type",Object)],s7.prototype,"rendererBehavior",void 0);w([P(OO.YtEndpointBehavior),x("design:type",Object)],s7.prototype,"ytEndpointBehavior",void 0);w([R(),x("design:type",Object)],s7.prototype,"data",void 0);w([S("focus"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s7.prototype,"onFocus",null); w([BE("data.iconUrl"),x("design:type",Object),x("design:paramtypes",[])],s7.prototype,"imageSource",null);s7=w([V({is:"ytd-menu-custom-icon-item-renderer"})],s7);var aqb;var bqb;var cqb=ik("high_priority_flyout_frequency",1),t7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-broadcast-user-invalidation-action":"updateCount_","yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-handle-high-priority-notification-open-action":"handleHighPriorityNotificationOpenAction_"};return a}; p(t7,O);e=t7.prototype;e.created=function(){this.showTooltips=!0}; e.attached=function(){var a=this;this.ytActionHandlerBehavior.actionMap=this.actionMap;this.data&&this.data.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint);navigator&&navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",function(b){return a.onServiceWorkerMessage_(b)})}; e.computeShowNotificationCount=function(a,b){return b?!1:a}; e.onDataChanged_=function(a,b){this.isAttached&&!b&&a&&a.updateUnseenCountEndpoint&&this.sendUnseenCountRequest_(a.updateUnseenCountEndpoint)}; e.onServiceWorkerMessage_=function(a){"update_unseen_notifications_count_signal"===a.data.type&&this.data&&this.data.updateUnseenCountEndpoint&&this.hasUnseenNotificationCountEndpoint_()&&this.sendUnseenCountRequest_(this.data.updateUnseenCountEndpoint)}; e.hasUnseenNotificationCountEndpoint_=function(){return!!this.data&&!!this.data.updateUnseenCountEndpoint&&!!this.data.updateUnseenCountEndpoint.signalServiceEndpoint&&"GET_UNSEEN_NOTIFICATION_COUNT"===this.data.updateUnseenCountEndpoint.signalServiceEndpoint.signal}; e.updateCount_=function(a){if(a&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style){var b=this.ytActionSenderBehavior.sendOptionalAction("yt-opened-conversation-id-action");b&&1===b.length&&null!=b[0]&&b[0]===a.conversationId||(b=this.ytActionSenderBehavior.sendOptionalAction("yt-check-conversation-inbox-open-action"))&&b.some(function(c){return c})||a.newCount&&this.updateCountUI_(a.newCount)}}; e.computeAccessibility_=function(a){return this.get("accessibility.accessibilityData",a)||null}; e.handleUpdateNotificationsUnseenCountAction_=function(a){var b=this;!a.updateNotificationsUnseenCountAction||!this.data||"NOTIFICATION_ACTION_UPDATE_UNSEEN_COUNT"!==a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_DEFAULT"===this.data.style||"NOTIFICATION_ACTION_UPDATE_CONVERSATION_UNSEEN_COUNT"!==a.updateNotificationsUnseenCountAction.handlerData&&"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style||(a.updateNotificationsUnseenCountAction.highPriorityNotificationIcon&& this.set("showHighPriorityNotificationIcon_",!0),this.maybeFetchHighPriorityNotification(a.updateNotificationsUnseenCountAction.highPriorityNotificationTimestamp||0).then(function(){b.updateCountUI_(a.updateNotificationsUnseenCountAction.unseenCount);0d)b.showHighPriorityNotification(),JN("HighPriorityNotificationShowCount",1).then(function(){JN("HighPriorityNotificationTimestamp",a).then(function(){return Promise.resolve(!0)})}).catch(function(){return!1});else return a===d?KN("HighPriorityNotificationShowCount").then(function(f){return fa?a:"9+")}; e.handleHighPriorityNotificationOpenAction_=function(){"NOTIFICATION_BUTTON_STYLE_TYPE_CONVERSATION_DEFAULT"===this.data.style&&1===this.unseenCount_&&this.set("unseenCount_",0)}; g.Object.defineProperties(t7.prototype,{container:{configurable:!0,enumerable:!0,get:function(){return this.$.button}}}); g.Object.defineProperties(t7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===bqb){var a=document.createElement("template");a.innerHTML="
\n \n
\n\n\n"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===aqb){var d=document.createElement("template");d.innerHTML=""; aqb=d}d=aqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);bqb=a}a=bqb;return a}}}); var u7=t7;u7.prototype.onServiceRequestCompleted_=u7.prototype.onServiceRequestCompleted_;u7.prototype.onTap_=u7.prototype.onTap_;u7.prototype.handleUpdateNotificationsUnseenCountAction_=u7.prototype.handleUpdateNotificationsUnseenCountAction_;w([P(X.YtRendererBehavior),x("design:type",Object)],u7.prototype,"ytRendererBehavior",void 0);w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],u7.prototype,"ytdOpenPopupBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],u7.prototype,"ytActionHandlerBehavior",void 0);w([P(RO.YtButtonBehavior),x("design:type",Object)],u7.prototype,"ytButtonBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],u7.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged_"}),x("design:type",Object)],u7.prototype,"data",void 0);w([R(),x("design:type",Object)],u7.prototype,"cachedAction_",void 0); w([R({value:0}),x("design:type",Object)],u7.prototype,"unseenCount_",void 0);w([R({value:!1}),x("design:type",Object)],u7.prototype,"showHighPriorityNotificationIcon_",void 0);w([R({computed:"computeShowNotificationCount(unseenCount_, showHighPriorityNotificationIcon_)"}),x("design:type",Object)],u7.prototype,"showNotificationCount_",void 0); w([S("yt-update-notifications-unseen-count-action"),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],u7.prototype,"handleUpdateNotificationsUnseenCountAction_",null);w([S("tap"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],u7.prototype,"onTap_",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],u7.prototype,"onServiceRequestCompleted_",null);u7=w([V({is:"ytd-notification-topbar-button-renderer"})],u7);var dqb;var eqb;var v7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-dark-mode-toggled-action":"onDarkModeToggled"};return a}; p(v7,O);v7.prototype.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.dark=document.documentElement.hasAttribute("dark")}; v7.prototype.dataChanged=function(){var a;if(null===(a=this.data)||void 0===a?0:a.backgroundBanner){var b=wO(this.data.backgroundBanner.thumbnails,this.clientWidth);this.style.backgroundImage="url("+b+")"}}; v7.prototype.onDarkModeToggled=function(a){this.dark=a}; g.Object.defineProperties(v7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===eqb){var a=document.createElement("template");a.innerHTML="
\n \n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===dqb){var d=document.createElement("template");d.innerHTML=""; dqb=d}d=dqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);eqb=a}a=eqb;return a}}}); var w7=v7;w7.prototype.dataChanged=w7.prototype.dataChanged;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],w7.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],w7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],w7.prototype,"data",void 0);w([R({value:!0,reflectToAttribute:!0}),x("design:type",Boolean)],w7.prototype,"dark",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],w7.prototype,"dataChanged",null);w7=w([V({is:"yt-pdg-buy-flow-header-renderer"})],w7);var fqb;var gqb;var x7=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-form":"handleSignalActionSubmitForm"};return a}; p(x7,O);e=x7.prototype; e.configureRendererStamper=function(){return{"data.buyButton":{id:"buy-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{id:"buy-button-renderer"}}}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer"}}},"data.commentPreview":{id:"comment-preview",mapping:{pdgCommentPreviewRenderer:"ytd-pdg-comment-preview-renderer"}},"data.selectableItemButtons":{id:"selectable-items",mapping:{buttonRenderer:{component:"ytd-button-renderer"},superVodSelectableItemButtonRenderer:{component:"ytd-pdg-super-vod-selectable-item-button-renderer"}}}}}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.listen(this.$["cancel-button"],"tap","closeBuyFlow")}; e.detached=function(){this.unlisten(this.$["cancel-button"],"tap","closeBuyFlow")}; e.handleSignalActionSubmitForm=function(){this.fire("yt-pdg-buy-flow-selection-submitted");uL(this,[this.data.submitEndpoint])}; e.dataChanged=function(){if(this.data){this.updatePriceSelectorStatus();var a=[];this.data.preloadImage?a=[this.data.preloadImage]:this.data.preloadImages&&(a=this.data.preloadImages);a.map(function(b){return wO(b.thumbnails,1920)}).forEach(function(b){b&&Xi(WYa(b),function(){Am(Error("Failed to load PDG Viewer applause animation."))})})}}; e.updatePriceSelectorStatus=function(){var a,b=!(null===(a=this.data)||void 0===a||!a.selectableItemButtons),c=Polymer.dom(this);b?(c.removeAttribute("single-price"),c.setAttribute("multi-price",!0)):(c.removeAttribute("multi-price"),c.setAttribute("single-price",!0))}; e.closeBuyFlow=function(){rL(this,"yt-close-popup-action",["ytd-pdg-buy-flow-renderer"])}; g.Object.defineProperties(x7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===gqb){var a=document.createElement("template");a.innerHTML="
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===fqb){var d=document.createElement("template");d.innerHTML=""; fqb=d}d=fqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);gqb=a}a=gqb;return a}}}); var y7=x7;y7.prototype.closeBuyFlow=y7.prototype.closeBuyFlow;y7.prototype.dataChanged=y7.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],y7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],y7.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],y7.prototype,"ytActionHandlerBehavior",void 0);w([R(),x("design:type",Object)],y7.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y7.prototype,"dataChanged",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y7.prototype,"closeBuyFlow",null);y7=w([V({is:"yt-super-vod-buy-flow-content-renderer"})],y7);var hqb;var iqb;var z7=function(){var a=O.apply(this,arguments)||this;a.isAnimationDisabled=!1;a.textCycleOptions=[];a.currentTextOptionIndex=0;a.animationEndHandler=function(){}; return a}; p(z7,O);z7.prototype.attached=function(){this.animationEndHandler=this.handleAnimationEnd.bind(this);this.contentEl.addEventListener("animationend",this.animationEndHandler)}; z7.prototype.detached=function(){this.contentEl.removeEventListener("animationend",this.animationEndHandler)}; z7.prototype.setupCyclingAnimation=function(){this.data&&this.data.contentTextOptions&&(this.textCycleOptions=this.data.contentTextOptions.map(this.rendererBehavior.getSimpleString),this.currentTextOptionIndex=0,this.contentEl.textContent=this.textCycleOptions[this.currentTextOptionIndex],this.isAnimationDisabled||this.contentEl.classList.add("fadein"))}; z7.prototype.handleAnimationEnd=function(a){var b=this;"fadein"===a.animationName?setTimeout(function(){b.contentEl.classList.remove("fadein");b.contentEl.classList.add("fadeout")},1E3):"fadeout"===a.animationName&&(this.currentTextOptionIndex=(this.currentTextOptionIndex+1)%this.textCycleOptions.length,this.contentEl.textContent=this.textCycleOptions[this.currentTextOptionIndex],this.contentEl.classList.remove("fadeout"),this.contentEl.classList.add("fadein"))}; g.Object.defineProperties(z7.prototype,{title:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.title)}}, channelName:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.authorText)}}, publishedTime:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.publishedTimeText)}}, content:{configurable:!0,enumerable:!0,get:function(){return this.rendererBehavior.getSimpleString(this.data.contentText)}}}); g.Object.defineProperties(z7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===iqb){var a=document.createElement("template");a.innerHTML="
\n
\n

\n [[title]]\n

\n
\n\n
\n \n \n
\n
\n [[channelName]] \u2022 [[publishedTime]]\n
\n
\n [[content]]\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===hqb){var d=document.createElement("template");d.innerHTML=""; hqb=d}d=hqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);iqb=a}a=iqb;return a}}}); var A7=z7;A7.prototype.setupCyclingAnimation=A7.prototype.setupCyclingAnimation;w([P(X.YtRendererBehavior),x("design:type",Object)],A7.prototype,"rendererBehavior",void 0);w([CE("#content"),x("design:type",HTMLElement)],A7.prototype,"contentEl",void 0);w([R(),x("design:type",Object)],A7.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],A7.prototype,"isAnimationDisabled",void 0); w([U("data.contentTextOptions"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],A7.prototype,"setupCyclingAnimation",null);w([BE("data.title"),x("design:type",Object),x("design:paramtypes",[])],A7.prototype,"title",null);w([BE("data.authorText"),x("design:type",Object),x("design:paramtypes",[])],A7.prototype,"channelName",null);w([BE("data.publishedTimeText"),x("design:type",Object),x("design:paramtypes",[])],A7.prototype,"publishedTime",null); w([BE("data.contentText"),x("design:type",Object),x("design:paramtypes",[])],A7.prototype,"content",null);A7=w([V({is:"ytd-pdg-comment-preview-renderer"})],A7);var jqb;var kqb;var B7=function(){return O.apply(this,arguments)||this}; p(B7,O);e=B7.prototype;e.beforeRegister=function(){this.ironA11yKeysBehavior.keyBindings={"enter:keydown":"onClick","space:keydown":"onClick"}}; e.attached=function(){this.setAttribute("tabindex","0");this.hasAttribute("role")||this.setAttribute("role","button")}; e.dataChanged=function(){this.data&&(this.data.chipColorArgb&&this.data.chipFontColorArgb&&this.updateStyles({"--yt-pdg-super-vod-selectable-item-button-chip-background-color":QN(this.data.chipColorArgb),"--yt-pdg-super-vod-selectable-item-button-chip-font-color":QN(this.data.chipFontColorArgb)}),this.basePriceText=this.data.basePriceText,this.purchaseCommand=this.data.purchaseCommand)}; e.onClick=function(){this.purchaseCommand&&uL(this,[this.purchaseCommand]);N("pdg_disable_web_super_vod_explicit_click_logging")||this.logClick()}; e.logClick=function(){this.data&&this.ytRendererBehavior.logExplicitClick(this.data)}; g.Object.defineProperties(B7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===kqb){var a=document.createElement("template");a.innerHTML="\n\n[[getSimpleString(data.basePriceText)]]\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===jqb){var d=document.createElement("template");d.innerHTML=""; jqb=d}d=jqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);kqb=a}a=kqb;return a}}}); var C7=B7;C7.prototype.onClick=C7.prototype.onClick;C7.prototype.dataChanged=C7.prototype.dataChanged;w([P(kO.YtComponentBehavior),x("design:type",Object)],C7.prototype,"componentBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],C7.prototype,"ytRendererBehavior",void 0);w([P(Polymer.IronA11yKeysBehavior),x("design:type",Object)],C7.prototype,"ironA11yKeysBehavior",void 0);w([R(),x("design:type",Object)],C7.prototype,"data",void 0); w([R(),x("design:type",Object)],C7.prototype,"shownThumbnail",void 0);w([R(),x("design:type",Object)],C7.prototype,"basePriceText",void 0);w([R(),x("design:type",Object)],C7.prototype,"purchaseCommand",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C7.prototype,"dataChanged",null);w([S("click"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C7.prototype,"onClick",null); C7=w([V({is:"ytd-pdg-super-vod-selectable-item-button-renderer"})],C7);var lqb;var mqb;var D7=function(){return O.apply(this,arguments)||this}; p(D7,O);e=D7.prototype;e.created=function(){Polymer.IronA11yAnnouncer.requestAvailability();this.listen(this,"iron-overlay-opened","onPopupIronOverlayOpened")}; e.onPopupIronOverlayOpened=function(){this.data&&this.data.accessibility&&this.data.accessibility.accessibilityData&&this.data.accessibility.accessibilityData.label&&this.fire("iron-announce",{text:this.data.accessibility.accessibilityData.label})}; e.detached=function(){Fk.cancelJob(this.autoCloseJobId);this.unlisten(this,"iron-overlay-opened","onPopupIronOverlayOpened")}; e.dataChanged=function(){var a=this;this.data&&this.data.autoCloseDelay&&(rL(this,"yt-close-popup-action",["ytd-pdg-buy-flow-renderer"]),this.autoCloseJobId=Gk(function(){a.closePopup()},1E3*(Number(this.data.autoCloseDelay.seconds)||0)))}; e.openPopup=function(){this.ironOverlayBehavior.open()}; e.closePopup=function(){this.ironOverlayBehavior.close();this.data&&(rL(this,"yt-close-popup-action",["ytd-desktop-image-overlay-renderer"]),this.data.onCloseCommand&&tL(this,[this.data.onCloseCommand],this),this.data.onCloseSurveyCommand&&uL(this,[this.data.onCloseSurveyCommand]),Fk.cancelJob(this.autoCloseJobId))}; g.Object.defineProperties(D7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===mqb){var a=document.createElement("template");a.innerHTML="
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===lqb){var d=document.createElement("template");d.innerHTML=""; lqb=d}d=lqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);mqb=a}a=mqb;return a}}}); var E7=D7;E7.prototype.dataChanged=E7.prototype.dataChanged;w([P(X.YtRendererBehavior),x("design:type",Object)],E7.prototype,"rendererBehavior",void 0);w([P(Polymer.IronOverlayBehavior),x("design:type",Object)],E7.prototype,"ironOverlayBehavior",void 0);w([R(),x("design:type",Object)],E7.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],E7.prototype,"dataChanged",null);E7=w([V({is:"ytd-desktop-image-overlay-renderer"})],E7);var nqb;var oqb;var F7=function(){return O.apply(this,arguments)||this}; p(F7,O);e=F7.prototype;e.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{pdgBuyFlowHeaderRenderer:{component:"yt-pdg-buy-flow-header-renderer"}}},"data.content":{id:"content",mapping:{superVodBuyFlowContentRenderer:{component:"yt-super-vod-buy-flow-content-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("tabIndex")||this.setAttribute("tabIndex","0");this.listen(this,"yt-popup-closed","closePopup_")}; e.detached=function(){this.unlisten(this,"yt-popup-closed","closePopup_")}; e.dataChanged_=function(){sL(this,"yt-close-popup-action",["yt-loading-renderer"])}; e.handleBuyflowSelectionSubmitted_=function(){this.unlisten(this,"yt-popup-closed","closePopup_")}; e.closePopup_=function(){this.data&&this.data.onCloseCommand&&uL(this,[this.data.onCloseCommand])}; g.Object.defineProperties(F7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===oqb){var a=document.createElement("template");a.innerHTML="
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===nqb){var d=document.createElement("template");d.innerHTML=""; nqb=d}d=nqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);oqb=a}a=oqb;return a}}}); var G7=F7;G7.prototype.handleBuyflowSelectionSubmitted_=G7.prototype.handleBuyflowSelectionSubmitted_;G7.prototype.dataChanged_=G7.prototype.dataChanged_;w([P(X.YtRendererBehavior),x("design:type",Object)],G7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],G7.prototype,"ytRendererstamperBehavior",void 0);w([P($V),x("design:type",Object)],G7.prototype,"ytOpenToastBehavior",void 0);w([R(),x("design:type",Object)],G7.prototype,"data",void 0); w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G7.prototype,"dataChanged_",null);w([S("yt-pdg-buy-flow-selection-submitted"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],G7.prototype,"handleBuyflowSelectionSubmitted_",null);G7=w([V({is:"ytd-pdg-buy-flow-renderer"})],G7);var pqb;var qqb;var H7=function(){var a=O.apply(this,arguments)||this;a.isOpen=!1;a.isPlaylistCreated=!1;return a}; p(H7,O);e=H7.prototype;e.reset=function(){this.isPlaylistCreated=this.isOpen=!1;this.nameInput.reset();this.privacyInput.reset()}; e.onOpenTap=function(){this.isOpen=!0;this.isPlaylistCreated=!1;this.nameInput.focusTextInput();this.fire("yt-refit")}; e.onCreateTap=function(){!this.isPlaylistCreated&&this.nameInput.validate()&&(this.ytActionSenderBehavior.sendServiceRequestAction([this.data.serviceEndpoint,{create_playlist_title:this.nameInput.value,create_playlist_privacy_status:this.privacyInput.value}]),this.isPlaylistCreated=!0)}; e.onKeydown=function(a){if(13===a.keyCode)this.onCreateTap()}; e.onServiceRequestCompleted=function(a){a.stopPropagation();this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])}; e.computePrivacyBadge=function(a){return a?[{metadataBadgeRenderer:a}]:[]}; g.Object.defineProperties(H7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===qqb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===pqb){var d=document.createElement("template");d.innerHTML=""; pqb=d}d=pqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);qqb=a}a=qqb;return a}}}); var I7=H7;I7.prototype.onServiceRequestCompleted=I7.prototype.onServiceRequestCompleted;I7.prototype.onKeydown=I7.prototype.onKeydown;w([P(W.YtActionSenderBehavior),x("design:type",Object)],I7.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],I7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],I7.prototype,"data",void 0);w([R(),x("design:type",Object)],I7.prototype,"isOpen",void 0); w([R(),x("design:type",Object)],I7.prototype,"isPlaylistCreated",void 0);w([R({value:{REQUIRED_LABEL:YK("REQUIRED_LABEL",void 0,"Required"),NO_ANGLE_BRACKET_LABEL:YK("NO_ANGLE_BRACKET_LABEL",void 0,"Cannot contain < or >")}}),x("design:type",Object)],I7.prototype,"addToStrings",void 0);w([R({computed:"computePrivacyBadge(data.privacyInput.metadataBadgeRenderer)"}),x("design:type",Array)],I7.prototype,"privacyBadge",void 0);w([CE("#privacy-input"),x("design:type",WZ)],I7.prototype,"privacyInput",void 0); w([CE("#name-input"),x("design:type",Object)],I7.prototype,"nameInput",void 0);w([S("keydown"),x("design:type",Function),x("design:paramtypes",[KeyboardEvent]),x("design:returntype",void 0)],I7.prototype,"onKeydown",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],I7.prototype,"onServiceRequestCompleted",null);I7=w([V({is:"ytd-add-to-playlist-create-renderer"})],I7);var rqb;var sqb;var J7=function(){var a=O.apply(this,arguments)||this;a.addToStrings={ADD_TO_DROPDOWN_LABEL:YK("ADD_TO_DROPDOWN_LABEL",void 0,"Save to...")};a.closeButtonAriaLabel=YK("SBOX_INAPPROPRIATE_CANCEL");a.dialog=N("desktop_add_to_playlist_renderer_dialog_popup");a.increasedTapTarget=N("desktop_adjust_touch_target");return a}; p(J7,O);J7.prototype.configureRendererStamper=function(){return{"data.playlists":{id:"playlists",mapping:{playlistAddToOptionRenderer:"ytd-playlist-add-to-option-renderer"}},"data.actions":{id:"actions",mapping:{addToPlaylistCreateRenderer:"ytd-add-to-playlist-create-renderer"}}}}; J7.prototype.onPopupOpened=function(){this.toggleClass("scrollable",!0,this.playlists);this.createRenderer&&this.createRenderer.reset()}; J7.prototype.onPopupClosed=function(){this.toggleClass("scrollable",!1,this.playlists)}; J7.prototype.onTapClose=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-add-to-playlist-renderer"])}; g.Object.defineProperties(J7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===sqb){var a=document.createElement("template");a.innerHTML="
\n
[[addToStrings.ADD_TO_DROPDOWN_LABEL]]
\n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===rqb){var d=document.createElement("template");d.innerHTML=""; rqb=d}d=rqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);sqb=a}a=sqb;return a}}}); var K7=J7;K7.prototype.onPopupClosed=K7.prototype.onPopupClosed;K7.prototype.onPopupOpened=K7.prototype.onPopupOpened;w([P(X.YtRendererBehavior),x("design:type",Object)],K7.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],K7.prototype,"ytActionSenderBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],K7.prototype,"ytEventForwardingBehavior",void 0);w([P(Z),x("design:type",Object)],K7.prototype,"ytRendererStamperBehavior",void 0); w([R(),x("design:type",Object)],K7.prototype,"data",void 0);w([R(),x("design:type",Object)],K7.prototype,"addToStrings",void 0);w([R(),x("design:type",String)],K7.prototype,"closeButtonAriaLabel",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],K7.prototype,"dialog",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],K7.prototype,"increasedTapTarget",void 0);w([CE("#playlists"),x("design:type",HTMLElement)],K7.prototype,"playlists",void 0); w([CE("ytd-add-to-playlist-create-renderer"),x("design:type",Object)],K7.prototype,"createRenderer",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K7.prototype,"onPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],K7.prototype,"onPopupClosed",null);K7=w([V({is:"ytd-add-to-playlist-renderer"})],K7);var tqb;var uqb;var L7=function(){return O.apply(this,arguments)||this}; p(L7,O);L7.prototype.dataChanged=function(){this.data&&(this.$.checkbox.checked="ALL"===this.data.containsSelectedVideos)}; L7.prototype.onCheckboxChange=function(a){var b=this;this.data&&this.debounce("yt-playlist-checkbox-changed",function(){var c=Polymer.dom(a).rootTarget.checked?b.data.addToPlaylistServiceEndpoint:b.data.removeFromPlaylistServiceEndpoint;b.ytRendererBehavior.sendServiceRequestAction([c])},100)}; L7.prototype.computeIconType=function(a){return a?"yt-icons:"+a.toLowerCase():null}; g.Object.defineProperties(L7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===uqb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n
\n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===tqb){var d=document.createElement("template");d.innerHTML=""; tqb=d}d=tqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);uqb=a}a=uqb;return a}}}); var M7=L7;M7.prototype.dataChanged=M7.prototype.dataChanged;w([P(W.YtActionSenderBehavior),x("design:type",Object)],M7.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],M7.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],M7.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],M7.prototype,"dataChanged",null);M7=w([V({is:"ytd-playlist-add-to-option-renderer"})],M7);var vqb;var wqb;var N7=function(){return O.apply(this,arguments)||this}; p(N7,O);e=N7.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDismissTap=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-mealbar-promo-renderer"])}; e.computeIcon=function(a){return a?"BACKSTAGE_ARTWORK"===a?"backstage:artwork":a:null}; e.computeHasFullHeightImage=function(a){return!!(a&&a.thumbnails&&0\n\n
\n

\n [[getSimpleString(data.messageTitle)]]\n

\n \n
\n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===vqb){var d=document.createElement("template");d.innerHTML=""; vqb=d}d=vqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);wqb=a}a=wqb;return a}}}); var O7=N7;O7.prototype.onThumbnailLoaded=O7.prototype.onThumbnailLoaded;w([P(X.YtRendererBehavior),x("design:type",Object)],O7.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],O7.prototype,"ytActionSenderBehavior",void 0);w([R({}),x("design:type",Object)],O7.prototype,"data",void 0);w([R({computed:"computeIcon(data.alternateIcon.iconType)"}),x("design:type",Object)],O7.prototype,"icon",void 0); w([R({reflectToAttribute:!0,computed:"computeHasFullHeightImage(data.icon)"}),x("design:type",Boolean)],O7.prototype,"hasFullHeightImage",void 0);w([S("yt-img-shadow-loaded"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],O7.prototype,"onThumbnailLoaded",null);O7=w([V({is:"ytd-mealbar-promo-renderer"})],O7);var xqb;var yqb;TO("itemSectionRenderer","redCancelSurveyRenderer","ytd-red-cancel-survey-renderer");var P7=function(){return O.apply(this,arguments)||this}; p(P7,O);e=P7.prototype;e.configureRendererStamper=function(){return{"data.nextButton":{id:"next-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-confirm":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",classListBinding:"[[buttonClass_]]",attributes:{"dialog-dismiss":!0}}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged_=function(){switch(this.get("data.singleOptions.preselectMode")){case"SINGLE_OPTION_PRESELECT_MODE_LAST":this.selectedResponseIndex_=this.get("data.singleOptions.styles").length-1;break;default:this.selectedResponseIndex_=void 0;}var a=this.get("data.nextButton.buttonRenderer.navigationEndpoint");a&&(this.nextNavigationEndpoint_=a,this.set("data.nextButton.buttonRenderer.navigationEndpoint",void 0))}; e.onSelectedResponseIndexChange_=function(){if(null!=this.get("data.nextButton.buttonRenderer")){switch(this.get("data.submissionMode")){case"SURVEY_SUBMISSION_MODE_ONE_SELECTED_OPTION":this.set("data.nextButton.buttonRenderer.isDisabled",void 0===this.selectedResponseIndex_);break;default:this.set("data.nextButton.buttonRenderer.isDisabled",!1);}if(null!=this.selectedResponseIndex_){var a={feedbackTokens:[this.get(["data.singleOptions.styles",this.selectedResponseIndex_]).radioButtonSurveyOptionRenderer.submissionEndpoint.feedbackEndpoint.feedbackToken]}; this.set("nextNavigationEndpoint_.confirmDialogEndpoint.content.confirmDialogRenderer.confirmButton.buttonRenderer.serviceEndpoint.ypcCancelRecurrenceEndpoint.feedbackData",a)}}}; e.onPopupOpened_=function(a){a.detail==this&&N("enable_premium_voluntary_pause")&&this.ytdOpenPopupBehavior.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"])}; e.onNextButtonTap_=function(){var a=this.nextNavigationEndpoint_&&this.ytdOpenPopupBehavior.getNavigationEndpointPopupAction(this.nextNavigationEndpoint_);a&&this.ytdOpenPopupBehavior.openPopup(a)}; g.Object.defineProperties(P7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===yqb){var a=document.createElement("template");a.innerHTML="
\n
[[getSimpleString(data.question)]]
\n \n \n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===xqb){var d=document.createElement("template");d.innerHTML=""; xqb=d}d=xqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);yqb=a}a=yqb;return a}}}); var Q7=P7;Q7.prototype.onPopupOpened_=Q7.prototype.onPopupOpened_;w([P(vP.YtdOpenPopupBehavior),x("design:type",Object)],Q7.prototype,"ytdOpenPopupBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],Q7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],Q7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"dataChanged_"}),x("design:type",Object)],Q7.prototype,"data",void 0); w([R({observer:"onSelectedResponseIndexChange_"}),x("design:type",Object)],Q7.prototype,"selectedResponseIndex_",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],Q7.prototype,"onPopupOpened_",null);Q7=w([V({is:"ytd-red-cancel-survey-renderer"})],Q7);var zqb;var Aqb;var R7=function(){var a=O.apply(this,arguments)||this;a.submitButtonDisabled=!0;return a}; p(R7,O);R7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; R7.prototype.configureRendererStamper=function(){return{"data.sections":{id:"sections",mapping:{itemSectionRenderer:{component:"ytd-item-section-renderer",noInjection:!0}}}}}; R7.prototype.onDataChanged=function(){var a,b,c,d,f,h;void 0!==(null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.confirmButton)||void 0===b?void 0:b.buttonRenderer)||void 0===c?void 0:c.isDisabled)&&(this.submitButtonDisabled=null===(h=null===(f=null===(d=this.data)||void 0===d?void 0:d.confirmButton)||void 0===f?void 0:f.buttonRenderer)||void 0===h?void 0:h.isDisabled)}; R7.prototype.checkboxChanged=function(){this.submitButtonDisabled=!this.submitButtonDisabled}; g.Object.defineProperties(R7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Aqb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===zqb){var d=document.createElement("template");d.innerHTML=""; zqb=d}d=zqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Aqb=a}a=Aqb;return a}}}); var S7=R7;w([P(Z),x("design:type",Object)],S7.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],S7.prototype,"ytRendererBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],S7.prototype,"data",void 0);w([R(),x("design:type",Object)],S7.prototype,"submitButtonDisabled",void 0);S7=w([V({is:"ytd-transfer-channel-confirm-dialog-renderer"})],S7);var Bqb;var Cqb;var T7=function(){return O.apply(this,arguments)||this}; p(T7,O);T7.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; T7.prototype.configureRendererStamper=function(){return{"data.okayButton":{id:"okay-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; T7.prototype.onDataChanged=function(){var a=this.get("data.headerImage.thumbnails");a&&(a=wO(a,this.clientWidth),this.$.header.style.backgroundImage="url("+a+")");a=Tn();var b=Sn(),c=this.get("data.trackingParams");c&&b&&a&&yJ(a,b,Nn(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()})}; T7.prototype.onPopupClosed=function(a){"ytd-membership-post-cancel-renderer"===Polymer.dom(a).rootTarget.localName&&this.ytActionSenderBehavior.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])}; g.Object.defineProperties(T7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Cqb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n \n \n \n \n
\n
\n\n\n\n
\n \n
\n\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Bqb){var d=document.createElement("template");d.innerHTML=""; Bqb=d}d=Bqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Cqb=a}a=Cqb;return a}}}); var U7=T7;U7.prototype.onPopupClosed=U7.prototype.onPopupClosed;w([P(W.YtActionSenderBehavior),x("design:type",Object)],U7.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],U7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],U7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],U7.prototype,"data",void 0); w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],U7.prototype,"onPopupClosed",null);U7=w([V({is:"ytd-membership-post-cancel-renderer"})],U7);var Dqb;var Eqb;var V7=function(){return O.apply(this,arguments)||this}; p(V7,O);e=V7.prototype;e.configureRendererStamper=function(){return{"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[onConfirmTap]]"}}}},"data.feedbackSurvey":{id:"feedback-survey",mapping:{feedbackSurveyRenderer:"ytd-feedback-survey-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.scrollable.dialogElement=this.parentNode;this.onDataChanged()}; e.onYtPopupOpened=function(a,b){b===this&&this.data&&this.data.onOpenCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onOpenCommands,this);this.ytActionSenderBehavior.sendAction("yt-close-popups-action",[["ytd-manage-membership-renderer","ytd-membership-offer-renderer"]])}; e.onYtPopupClosed=function(a,b){(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data&&this.data.onDismissCommands&&this.ytActionSenderBehavior.sendInnerTubeActions(this.data.onDismissCommands,this)}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-sponsorship-confirm-cancel-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.maybeSubmitFeedback=function(){var a=this.$$("ytd-feedback-survey-renderer");a&&a.submitSurvey()}; e.onDataChanged=function(){if(this.isAttached){var a=this.get("data.header.sponsorshipDialogHeaderRenderer.headerImage.thumbnails");a&&(a=wO(a,this.clientWidth),this.$.header.style.backgroundImage="url(\""+a+"\")")}}; e.onConfirmTap=function(){this.fire("yt-request-feedback-submission")}; g.Object.defineProperties(V7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Eqb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Dqb){var d=document.createElement("template");d.innerHTML=""; Dqb=d}d=Dqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Eqb=a}a=Eqb;return a}}}); var W7=V7;W7.prototype.maybeSubmitFeedback=W7.prototype.maybeSubmitFeedback;W7.prototype.onYtServiceRequestError=W7.prototype.onYtServiceRequestError;W7.prototype.onYtServiceRequestCompleted=W7.prototype.onYtServiceRequestCompleted;W7.prototype.onYtPopupClosed=W7.prototype.onYtPopupClosed;W7.prototype.onYtPopupOpened=W7.prototype.onYtPopupOpened;w([P(X.YtRendererBehavior),x("design:type",Object)],W7.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],W7.prototype,"ytRendererstamperBehavior",void 0);w([P($V),x("design:type",Object)],W7.prototype,"ytOpenToastBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],W7.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],W7.prototype,"data",void 0);w([R({value:function(){return YK("SBOX_INAPPROPRIATE_CANCEL")}}), x("design:type",String)],W7.prototype,"closeButtonAriaLabel",void 0);w([CE("#scrollable"),x("design:type",Object)],W7.prototype,"scrollable",void 0);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],W7.prototype,"onYtPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,Object]),x("design:returntype",void 0)],W7.prototype,"onYtPopupClosed",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],W7.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],W7.prototype,"onYtServiceRequestError",null); w([S("yt-request-feedback-submission"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],W7.prototype,"maybeSubmitFeedback",null);W7=w([V({is:"ytd-sponsorship-confirm-cancel-renderer"})],W7);var Fqb;var Gqb;var Hqb=da(["https://www.googletagmanager.com/gtag/js?id=AW-758154851"]),Iqb=da(["\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', 'AW-758154851');\n "]),Jqb=da(["\n gtag('event', 'conversion', {'send_to': 'AW-758154851/gA4iCK3u5ZYBEOOMwukC', 'transaction_id': ''});\n "]),X7=function(){var a=O.apply(this,arguments)||this;a.scriptsAppended=!1;return a}; p(X7,O);e=X7.prototype; e.configureRendererStamper=function(){return{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.contents":{id:"content", mapping:{sponsorshipsListTileRenderer:{component:"ytd-sponsorships-list-tile-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.onDataChanged=function(){var a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundColor");this.header.style.setProperty("background-color",QN(a));if(a=this.get("data.header.sponsorshipsHeaderRenderer.backgroundImage.thumbnails"))a=wO(a,this.getBoundingClientRect().width),this.header.style.setProperty("background-image","url("+a+")");a=Tn(4);var b=Sn(4),c=this.get("data.trackingParams");c&&b&&a&&yJ(a,b,Nn(c));this.querySelectorAll("yt-img-shadow").forEach(function(d){d.onShow()}); this.setupConversionTracking()}; e.setupConversionTracking=function(){if(!this.scriptsAppended){var a=document.createElement("script");a.async=!0;var b=QFa(Hqb);b=b instanceof lh?tea(b):Kb(b);a.src=b;UFa(a);document.body.appendChild(a);a=document.createElement("script");b=PFa(Iqb);a.textContent=RFa(b);UFa(a);document.body.appendChild(a);a=document.createElement("script");b=PFa(Jqb);a.textContent=RFa(b);UFa(a);document.body.appendChild(a);this.scriptsAppended=!0}}; e.onPopupClosed=function(a){"ytd-sponsorships-celebration-renderer"===Polymer.dom(a).rootTarget.localName&&this.ytActionSenderBehavior.sendAction("ytd-refresh-channel-tab-action",["TAB_ID_SPONSORSHIPS"])}; g.Object.defineProperties(X7,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Gqb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Fqb){var d=document.createElement("template");d.innerHTML=""; Fqb=d}d=Fqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Gqb=a}a=Gqb;return a}}}); var Y7=X7;Y7.prototype.onPopupClosed=Y7.prototype.onPopupClosed;w([P(W.YtActionSenderBehavior),x("design:type",Object)],Y7.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],Y7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],Y7.prototype,"ytRendererstamperBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],Y7.prototype,"data",void 0);w([CE("#header"),x("design:type",HTMLElement)],Y7.prototype,"header",void 0); w([R(),x("design:type",Object)],Y7.prototype,"scriptsAppended",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],Y7.prototype,"onPopupClosed",null);Y7=w([V({is:"ytd-sponsorships-celebration-renderer"})],Y7);var Kqb;var Lqb;var Z7=function(){return O.apply(this,arguments)||this}; p(Z7,O);e=Z7.prototype;e.configureRendererStamper=function(){return{"data.header.sponsorshipsHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.header.sponsorshipsHeaderRenderer.menuButton":{id:"action-menu",mapping:{menuRenderer:"ytd-menu-renderer"}},"data.alert":{id:"alert-renderer",mapping:{sponsorshipsAlertRenderer:{component:"ytd-sponsorships-alert-renderer"}}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.detached=function(){this.playerElement.stop()}; e.onYtServiceRequestCompleted=function(){this.actionSenderBehavior.sendAction("yt-close-popup-action",["ytd-sponsorships-offer-renderer"])}; e.onYtServiceRequestError=function(a){this.ytOpenToastBehavior.openToast(a.detail.error.message)}; e.onYtPopupOpened=function(){this.scrollable&&(this.scrollable.scrollTarget.scrollTop=0)}; e.onYtPopupClosed=function(){this.playerElement.stop();this.backgroundPlayerElement&&this.isBackgroundPlayerAlreadyPlaying&&!this.tierRenderer.purchaseButtonClicked&&this.backgroundPlayerElement.play();this.set("selectedTier",0)}; e.getTier=function(a,b){return!a||!a.tiers||0>b?null:a.tiers[b].sponsorshipsTierRenderer}; e.moreThanOne=function(a){return!!(a&&1
\n
\n \n \n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n
\n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Kqb){var d=document.createElement("template");d.innerHTML=""; Kqb=d}d=Kqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lqb=a}a=Lqb;return a}}}); var $7=Z7;$7.prototype.onYtPopupClosed=$7.prototype.onYtPopupClosed;$7.prototype.onYtPopupOpened=$7.prototype.onYtPopupOpened;$7.prototype.onYtServiceRequestError=$7.prototype.onYtServiceRequestError;$7.prototype.onYtServiceRequestCompleted=$7.prototype.onYtServiceRequestCompleted;w([P(X.YtRendererBehavior),x("design:type",Object)],$7.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],$7.prototype,"ytRendererstamperBehavior",void 0); w([P($V),x("design:type",Object)],$7.prototype,"ytOpenToastBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],$7.prototype,"actionSenderBehavior",void 0);w([R({observer:"onDataChanged"}),x("design:type",Object)],$7.prototype,"data",void 0);w([R({notify:!0,value:0}),x("design:type",Number)],$7.prototype,"selectedTier",void 0);w([R({value:""}),x("design:type",String)],$7.prototype,"offerVideo",void 0); w([R({value:!1}),x("design:type",Boolean)],$7.prototype,"isBackgroundPlayerAlreadyPlaying",void 0);w([R({value:function(){return"ytd-sponsorships-offer-with-video-renderer-"+Sa(this)}}), x("design:type",String)],$7.prototype,"playerId",void 0);w([CE("paper-dialog-scrollable"),x("design:type",Object)],$7.prototype,"scrollable",void 0);w([CE("ytd-sponsorships-tier-renderer"),x("design:type",C2)],$7.prototype,"tierRenderer",void 0);w([CE("#player"),x("design:type",Object)],$7.prototype,"playerElement",void 0);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],$7.prototype,"onYtServiceRequestCompleted",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],$7.prototype,"onYtServiceRequestError",null);w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$7.prototype,"onYtPopupOpened",null);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],$7.prototype,"onYtPopupClosed",null); $7=w([V({is:"ytd-sponsorships-offer-renderer"})],$7);var Mqb;var Nqb;var a8=function(){return O.apply(this,arguments)||this}; p(a8,O);a8.prototype.configureRendererStamper=function(){return{"data.content.sponsorshipsPromotionChannelRenderer.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.header.sponsorshipsPromotionHeaderRenderer.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}}}}; a8.prototype.backgroundColorChanged=function(){var a,b,c,d,f=null===(d=null===(c=null===(b=null===(a=this.data)||void 0===a?void 0:a.content)||void 0===b?void 0:b.sponsorshipsPromotionChannelRenderer)||void 0===c?void 0:c.backgroundColor)||void 0===d?void 0:d.backgroundColor;f&&(f=PN(f),this.$.banner.style.backgroundColor=f,this.$["abstract-art"].style.backgroundColor=f)}; a8.prototype.attached=function(){this.scroller&&(this.scroller.dialogElement=this.parentNode,this.scroller.attached&&"function"===typeof this.scroller.attached&&this.scroller.attached());this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; g.Object.defineProperties(a8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Nqb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n \n \n \n \n \n
\n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mqb){var d=document.createElement("template");d.innerHTML=""; Mqb=d}d=Mqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nqb=a}a=Nqb;return a}}}); var b8=a8;b8.prototype.backgroundColorChanged=b8.prototype.backgroundColorChanged;w([R(),x("design:type",Object)],b8.prototype,"data",void 0);w([P(Z),x("design:type",Object)],b8.prototype,"ytRendererstamperBehavior",void 0);w([CE("#scroller"),x("design:type",Object)],b8.prototype,"scroller",void 0);w([U("data.content.sponsorshipsPromotionChannelRenderer.backgroundColor"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],b8.prototype,"backgroundColorChanged",null); b8=w([V({is:"ytd-sponsorships-promotion-celebration-renderer"})],b8);var Oqb;var Pqb;var c8=function(){var a=O.apply(this,arguments)||this;a.actionMap={"yt-signal-action-submit-notification-options-form":"handleSignalActionSubmitNotificationOptionsForm"};return a}; p(c8,O);c8.prototype.configureRendererStamper=function(){return{"data.secondaryOptions":{id:"secondary-options",mapping:{subscriptionToggleOptionRenderer:"ytd-subscription-toggle-option-renderer"}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.confirmButton":{id:"confirm-button",mapping:{buttonRenderer:"ytd-button-renderer"}}}}; c8.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.ytActionHandlerBehavior.actionMap=this.actionMap}; c8.prototype.handleSignalActionSubmitNotificationOptionsForm=function(){var a=this.data.options[this.$.options.selected].subscriptionRadioOptionRenderer.serviceEndpoint,b=this.$$("ytd-subscription-toggle-option-renderer");b&&a&&a.modifyChannelNotificationPreferenceEndpoint&&(b=b.getValue())&&(a.modifyChannelNotificationPreferenceEndpoint.secondaryParams=[b]);this.actionSenderBehavior.sendServiceRequestAction([a]);this.actionSenderBehavior.sendAction("yt-close-popup-action")}; g.Object.defineProperties(c8.prototype,{initialIndex:{configurable:!0,enumerable:!0,get:function(){if(!this.data||!this.data.options)return null;for(var a=this.data.options,b=0;b
[[getSimpleString(data.title)]]
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Oqb){var d=document.createElement("template");d.innerHTML=""; Oqb=d}d=Oqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Pqb=a}a=Pqb;return a}}}); var d8=c8;w([P(Z),x("design:type",Object)],d8.prototype,"ytRendererstamperBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],d8.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],d8.prototype,"actionSenderBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],d8.prototype,"eventForwardingBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],d8.prototype,"ytRendererBehavior",void 0); w([R(),x("design:type",Object)],d8.prototype,"data",void 0);w([BE("data.options"),x("design:type",Object),x("design:paramtypes",[])],d8.prototype,"initialIndex",null);d8=w([V({is:"ytd-subscription-notification-options-renderer"})],d8);var Qqb;var Rqb;var e8=function(){return O.apply(this,arguments)||this}; p(e8,O);e8.prototype.getValue=function(){return this.checkbox.checked?this.data.params:void 0}; e8.prototype.computeIsInitiallyChecked=function(a){return 1===a}; g.Object.defineProperties(e8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Rqb){var a=document.createElement("template");a.innerHTML="\n [[getSimpleString(data.label)]]\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qqb){var d=document.createElement("template");d.innerHTML=""; Qqb=d}d=Qqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Rqb=a}a=Rqb;return a}}}); var f8=e8;w([P(X.YtRendererBehavior),x("design:type",Object)],f8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],f8.prototype,"data",void 0);w([CE("#checkbox"),x("design:type",Object)],f8.prototype,"checkbox",void 0);f8=w([V({is:"ytd-subscription-toggle-option-renderer"})],f8);var Sqb;var Tqb;var g8=function(){var a=O.apply(this,arguments)||this;a.mandatoryConsentBump=N("mandatory_consent_bump");return a}; p(g8,O);g8.prototype.getDialog=function(){return this.$.dialog}; g8.prototype.getIframe=function(){return this.$.iframe}; g8.prototype.onIronOverlayClosed_=function(){var a=KM(this);a&&a.play()}; g.Object.defineProperties(g8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Tqb){var a=document.createElement("template");a.innerHTML="\n \n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Sqb){var d=document.createElement("template");d.innerHTML=""; Sqb=d}d=Sqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Tqb=a}a=Tqb;return a}}}); var h8=g8;h8.prototype.onIronOverlayClosed_=h8.prototype.onIronOverlayClosed_;w([P(X.YtRendererBehavior),x("design:type",Object)],h8.prototype,"ytRendererBehavior",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],h8.prototype,"mandatoryConsentBump",void 0);w([S("iron-overlay-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],h8.prototype,"onIronOverlayClosed_",null);h8=w([V({is:"ytd-consent-bump-lightbox"})],h8);var Uqb;var Vqb;var i8=function(){var a=O.apply(this,arguments)||this;a.lightbox_=null;a.acceptVe_=null;a.expressVe_=null;a.signinPromptClosed_=!N("kevlar_sign_in_prompt_before_mandatory_consent");a.disableConsentBump_=!cia();a.actionMap={"yt-close-popup-action":"handlePopupClose_"};return a}; p(i8,O);e=i8.prototype;e.handlePopupClose_=function(a){this.signinPromptClosed_||"yt-upsell-dialog-renderer"!==a||(this.signinPromptClosed_=!0,this.maybeForceConsent_(this.data))}; e.ready=function(){var a=this;this.disableConsentBump_||N("kevlar_sign_in_prompt_before_mandatory_consent")&&Ck(Fk,function(){a.forceShowIfNoBlockingSigninPrompt()},5E3)}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap;this.disableConsentBump_?this.hideConsentBump_():(this.listen(window,"message","onReceivedMessage_"),this.lightbox_&&this.fire("yt-add-element-to-app",this.lightbox_))}; e.detached=function(){this.disableConsentBump_||this.unlisten(window,"message","onReceivedMessage_")}; e.maybeForceConsent_=function(a){var b=this;this.disableConsentBump_||(a&&this.async(function(){b.fire("yt-consent-bump-display-changed")}),this.initializeVE_(),a&&a.forceConsent?(this.hideConsentBump_(),this.signinPromptClosed_&&(this.async(this.pausePlayer_.bind(this),1E3),this.openLightbox_())):"true"==Al("HideTicker","false")&&this.hideConsentBump_())}; e.initializeVE_=function(){var a=zL();AL(a,106531,void 0,{layer:4,parentLayer:0});this.acceptVe_=DL(a,{veType:104841},void 0,4);this.expressVe_=DL(a,{veType:105964},void 0,4)}; e.createLightbox_=function(){var a=document.createElement("ytd-consent-bump-lightbox");a.id="consent-bump";document.body.appendChild(a);this.data&&this.data.forceConsent?a.getDialog().modal=!0:a.getDialog().withBackdrop=!0;this.fire("yt-add-element-to-app",a);return a}; e.getConsentBumpIcon_=function(a){return a.toLowerCase()}; e.onReceivedMessage_=function(a){if(!this.lightbox_){var b=this.getLightbox_();if(b)this.lightbox_=b;else return}b=Ad(a.origin);if(xLa[b]&&xLa.hasOwnProperty(b)||jk("consent_url_override"))switch((b=Tn(this.ytRendererBehavior.getScreenLayer()))&&("cb-ui-done-early"===a.data&&this.acceptVe_?BJ(b,this.acceptVe_):"cb-express-done"===a.data&&this.expressVe_&&BJ(b,this.expressVe_)),a.data){case"cb-ui-done-early":case"cb-ui-done":case"cb-express-done":case"cb-already-consented":this.hideConsentBump_(); this.closeLightbox_();this.resumePlayer_();break;case"cb-user-closed":this.closeLightbox_();this.resumePlayer_();break;case"verify-origin":a.source.parent===window&&a.source.postMessage("verify-origin-reply",a.origin);}}; e.onRemindMeLaterTap_=function(){zl("HideTicker","true",86400);this.hideConsentBump_()}; e.onReviewTap_=function(){this.pausePlayer_();this.openLightbox_()}; e.openLightbox_=function(){var a=Tn(this.ytRendererBehavior.getScreenLayer());a&&(this.acceptVe_&&AJ(a,[this.acceptVe_]),this.expressVe_&&N("mandatory_consent_bump")&&AJ(a,[this.expressVe_]));(a=this.getLightbox_())||(a=this.createLightbox_());a.getIframe().src=this.data.iframeUrl;this.lightbox_=a;a.getDialog().open()}; e.closeLightbox_=function(){this.lightbox_.getDialog().close()}; e.pausePlayer_=function(){var a=KM(this);a&&a.pause()}; e.hideConsentBump_=function(){this.hidden=!0;this.fire("yt-consent-bump-display-changed")}; e.resumePlayer_=function(){var a=KM(this);a&&a.play()}; e.getLightbox_=function(){var a=document.querySelector("ytd-app")||document.querySelector("ytg-app");return a?a.querySelector("#consent-bump"):null}; e.forceShowIfNoBlockingSigninPrompt=function(){var a=this.ytActionSenderBehavior.sendAction("yt-get-popup-opened-action",["yt-upsell-dialog-renderer"]);0!==a.length&&a[0]||this.handlePopupClose_("yt-upsell-dialog-renderer")}; g.Object.defineProperties(i8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Vqb){var a=document.createElement("template");a.innerHTML="\n\n\n\n\n\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Uqb){var d=document.createElement("template");d.innerHTML=""; Uqb=d}d=Uqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Vqb=a}a=Vqb;return a}}}); var j8=i8;w([P(X.YtRendererBehavior),x("design:type",Object)],j8.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],j8.prototype,"ytActionSenderBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],j8.prototype,"ytActionHandlerBehavior",void 0);w([R({observer:"maybeForceConsent_"}),x("design:type",Object)],j8.prototype,"data",void 0);j8=w([V({is:"ytd-consent-bump-renderer"})],j8);var Wqb;var Xqb;var Yqb=function(){return O.apply(this,arguments)||this}; p(Yqb,O); g.Object.defineProperties(Yqb,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Xqb){var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Wqb){var d=document.createElement("template");d.innerHTML=""; Wqb=d}d=Wqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Xqb=a}a=Xqb;return a}}}); var k8=Yqb;w([P(X.YtRendererBehavior),x("design:type",Object)],k8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],k8.prototype,"data",void 0);k8=w([V({is:"ytd-tvfilm-offer-groups-renderer"})],k8);var Zqb;var $qb;var l8=function(){return O.apply(this,arguments)||this}; p(l8,O);l8.prototype.dataChanged=function(){this.userInput=this.data.couponCode?this.data.couponCode:"";this.validate()}; l8.prototype.onSubmit=function(){var a=this.data.serviceEndpoint;a&&a.ypcGetOffersEndpoint&&(a.ypcGetOffersEndpoint.couponCode=this.userInput,this.ytRendererBehavior.sendServiceRequestAction([a]))}; l8.prototype.validate=function(){var a=!(!this.data||!this.data.couponCode||this.data.couponCode!==this.userInput);this.showTick=a&&!this.data.errorMessage;this.showErrorMessage=a&&!!this.data.errorMessage;this.hideApplyButton=!this.userInput||this.showTick||this.showErrorMessage;this.disableApplyButton=null==this.userInput.match(/^[\d\w]{12}$/)}; g.Object.defineProperties(l8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===$qb){var a=document.createElement("template");a.innerHTML=" \n \n \n [[data.errorMessage]]\n \n \n\n \n\n \n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zqb){var d=document.createElement("template");d.innerHTML=""; Zqb=d}d=Zqb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);$qb=a}a=$qb;return a}}}); var m8=l8;w([P(X.YtRendererBehavior),x("design:type",Object)],m8.prototype,"ytRendererBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],m8.prototype,"data",void 0);w([R(),x("design:type",String)],m8.prototype,"userInput",void 0);w([R(),x("design:type",Boolean)],m8.prototype,"disableApplyButton",void 0);w([R(),x("design:type",Boolean)],m8.prototype,"hideApplyButton",void 0);w([R(),x("design:type",Boolean)],m8.prototype,"hideErrorMessage",void 0); w([R(),x("design:type",Boolean)],m8.prototype,"showTick",void 0);w([R(),x("design:type",Boolean)],m8.prototype,"showErrorMessage",void 0);m8=w([V({is:"ytd-ypc-coupon-renderer"})],m8);var arb;var brb;var n8=function(){return O.apply(this,arguments)||this}; p(n8,O);e=n8.prototype;e.configureRendererStamper=function(){return{"data.offers":{id:"offers",mapping:{tvfilmOffersRenderer:{component:"ytd-tvfilm-offer-groups-renderer"}}},"data.coupon":{id:"coupon",mapping:{ypcCouponRenderer:"ytd-ypc-coupon-renderer"}},"data.thumbnailOverlays":{id:"overlays",mapping:{thumbnailOverlayTimeStatusRenderer:"ytd-thumbnail-overlay-time-status-renderer"}}}}; e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true");this.hasAttribute("aria-label")||this.setAttribute("aria-label","Offers")}; e.computeThumbnailClass=function(a){return a.thumbnailOverlays?a.isShow?"thumbnail-show":"thumbnail-movie":a.isShow?"thumbnail-no-overlay-show":"thumbnail-no-overlay-movie"}; e.computeCommerceSectionClass=function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"commerce-section-groups":"commerce-section-tabs"}; e.computeTitleClass=function(a){return a.offers&&a.offers.tvfilmOffersRenderer?"title-with-offer-groups":""}; e.onDataChanged=function(){this.querySelectorAll("yt-img-shadow").forEach(function(a){a.onShow()})}; g.Object.defineProperties(n8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===brb){var a=document.createElement("template");a.innerHTML="\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===arb){var d=document.createElement("template");d.innerHTML=""; arb=d}d=arb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);brb=a}a=brb;return a}}}); var o8=n8;o8.prototype.onDataChanged=o8.prototype.onDataChanged;w([P(Z),x("design:type",Object)],o8.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],o8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],o8.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],o8.prototype,"onDataChanged",null);o8=w([V({is:"ytd-ypc-offers-overlay-renderer"})],o8);var crb;var drb;var p8=function(){var a=O.apply(this,arguments)||this;a.isSafari=void 0;a.microphoneSpinnerActive=!1;a.noAnimations=!1;a.boundExitClick=function(){a.onExitButtonClick()}; a.speechOverlayClassName="";a.isLevelAnimating=!1;a.actionMap={"yt-speech-query-complete-action":"handleSpeechQueryCompleteAction"};return a}; p(p8,O);e=p8.prototype;e.configureRendererStamper=function(){return{"data.exitButton":{id:"exit-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundExitClick]]"}}}}}}; e.attached=function(){this.setAttribute("dialog","true");this.ytActionHandlerBehavior.actionMap=this.actionMap;this.manager=aeb()}; e.dataChanged=function(){this.logDialog()}; e.onPopupClosed=function(){this.manager&&(this.manager.reset(),this.manager.stop())}; e.handleSpeechQueryCompleteAction=function(a){var b=a.navigationAction;b&&(a.trackingParams&&CL(zL(),a.trackingParams,this.dialogVe,5),this.fire("yt-navigate",{endpoint:b,tempData:this.getNavigationParams(),createScreenConfig:{parentLayer:5}}),this.closeDialog())}; e.onExitButtonClick=function(){this.closeDialog()}; e.onMicrophoneTap=function(){var a,b;"listening"===this.state||"transcribing"===this.state?null===(a=this.manager)||void 0===a?void 0:(a.setState("microphone-off"),a.stop()):null===(b=this.manager)||void 0===b?void 0:b.start()}; e.transcriptionChanged=function(){this.setState("transcribing",this.transcription)}; e.stateChanged=function(){this.setState(this.state,this.transcription)}; e.logDialog=function(){var a;if(null!==(a=this.data)&&void 0!==a&&a.trackingParams){var b=zL();AL(b,22678,void 0,{layer:5,parentLayer:0});this.dialogVe=CL(b,this.data.trackingParams,void 0,5)}}; e.getNavigationParams=function(){var a=window.ytvoicesearchloggingparams,b={};a&&(a=a())&&(b.oq=a.oq,b.gs_l=a.gs_l);return b}; e.closeDialog=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-voice-search-dialog-renderer"])}; e.setState=function(a,b){if(this.data){var c=this.data,d={};switch(a){case"listening":d={headerText:c.placeholderHeader,microphoneState:"listening"};break;case"timeout":d={headerText:c.promptHeader,microphoneState:"try-again",microphoneLabel:c.promptMicrophoneLabel};break;case"microphone-off":d={headerText:c.microphoneOffPromptHeader,microphoneState:"try-again",microphoneLabel:c.promptMicrophoneLabel};break;case"transcribing":d=b?{transcriptionLow:null===b||void 0===b?void 0:b.low,transcriptionHigh:null=== b||void 0===b?void 0:b.high,microphoneState:"speaking"}:{headerText:c.placeholderHeader,microphoneState:"speaking"};break;case"processing":d={headerText:c.loadingHeader,microphoneState:"processing"};break;case"offline":d={headerText:c.connectionErrorHeader,microphoneState:"try-again",microphoneLabel:c.connectionErrorMicrophoneLabel};break;case"permission":d={headerText:c.permissionsHeader,bodyLine1:c.permissionsSubtext,microphoneState:"try-again"};break;case"permission-denied":d={headerText:c.disabledHeader, bodyLine1:c.disabledSubtext,microphoneState:"try-again"};}d.className=a;this.speechOverlayState=d;this.setClass(this.speechOverlayState.className);this.setMicrophoneState(this.speechOverlayState.microphoneState)}}; e.setMicrophoneState=function(a){var b=this.isLevelAnimating;this.isLevelAnimating="speaking"===a;!b&&this.isLevelAnimating&&this.runLevelAnimation();this.microphoneSpinnerActive="processing"===a&&!this.noAnimations}; e.setClass=function(a){this.speechOverlayClassName&&this.toggleClass(this.speechOverlayClassName,!1);a&&(this.speechOverlayClassName=a,this.toggleClass(a,!0))}; e.runLevelAnimation=function(){var a=this;if(!this.noAnimations&&this.level)if(this.isLevelAnimating){var b=1+.75*Math.random(),c=Math.round(110+10*Math.random());this.level.style.setProperty("transition","transform "+c/1E3+"s ease-in-out");this.level.style.setProperty("transform","scale("+b+")");Fk.addJob(function(){a.runLevelAnimation()},3,c)}else this.level.style.removeProperty("opacity"),this.level.style.removeProperty("transition"),this.level.style.removeProperty("transform")}; g.Object.defineProperties(p8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===drb){var a=document.createElement("template");a.innerHTML="
\n
\n \n
[[speechOverlayState.transcriptionHigh]]
\n
[[speechOverlayState.transcriptionLow]]
\n
\n
\n
\n
\n
[[getSimpleString(speechOverlayState.bodyLine1)]]
\n
[[getSimpleString(speechOverlayState.bodyLine2)]]
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
[[getSimpleString(speechOverlayState.microphoneLabel)]]
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===crb){var d=document.createElement("template");d.innerHTML=""; crb=d}d=crb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);drb=a}a=drb;return a}}}); var q8=p8;q8.prototype.stateChanged=q8.prototype.stateChanged;q8.prototype.transcriptionChanged=q8.prototype.transcriptionChanged;q8.prototype.onPopupClosed=q8.prototype.onPopupClosed;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],q8.prototype,"ytActionHandlerBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],q8.prototype,"ytActionSenderBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],q8.prototype,"ytRendererBehavior",void 0); w([P(Z),x("design:type",Object)],q8.prototype,"rendererStamperBehavior",void 0);w([P(CQ),x("design:type",Object)],q8.prototype,"ytdReduxBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],q8.prototype,"eventForwardingBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],q8.prototype,"data",void 0);w([R(),x("design:type",Object)],q8.prototype,"speechOverlayState",void 0);w([R(),x("design:type",Object)],q8.prototype,"microphoneSpinnerActive",void 0); w([R({type:Boolean,reflectToAttribute:!0}),x("design:type",Object)],q8.prototype,"noAnimations",void 0);w([R({selector:function(a){var b;return null===(b=a.voiceSearch)||void 0===b?void 0:b.transcription}}), x("design:type",Object)],q8.prototype,"transcription",void 0);w([R({selector:function(a){var b;return null===(b=a.voiceSearch)||void 0===b?void 0:b.overlay}}), x("design:type",String)],q8.prototype,"state",void 0);w([R(),x("design:type",Object)],q8.prototype,"boundExitClick",void 0);w([CE("#microphone-levels"),x("design:type",HTMLElement)],q8.prototype,"level",void 0);w([S("yt-popup-closed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q8.prototype,"onPopupClosed",null);w([U("transcription"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q8.prototype,"transcriptionChanged",null); w([U("state"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],q8.prototype,"stateChanged",null);q8=w([V({is:"ytd-voice-search-dialog-renderer"})],q8);var erb;var frb;var r8=function(){var a=O.apply(this,arguments)||this;a.duration=4E3;a.numDownloadingVideos=0;a.totalDownloadProgress=0;a.currentDownloadProgress=0;a.isFullScreen=!1;a.actionMap={"yt-fullscreen-change-action":"handleFullscreenChange"};return a}; p(r8,O);e=r8.prototype;e.open=function(){this.notificationActionRenderer.open()}; e.close=function(){this.notificationActionRenderer.close()}; e.updatePopup=function(){if(this.data&&!this.isFullScreen)if(0===this.numDownloadingVideos)this.close();else{var a=YK("VIDEOS_DOWNLOADING").length?ZK("VIDEOS_DOWNLOADING",this.numDownloadingVideos):"Downloading "+this.numDownloadingVideos+" "+(1"; a.content.insertBefore(WO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(VO().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===erb){var d=document.createElement("template");d.innerHTML=""; erb=d}d=erb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);frb=a}a=frb;return a}}}); var s8=r8;s8.prototype.updateCurrentDownloadProgress=s8.prototype.updateCurrentDownloadProgress;s8.prototype.updatePopup=s8.prototype.updatePopup;w([P(X.YtRendererBehavior),x("design:type",Object)],s8.prototype,"ytRendererBehavior",void 0);w([P(CQ),x("design:type",Object)],s8.prototype,"ytdReduxBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],s8.prototype,"ytEventForwardingBehavior",void 0); w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],s8.prototype,"actionHandlerBehavior",void 0);w([R(),x("design:type",Object)],s8.prototype,"data",void 0);w([R(),x("design:type",Number)],s8.prototype,"duration",void 0);w([R({selector:t1a}),x("design:type",Number)],s8.prototype,"numDownloadingVideos",void 0);w([R({selector:function(a){return mRa(CRa(a.download))}}), x("design:type",Object)],s8.prototype,"totalDownloadProgress",void 0);w([R(),x("design:type",Object)],s8.prototype,"currentDownloadProgress",void 0);w([CE("yt-notification-action-renderer"),x("design:type",Object)],s8.prototype,"notificationActionRenderer",void 0);w([U("numDownloadingVideos"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s8.prototype,"updatePopup",null); w([U("totalDownloadProgress"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],s8.prototype,"updateCurrentDownloadProgress",null);s8=w([V({is:"ytd-video-download-toast-renderer"})],s8);var grb;var hrb;var t8=function(){return O.apply(this,arguments)||this}; p(t8,O);t8.prototype.computeThumbnailUrl=function(a){return a&&a.thumbnails?vO(a.thumbnails,122):null}; t8.prototype.computeUrlForEndpoint=function(a){return hL(a)}; g.Object.defineProperties(t8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hrb){var a=document.createElement("template");a.innerHTML="\"[[data.logoTitleText]]\"\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===grb){var d=document.createElement("template");d.innerHTML="";grb=d}d=grb;c.call(b,d.content.cloneNode(!0),a.content.firstChild); hrb=a}a=hrb;return a}}}); var u8=t8;w([P(X.YtRendererBehavior),x("design:type",Object)],u8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],u8.prototype,"data",void 0);u8=w([V({is:"ytd-yoodle-renderer"})],u8);var irb;var jrb;var v8=function(){return O.apply(this,arguments)||this}; p(v8,O);v8.prototype.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; g.Object.defineProperties(v8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jrb){var a=document.createElement("template");a.innerHTML="\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===irb){var d=document.createElement("template");d.innerHTML=""; irb=d}d=irb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jrb=a}a=jrb;return a}}}); var w8=v8;w([P(X.YtRendererBehavior),x("design:type",Object)],w8.prototype,"ytRendererBehavior",void 0);w([R(),x("design:type",Object)],w8.prototype,"data",void 0);w8=w([V({is:"ytd-ypc-transaction-error-message-renderer"})],w8);var krb;var lrb;var mrb;var nrb;var x8=function(){var a=O.apply(this,arguments)||this;a.hasFocus=!1;a.sboxJsUrl_="";return a}; p(x8,O);e=x8.prototype;e.created=function(){this.searchButton_=this.querySelector("#search-icon-legacy")}; e.attached=function(){var a=this;this.hasAttribute("role")||this.setAttribute("role","search");this.listen(document,"yt-navigate-finish","onYtNavigateFinish_");Polymer.dom(this.$.container).observeNodes(function(b){eb(b.addedNodes,function(c){1==c.nodeType&&"search-input"==c.id&&(this.searchInput_=c.firstElementChild,this.loadSearchbox_(),this.searchInput_.hidden=!1,this.listen(this.searchInput_,"focus","onInputFocus_"),this.listen(this.searchInput_,"blur","onInputBlur_"))},a)})}; e.focus=function(){this.searchInput_.focus()}; e.computePlaceholder_=function(a,b){a=a?nL(a):YK("SBOX_PLACEHOLDER",void 0,"Search");b&&(b.placeholder=a,b.setAttribute("aria-label",a));return a}; e.hideKeyboard=function(){var a=document.getElementById("kbd"),b=document.querySelector(".gsst_a");a&&b&&"none"!=a.style.display&&b.click()}; e.search_=function(a){var b,c,d=this.searchInput_.value,f=!0;if(d){rd("REFINEMENTS_TUPLE",["ClearBySearchbox",[]]);this.data&&(a.itct=this.data.trackingParams);var h=this.data&&this.data.searchEndpoint;if(h){var l=y.unsafeClone(h);l.searchEndpoint&&(l.searchEndpoint.query=d);(null===(c=null===(b=l.commandMetadata)||void 0===b?void 0:b.webCommandMetadata)||void 0===c?0:c.url)?(f=Md(l.commandMetadata.webCommandMetadata.url,"search_query",d),f=f.replace(/%20/g,"+"),l.commandMetadata.webCommandMetadata.url= f,h.clickTrackingParams&&(a.itct=h.clickTrackingParams),this.fire("yt-navigate",{endpoint:l,tempData:a}),f=!1):ud(Error("SearchEndpoint missing url. Endpoint: "+JSON.stringify(h)))}this.previousQuery_=d}return f}; e.onYtNavigateFinish_=function(){var a=this,b=location.href;if(0<=b.indexOf("/results")){var c=Kd(b,"q")||Kd(b,"search_query");c&&(this.searchInput_?this.searchInput_.value=c:Polymer.RenderStatus.afterNextRender(this,function(){a.searchInput_.value=c}))}}; e.initializeSearchbox_=function(){var a=A("SBOX_SETTINGS");a.SBOX_STRINGS={SBOX_REPORT_SUGGESTIONS:YK("SBOX_INAPPROPRIATE_PROMPT",void 0,"Report search predictions")};a.SEARCHBOX_REPORTING=N("searchbox_reporting");a.SEARCHBOX_COMPONENT=this;return(a=Ka("yt.www.masthead.searchbox.initPolymer"))?(a(this.$["search-form"],this.searchInput_,this.$["search-icon-legacy"],this.search_.bind(this)),this.searchInput_.classList.add("ytd-searchbox"),!0):!1}; e.loadSearchbox_=function(){var a=A("SBOX_JS_URL",this.sboxJsUrl_);a&&(this.sboxJsUrl_=a,this.initializeSearchbox_()||this.setupSearchboxLoad_(a,this.initializeSearchbox_.bind(this)))}; e.setupSearchboxLoad_=function(a,b){var c=this,d=function(){c.cancelSearchboxLoad_();c.sboxJsCallback_=b;try{WI(a,b)}catch(n){vd(n)}tk([f,h,l,m])}; var f=uk(this.searchInput_,"mouseover",d);var h=uk(this.searchInput_,"keypress",d);var l=uk(this.searchButton_,"mouseover",d);var m=uk(this.searchButton_,"keypress",d)}; e.cancelSearchboxLoad_=function(){if(!Ka("yt.www.masthead.searchbox.initPolymer")){try{RKa(this.sboxJsUrl_,this.sboxJsCallback_)}catch(a){}this.sboxJsCallback_=null}}; e.onInputFocus_=function(){this.hasFocus=!0;this.fire("yt-autonav-pause-focus")}; e.onInputBlur_=function(){this.hasFocus=!1;this.fire("yt-autonav-pause-blur")}; e.logSearchboxVisibility_=function(){var a,b=null===(a=this.data)||void 0===a?void 0:a.trackingParams,c=Tn();c&&b&&zJ(c,Nn(b))}; e.openReportForm=function(a){a={openPopupAction:{popup:{searchSuggestionReportDialog:{searchQuery:this.searchInput_.value,title:YK("SBOX_INAPPROPRIATE_TITLE"),suggestions:a,catagoryLabel:YK("SBOX_INAPPROPRIATE_CATEGORY"),catagories:[{id:1,label:YK("SBOX_INAPPROPRIATE_HATEFUL")},{id:2,label:YK("SBOX_INAPPROPRIATE_EXPLICIT")},{id:3,label:YK("SBOX_INAPPROPRIATE_VIOLENT")},{id:4,label:YK("SBOX_INAPPROPRIATE_DANGEROUS")},{id:5,label:YK("SBOX_INAPPROPRIATE_OTHER"),reasonLabel:YK("SBOX_INAPPROPRIATE_REASON")}], detailsPlaceholderLabel:YK("SBOX_INAPPROPRIATE_ADDITIONAL"),cancelButtonLabel:YK("SBOX_INAPPROPRIATE_CANCEL"),submitButtonLabel:YK("SBOX_INAPPROPRIATE_REPORT")}},popupType:"DIALOG"}};this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[a,this])}; e.getPreviousQuery=function(){return this.previousQuery_?this.previousQuery_:null}; e.getRefinementsTuple=function(){if("REFINEMENTS_TUPLE"in qd){var a=A("REFINEMENTS_TUPLE",void 0);rd("REFINEMENTS_TUPLE",void 0);return a}return null}; e.getForm=function(){return this.$["search-form"]}; g.Object.defineProperties(x8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===nrb){var a=document.createElement("template");a.innerHTML="
\n
\n \n \n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===mrb){var d=document.createElement("template");d.innerHTML=""; mrb=d}d=mrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);nrb=a}a=nrb;return a}}}); var y8=x8;y8.prototype.getRefinementsTuple=y8.prototype.getRefinementsTuple;y8.prototype.getPreviousQuery=y8.prototype.getPreviousQuery;y8.prototype.openReportForm=y8.prototype.openReportForm;y8.prototype.logSearchboxVisibility_=y8.prototype.logSearchboxVisibility_;w([P(X.YtRendererBehavior),x("design:type",Object)],y8.prototype,"ytRendererBehavior",void 0);w([P(W.YtActionSenderBehavior),x("design:type",Object)],y8.prototype,"ytActionSenderBehavior",void 0); w([R(),x("design:type",Object)],y8.prototype,"data",void 0);w([R({reflectToAttribute:!0}),x("design:type",Object)],y8.prototype,"hasFocus",void 0);w([R({computed:"computeIcon_(data.icon)"}),x("design:type",String)],y8.prototype,"icon_",void 0);w([R({computed:"computePlaceholder_(data.placeholderText, searchInput_)"}),x("design:type",String)],y8.prototype,"placeholder_",void 0);w([R(),x("design:type",Object)],y8.prototype,"searchInput_",void 0); w([U("data.trackingParams"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],y8.prototype,"logSearchboxVisibility_",null);y8=w([V({is:"ytd-searchbox"})],y8);var orb;var prb;var z8=function(){var a=O.apply(this,arguments)||this;a.isTimeForYoodle=!1;a.actionMap={"yt-navigate-home-action":"onNavigateHomeAction"};return a}; p(z8,O);e=z8.prototype;e.created=function(){var a=this;this.yoodleManager=new ceb(function(b){a.isTimeForYoodle=b})}; e.attached=function(){this.ytActionHandlerBehavior.actionMap=this.actionMap}; e.computeIsRedLogo=function(a){return"YOUTUBE_RED_LOGO"===a||"YOUTUBE_PREMIUM_LOGO"===a}; e.computeTooltipText=function(a){return nL(a)}; e.computeShowYoodle=function(a,b,c){return a&&N("enable_yoodle_web")&&b&&!!c}; e.computeYoodleData=function(a,b,c,d){if(N("enable_yoodle_web")&&d){if(jk("yoodle_base_url")){d=jk("yoodle_base_url");var f=jk("yoodle_webp_base_url");a={thumbnail:{thumbnails:[{url:""+(f?f:d)+(b?"_light":"_dark")+(a?"_premium":"")+"."+(f?"webp":"png"),width:110,height:30}]},logoTitleText:jk("yoodle_alt_text")||c}}else a=void 0;return a}}; e.onNavigateHomeAction=function(){this.$$(".yt-simple-endpoint").click()}; e.computeLogoHref=function(a){a=this.componentBehavior.computeHref_(a);return!a&&N("kevlar_topbar_logo_fallback_home")?"/":a}; e.getEndpointForm=function(){return{disableCache:!0}}; g.Object.defineProperties(z8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===prb){var a=document.createElement("template");a.innerHTML="\n \n \n\n[[countryCode]]\n"; a.content.insertBefore(HXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===orb){var d=document.createElement("template");d.innerHTML=""; orb=d}d=orb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);prb=a}a=prb;return a}}}); var A8=z8;w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],A8.prototype,"ytActionHandlerBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],A8.prototype,"ytRendererBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],A8.prototype,"componentBehavior",void 0);w([R(),x("design:type",Object)],A8.prototype,"data",void 0);w([R(),x("design:type",String)],A8.prototype,"countryCode",void 0);w([R(),x("design:type",Boolean)],A8.prototype,"isTimeForYoodle",void 0); w([R({value:!1,computed:"computeIsRedLogo(data.iconImage.iconType)"}),x("design:type",Boolean)],A8.prototype,"isRedLogo",void 0);w([R({computed:"computeTooltipText(data.tooltipText)"}),x("design:type",String)],A8.prototype,"tooltipText",void 0);w([R({computed:"computeYoodleData(isRedLogo, isWhite, tooltipText, isTimeForYoodle)"}),x("design:type",Object)],A8.prototype,"yoodleData",void 0);w([R({value:!1}),x("design:type",Boolean)],A8.prototype,"isWhite",void 0); w([R({value:!1}),x("design:type",Boolean)],A8.prototype,"useYoodle",void 0);w([R({computed:"computeShowYoodle(useYoodle,isTimeForYoodle,yoodleData)"}),x("design:type",Boolean)],A8.prototype,"showYoodle",void 0);A8=w([V({is:"ytd-topbar-logo-renderer"})],A8);var qrb=document.createElement("template");qrb.innerHTML="";document.head.appendChild(qrb.content);var rrb={}; rrb.YtSwatchBehavior={_noAccessors:!0,properties:{swatch:{type:Object,observer:"updateStylesOnSwatchChanged_"}},created:function(){var a=this;this.LIGHT_TEXT_COLOR_=[255,255,255];this.DARK_TEXT_COLOR_=[17,17,17,.6];this.LIGHTENED_DARK_TEXT_COLOR_=[17,17,17,.4];this.RGB_MASK_=16777215;this.RED_MASK_=16711680;this.GREEN_MASK_=65280;this.BLUE_MASK_=255;this.baseColor_="#fff";this.isHighContrastBlack_=!1;Polymer.RenderStatus.afterNextRender(this,function(){if(null==fVa){var b=$f(),c=b.getDocument(),d= b.createElement("div");d.style.backgroundColor="rgb(1, 2, 3)";b.appendChild(c.body,d);c=sh(d,"backgroundColor");c=c.replace(/ /g,"");fVa="rgb(0,0,0)"===c?"black":"rgb(255,255,255)"===c?"white":null;b.removeNode(d)}a.isHighContrastBlack_="black"==fVa;a.isHighContrastBlack_&&a.setSwatch("#000")}); this.DEFAULT_MODE_BASE_COLOR="#fff";this.THEATER_MODE_BASE_COLOR="#232323";this.DEFAULT_DOCUMENT_BACKGROUND_COLOR="#fff";this.DARKMODE_DOCUMENT_BACKGROUND_COLOR="#131313";this.DARKMODE_META_THEME_COLOR=[33,33,33,.98];this.LIGHTMODE_META_THEME_COLOR=[255,255,255,.98]}, rgbStyle_:function(a){return 3==a.length?"rgb("+a.join(",")+")":"rgba("+a.join(",")+")"}, resetSwatch:function(){this.setSwatch("#fff")}, isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")}, metaThemeColor_:function(a){return a?this.rgbStyle_(this.DARKMODE_META_THEME_COLOR):this.rgbStyle_(this.LIGHTMODE_META_THEME_COLOR)}, setSwatchWithArgb:function(a){a&=this.RGB_MASK_;var b=[(a&this.RED_MASK_)>>16,(a&this.GREEN_MASK_)>>8,a&this.BLUE_MASK_];a&&this.setSwatch(AG(b))}, getCurrentSwatch:function(){return this.baseColor_}, setSwatch:function(a){this.isHighContrastBlack_&&(a="#000");if(this.baseColor_!=a){var b=a;if(!YFa.test(b))throw Error("'"+b+"' is not a valid hex color");4==b.length&&(b=b.replace(XFa,"#$1$1$2$2$3$3"));b=b.toLowerCase();b=parseInt(b.substr(1),16);b=[b>>16,b>>8&255,b&255];var c=[0,0,0];var d=Tf(.1,0,1);d=[Math.round(b[0]+d*(c[0]-b[0])),Math.round(b[1]+d*(c[1]-b[1])),Math.round(b[2]+d*(c[2]-b[2]))];var f=this.isTextLightColor_(b),h="#ffffff"===AG(b);c=this.DARK_TEXT_COLOR_;h?c=this.LIGHTENED_DARK_TEXT_COLOR_: f&&(c=this.LIGHT_TEXT_COLOR_);f=h?"":this.rgbStyle_(c);h=h?"":this.rgbStyle_(this.LIGHT_TEXT_COLOR_);var l=BG(136,136,136);this.set("swatch",{baseColor:a,iconColor:l,inputText:this.pickInputTextColor_(b),logoOverrideColor:h,primary:this.rgbStyle_(b),primaryDarker:this.rgbStyle_(d),textColor:this.rgbStyle_(c),textImportantColor:f,textboxBg:this.pickTextboxBgColor_(b)});this.fire("yt-swatch-changed",this.swatch)}}, isTextLightColor_:function(a){return .5>(.299*a[0]+.587*a[1]+.114*a[2])/255}, pickInputTextColor_:function(a){return"#ffffff"==AG(a)?BG(17,17,17):"#232323"==AG(a)?BG(255,255,255):BG(17,17,17)}, pickTextboxBgColor_:function(a){return"#ffffff"==AG(a)?BG(255,255,255):"#232323"==AG(a)?BG(19,19,19):BG(255,255,255)}, applySwatchToElement:function(a,b){a&&b&&b.baseColor!=a.baseColor_&&(a.baseColor_=b.baseColor,a.updateStyles({"--yt-swatch-primary":this.swatch.primary,"--yt-swatch-primary-darker":this.swatch.primaryDarker,"--yt-swatch-text":this.swatch.textColor,"--yt-swatch-important-text":this.swatch.textImportantColor,"--yt-swatch-input-text":this.swatch.inputText,"--yt-swatch-textbox-bg":this.swatch.textboxBg,"--yt-swatch-logo-override":this.swatch.logoOverrideColor,"--yt-swatch-icon-color":this.swatch.iconColor}))}, updateStylesOnSwatchChanged_:function(a){this.applySwatchToElement(this,a)}};Polymer({is:"ytd-masthead",_template:function(){if(void 0!==lrb)return lrb;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n
\n \n \n \n \n \n [[menuStrings_.BACK_ALT_LABEL]]\n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n \n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===krb){var d=document.createElement("template");d.innerHTML=""; krb=d}d=krb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return lrb=a}, behaviors:[Polymer.IronResizableBehavior,j2a.YtdExpandableInputBehavior,l2a.YtdGuideStateAwareBehavior,Z,kO.YtComponentBehavior,X.YtRendererBehavior,rrb.YtSwatchBehavior],hostAttributes:{role:"banner"},properties:{data:{type:Object,observer:"dataChanged_"},narrow_:{type:Boolean,value:!1,observer:"narrowChanged_"},voiceEnabled_:Boolean,menuStrings_:{type:Object,value:{BACK_ALT_LABEL:YK("BACK_ALT_LABEL",void 0,"Back"),GUIDE_ALT_LABEL:YK("GUIDE_ALT_LABEL",void 0,"Guide"),LOGO_ALT_LABEL:YK("LOGO_ALT_LABEL", void 0,"YouTube Home"),SEARCH_ALT_LABEL:YK("SBOX_PLACEHOLDER",void 0,"Search")}},dark:{type:Boolean,reflectToAttribute:!0},boundOnTapVoiceButton:{type:Function,value:function(){return this.onVoiceTap_.bind(this)}}}, listeners:{"iron-resize":"onIronResize_","yt-consent-bump-display-changed":"onYtConsentBumpDisplayChanged_","yt-rendererstamper-finished":"onRendererStamperFinished_"},stampDom:{"data.ticker":{id:"ticker",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.interstitial":{id:"interstitial",mapping:{consentBumpRenderer:"ytd-consent-bump-renderer"}},"data.voiceSearchButton":{id:"voice-search-button",mapping:{buttonRenderer:{component:"ytd-button-renderer",properties:{"on-tap":"[[boundOnTapVoiceButton]]"}}}}, "data.topbarButtons":{id:"buttons",events:!0,mapping:{buttonRenderer:"ytd-button-renderer",notificationTopbarButtonRenderer:"ytd-notification-topbar-button-renderer",topbarMenuButtonRenderer:"ytd-topbar-menu-button-renderer"},initialRenderPriority:1},"data.a11ySkipNavigationButton":{id:"skip-navigation",mapping:{buttonRenderer:"ytd-button-renderer"}}},created:function(){this.guideKeyboardToggle_=this.areGhostCardsHidden_=this.isDarkThemeForced=!1;this.voiceSearchManager_=aeb()}, attached:function(){var a=this,b=ao(Zn.getInstance(),"aa");this.toggleClass("shell",!1);!this.classList.contains("dark")&&!this.classList.contains("theater")||b||(this.isDarkThemeForced=this.dark=!0);this.$.logo.hidden=!0;Polymer.RenderStatus.afterNextRender(this,function(){var c=a.getParentRenderer_();c&&c.registerRenderer_(a)})}, dataChanged_:function(a){a&&(a.voiceSearchButton&&(this.voiceEnabled_=aeb().isSupported()),a.onReceivedActions&&0\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===srb){var d=document.createElement("template");d.innerHTML=""; srb=d}d=srb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);trb=a}a=trb;return a}}}); var C8=B8;w([R(),x("design:type",String)],C8.prototype,"bannerString",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],C8.prototype,"bannerVisible",void 0);C8=w([V({is:"ytd-network-status-banner"})],C8);var urb;var vrb;var D8=function(a){var b=a.openPopupAction,c=a.target,d=a.container,f=a.popupContainerConfig;a=a.getElement;this.popupContent=this.popup=void 0;this.openPopupAction=b;this.target=c;this.container_=d;this.popupContainerConfig_=f;this.naturalHeight_=void 0;this.getElement_=a;this.popupConfig_=this.popupContainerConfig_.popupConfig[this.openPopupAction.popupType];b=(b=wrb(this))?mL(b,Kdb(this.popupContainerConfig_,b)):"";this.rendererName=b;b=this.popupConfig_.component;this.popupContent=xrb(this,this.rendererName); b?(this.popup=xrb(this,b),N("kevlar_keyboard_button_focus")&&(this.popup.restoreFocusOnClose=!0),this.popupConfig_.slotName&&this.popupContent.setAttribute("slot",this.popupConfig_.slotName),Polymer.dom(this.popup).appendChild(this.popupContent),document.body.appendChild(this.popup)):this.popup=this.popupContent;Polymer.dom(this.container_.root).appendChild(this.popup)}; D8.prototype.updatePopup=function(a){this.openPopupAction=a;yrb(this);zrb(this);N("kevlar_keyboard_button_focus")&&(this.popup.restoreFocusOnClose=!0)}; D8.prototype.refit=function(){this.popup.opened&&this.popup.refit()}; var Brb=function(a,b){Arb(a,b&&a.popupConfig_.narrowProperties?a.popupConfig_.narrowProperties:a.popupConfig_.properties);a.isRtl_()&&Arb(a,a.popupConfig_.rtlProperties);zrb(a)},yrb=function(a){a.popupContent.set("data",(0,y.unsafeClone)(a.openPopupAction.popup[wrb(a)])); a.popupContent.duration=a.getPopupDurationMs_();a.popupContent.positionType=a.openPopupAction.position;var b=a.openPopupAction.properties;b&&Object.keys(b).forEach(function(c){a.popupContent[c]=b[c]})},Arb=function(a,b){if(b)for(var c in b)a.popup[c]=b[c]},zrb=function(a){if(a.openPopupAction.position){var b=a.popupConfig_.positionalProperties&&a.popupConfig_.positionalProperties[a.openPopupAction.position],c=a.popupConfig_.rtlPositionalProperties&&a.popupConfig_.rtlPositionalProperties[a.openPopupAction.position]; b=a.isRtl_()&&c?c:b;b.shiftedHorizontalOffset&&(c=a.popup.style.display,a.popup.style.display="block",a.popupContent&&a.popup.positionTarget&&a.popupContent.clientWidth>a.popup.positionTarget.clientWidth&&(b.horizontalOffset=a.popup.positionTarget.clientWidth/2-b.shiftedHorizontalOffset),a.popup.style.display=c);Arb(a,b)}},Crb=function(a,b){if(b)for(var c in b)a.popup.style[c]=b[c]},wrb=function(a){return lL(a.openPopupAction.popup,"renderer")||lL(a.openPopupAction.popup,"dialog")||void 0}; D8.prototype.getPopupDurationMs_=function(){var a=this.openPopupAction.durationHintMs;return 0===a?a:Math.max(4E3,a||4E3)}; D8.prototype.isRtl_=function(){return"rtl"==A("HTML_DIR")}; var xrb=function(a,b){(a=a.getElement_(b,a.target))?a.is?a.set||Am(new Ul("popup getElement result is not initialized",b)):Am(new Ul("popup getElement result is not a polymer element",b)):Am(new Ul("popup getElement returned null",b));return a};var Drb=[kO.YtComponentBehavior,xO.YtActionHandlerBehavior,{created:function(){this.popupContainerConfig=null;this.popups_={};this.popupContainerActionMap_={"yt-close-popup-action":"handleClosePopupAction_","yt-close-popups-action":"handleClosePopupsAction_","yt-close-all-popups-action":"handleCloseAllPopupsAction_","yt-get-popup-opened-action":"handleGetPopupOpenedAction_","yt-get-opened-popups-action":"handleGetOpenedPopupsAction_","yt-open-popup-action":"handleOpenPopupAction_","yt-signal-action-close-popup":"handleSignalActionClosePopup_", "yt-window-scrolled":"windowResizedOrScrolled_","yt-window-resized":"windowResizedOrScrolled_","yt-refit-popups-action":"refitPopups_"};this.narrowMediaQuery_=void 0;this.repositionEventsBound_=!1;this.setPopupVisibilityJobId_=this.setPopupPositioningJobId_=0;this.dynamicallyPositionedElements_=new Set}, attached:function(){this.registerActionMap(this.popupContainerActionMap_);MLa(this,!1)}, detached:function(){this.unregisterActionMap(this.popupContainerActionMap_);OLa(this)}, windowResizedOrScrolled_:function(){this.setPopupPositioningJobId_||(this.setPopupPositioningJobId_=Ck(Fk,this.setPopupPositioning_.bind(this)));this.setPopupVisibilityJobId_||(this.setPopupVisibilityJobId_=Ck(Fk,this.setPopupVisibility_.bind(this)))}, setPopupPositioning_:function(){this.dynamicallyPositionedElements_.forEach(function(a){a.opened&&a.keepBelowPlayer&&this.ensurePopupBelowPlayer(a)},this); this.setPopupPositioningJobId_=0}, setPopupVisibility_:function(){for(var a in this.popups_){var b=this.popups_[a];if("refit"==b.popup.scrollAction){var c=b.popup.positionTarget.getBoundingClientRect(),d=b.popup;c=c.top;var f=b;if(!f.naturalHeight_){f.popup.hidden=!1;f.popup.style.position="fixed";f.popup.style.top="0px";f.popup.style.left="0px";var h=f.popup.getBoundingClientRect();f.naturalHeight_=h.bottom-h.top;f.popup.refit()}d.hidden=!(c>=f.naturalHeight_+60);0==b.popupContent.clientHeight&&b.popup.refit()}}this.setPopupVisibilityJobId_= 0}, ensurePopupBelowPlayer:function(){return!1}, initPopupContainerBehavior:function(a){this.popupContainerConfig=a}, handleOpenPopupAction_:function(a,b){var c=a.openPopupAction,d=this.ensurePopup_(c,b);return new Oi(function(f){d.then(function(h){if(!h)return f();this.maybeCreateNarrowMediaQuery_();var l=this.popups_[this.createCacheKey(h.rendererName,h.openPopupAction.uniqueId)],m=!(!l||!l.openPopupAction.beReused);m=!!c.reusePopup||m;if(h.popup.opened&&!m){this.handleClosePopupAction_(h.rendererName,h.openPopupAction.uniqueId);if(l&&l.target==b&&!h.openPopupAction.replacePopup)return f();Polymer.RenderStatus.afterNextRender(h.popup, function(){this.completeOpenPopupAction_(c,b,h);f()}.bind(this))}else h.popup.opened?h.updatePopup(c):this.completeOpenPopupAction_(c,b,h),f()}.bind(this))}.bind(this))}, completeOpenPopupAction_:function(a,b,c){var d=this.narrowMediaQuery_.queryMatches;c.target=b;b=c.target.popupPositionTarget||c.target;c.popupConfig_.targetContainer&&(b=c.container_);c.popup.positionTarget=b;c.popupContent.positionTarget=b;c.popupConfig_.forceFocus&&(c.popupContent.tabIndex=0,c.popupContent.style.outline="none");N("kevlar_autofocus_menu_on_keyboard_nav")&&(c.popupContent.tabIndex=-1);c.popupConfig_.narrowProperties&&(c.popup.style.position="static");c.popupConfig_.preventAutonav&& c.popup.setAttribute("prevent-autonav",!0);c.popupConfig_.forceCloseOnOutsideClick&&c.popup.setAttribute("force-close-on-outside-click",!0);Brb(c,d);Crb(c,c.popupConfig_.styles);c.isRtl_()&&Crb(c,c.popupConfig_.rtlStyles);c.openPopupAction.shouldStopParentSignal||c.popupContent.startForwardingEvents&&c.target.parentComponent!=c.popupContent&&c.popupContent!=c.target&&c.popupContent.startForwardingEvents(c.popupContainerConfig_.forwardedEvents,c.target);c.updatePopup(a);a=c.popup;this.listen(a,"iron-overlay-opened", "onPopupIronOverlayOpened_");this.listen(a,"iron-overlay-closed","onPopupIronOverlayClosed_");this.listen(a,"iron-overlay-canceled","onPopupIronOverlayCanceled_");this.listen(a,"yt-refit","refitPopup_");this.listen(a,"yt-invalidate-popup-tabbables","handleInvalidatePopupTabbables_");a.open()}, getPopupDurationMs_:function(a){return 0===a.durationHintMs?a.durationHintMs:Math.max(4E3,a.durationHintMs||4E3)}, handleClosePopupAction_:function(a,b){a=a?(a=this.popups_[this.createCacheKey(a,b)])&&a.popup:jI(Polymer.IronOverlayManager);if(a&&a.close){if(b=this.getInterface(PO))a.restoreFocusOnClose=b.isKeyBoardInUse();a.close()}}, handleCloseAllPopupsAction_:function(a){var b={},c;for(c in this.popups_){b.$jscomp$loop$prop$key$2416=c;if(!a||!a.some(function(f){return function(h){return h==f.$jscomp$loop$prop$key$2416}}(b))){var d=this.popups_[b.$jscomp$loop$prop$key$2416].popup; d&&d.close&&d.close()}b={$jscomp$loop$prop$key$2416:b.$jscomp$loop$prop$key$2416}}}, handleClosePopupsAction_:function(a){a.forEach(function(b){(b=this.popups_[b])&&(b=b.popup)&&b.close&&b.close()}.bind(this))}, handleGetPopupOpenedAction_:function(a,b){return(b=this.createCacheKey(a,b))&&this.popups_[b]?this.popups_[a].popup.opened:!1}, handleGetOpenedPopupsAction_:function(){var a=[],b;for(b in this.popups_){var c=this.popups_[b];c.popup.opened&&a.push(c)}return a}, handleSignalActionClosePopup_:function(){this.handleCloseAllPopupsAction_()}, ensurePopup_:function(a,b){this.maybeCreateNarrowMediaQuery_();var c=lL(a.popup,"renderer")||lL(a.popup,"dialog");if(!c)return Qi();c=mL(c,Kdb(this.popupContainerConfig,c));return Qi(this.getAndMaybeCreatePopup_(a,c,b))}, getAndMaybeCreatePopup_:function(a,b,c){b=this.createCacheKey(b,a.uniqueId);if(this.popups_[b])return this.popups_[b];a=new D8({openPopupAction:a,target:c,container:this,popupContainerConfig:this.popupContainerConfig,getElement:this.getElement.bind(this)});return this.popups_[b]=a}, getElement:function(){return null}, maybeCreateNarrowMediaQuery_:function(){this.narrowMediaQuery_||(this.narrowMediaQuery_=document.createElement("iron-media-query"),this.narrowMediaQuery_.query="(max-width: 656px)",this.listen(this.narrowMediaQuery_,"query-matches-changed","openPopupQueryMatchesChanged_"),Polymer.dom(this).appendChild(this.narrowMediaQuery_))}, openPopupQueryMatchesChanged_:function(a){a=a.detail.value;for(var b in this.popups_)Brb(this.popups_[b],a)}, onPopupIronOverlayClosed_:function(a){var b=a.currentTarget,c=b.getContentChildren();c=0c+this.getPopupHeight_(a,b)?(a.style.top="auto",a.style.bottom="0px"):(a.style.top=c+"px",a.style.bottom="auto");return!0}; E8.prototype.getPopupHeight_=function(a,b){b&&(a.cachedPopupHeight=0);if(!a.cachedPopupHeight){b=0;var c=a.clientHeight,d=window.getComputedStyle(a);b+=parseInt(d.marginTop,10);b+=parseInt(d.marginBottom,10);a.cachedPopupHeight=c+b}return a.cachedPopupHeight}; E8.prototype.getElement=function(a){return document.createElement(a)}; g.Object.defineProperties(E8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===vrb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c= b.insertBefore;if(void 0===urb){var d=document.createElement("template");d.innerHTML="";urb=d}d=urb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);vrb=a}a=vrb;return a}}}); var F8=E8;w([P(Drb),x("design:type",Object)],F8.prototype,"ytPopupContainerBehavior",void 0);w([P(kO.YtComponentBehavior),x("design:type",Object)],F8.prototype,"ytComponentBehavior",void 0);F8=w([V({is:"ytd-popup-container"})],F8);var Erb;var Frb;var Grb={productId:"5047190",bucket:"suggest",enableAnonymousFeedback:!0,flow:"submit",allowNonLoggedInFeedback:!0};function Hrb(a,b,c,d,f,h){var l=y.clone(Grb);l.locale=A("SBOX_SETTINGS",{}).REQUEST_LANGUAGE;l.report={description:f||""};f=A("SBOX_SETTINGS",{});b=b.join(",");var m=Xa();a={choice_cc:d,choice_id_cc:c,choices_sc:b,gl:f.REQUEST_DOMAIN,hl:f.REQUEST_LANGUAGE,query:a,time:m};h&&(a.choice_additional_comment_cc=h);OI(l,a)} ;var G8=function(){return O.apply(this,arguments)||this}; p(G8,O);e=G8.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(){if(void 0!==this.data){Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).forEach(function(c){c.checked=!1}); this.catagorySelected=this.suggestionSelected=!1;var a=this;window.ShadyDOM&&window.ShadyDOM.noPatch||(a=Polymer.dom(this.root));a.querySelector("paper-radio-group").selected=null;var b=a.querySelector("#reason-text");b&&(b.value=null);a.querySelector("#description-text").value=null}}; e.canSubmit=function(a,b){this.fire("yt-invalidate-popup-tabbables");return!(a&&b)}; e.onCancel=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"])}; e.onSubmit=function(){var a=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).filter(function(h){return h.active}).map(function(h){return h.innerText.trim()}),b=this.querySelector("paper-radio-group"),c=b.selectedItem.name,d=b.selectedItem.innerText.trim(),f=b.querySelector("#reason-text"); b=void 0;f&&(b=f.value);(f=this.descriptionText.value)&&(f=f.trim());Hrb(this.data.searchQuery,a,c,d,f,b);this.ytActionSenderBehavior.sendAction("yt-close-popup-action",["ytd-search-suggestion-report-dialog"]);this.sendFormSubmitToast()}; e.sendFormSubmitToast=function(){var a={openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:kL(YK("SBOX_INAPPROPRIATE_TOAST"))}}}};this.ytActionSenderBehavior.sendAction("yt-open-popup-action",[a,this])}; e.onIronChange=function(){this.suggestionSelected=Array.prototype.slice.call(this.querySelectorAll("paper-checkbox")).some(function(a){return a.active})}; e.onIronSelect=function(){this.catagorySelected=!!this.querySelector("paper-radio-group").selected}; g.Object.defineProperties(G8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Frb){var a=document.createElement("template");a.innerHTML="\n
\n

[[data.title]]

\n
\n \n
\n \n

[[data.catagoryLabel]]

\n \n \n \n
\n \n \n \n \n \n
\n
\n
\n [[data.cancelButtonLabel]]\n \n [[data.submitButtonLabel]]\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Erb){var d=document.createElement("template");d.innerHTML=""; Erb=d}d=Erb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Frb=a}a=Frb;return a}}}); var H8=G8;H8.prototype.onIronSelect=H8.prototype.onIronSelect;H8.prototype.onIronChange=H8.prototype.onIronChange;H8.prototype.dataChanged=H8.prototype.dataChanged;w([P(W.YtActionSenderBehavior),x("design:type",Object)],H8.prototype,"ytActionSenderBehavior",void 0);w([R(),x("design:type",Object)],H8.prototype,"data",void 0);w([R({value:!0,computed:"canSubmit(suggestionSelected,catagorySelected)"}),x("design:type",Boolean)],H8.prototype,"submitDisabled",void 0); w([R(),x("design:type",Boolean)],H8.prototype,"suggestionSelected",void 0);w([R(),x("design:type",Boolean)],H8.prototype,"catagorySelected",void 0);w([CE("#description-text"),x("design:type",Object)],H8.prototype,"descriptionText",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H8.prototype,"dataChanged",null);w([S("iron-change"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H8.prototype,"onIronChange",null); w([S("iron-select"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],H8.prototype,"onIronSelect",null);H8=w([V({is:"ytd-search-suggestion-report-dialog"})],H8);var Irb;var Jrb;var I8=function(){return O.apply(this,arguments)||this}; p(I8,O);I8.prototype.dataChanged=function(){if(this.data){var a=nh(Ib(Jb(this.data.url.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue||""))),b=this.iframe;if(a instanceof lh){var c;a=tea(a);a=(null===(c=dh())||void 0===c?0:c.isScriptURL(a))?TrustedScriptURL.prototype.toString.apply(a):a}else a=Ib(a);b.src=a}}; I8.prototype.ready=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; g.Object.defineProperties(I8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Jrb){var a=document.createElement("template");a.innerHTML="";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Irb){var d=document.createElement("template");d.innerHTML=""; Irb=d}d=Irb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Jrb=a}a=Jrb;return a}}}); var J8=I8;J8.prototype.dataChanged=J8.prototype.dataChanged;w([CE("#iframe"),x("design:type",HTMLIFrameElement)],J8.prototype,"iframe",void 0);w([R(),x("design:type",Object)],J8.prototype,"data",void 0);w([U("data"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],J8.prototype,"dataChanged",null);J8=w([fO({is:"yt-about-this-ad-renderer"})],J8);var Krb;var Lrb;var K8=function(){return O.apply(this,arguments)||this}; p(K8,O);e=K8.prototype;e.attached=function(){this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.configureRendererStamper=function(){return{"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}},"data.backButton":{id:"back-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.submitButton":{id:"submit-button",mapping:{buttonRenderer:"yt-button-renderer"}}}}; e.ready=function(){this.$["submit-button"].addEventListener("yt-action",this.onSubmitYtAction.bind(this))}; e.onSubmitYtAction=function(a){var b=a.detail;"yt-service-request"===b.actionName&&(b=b.args[1],b.flagEndpoint&&(a.stopPropagation(),a={text:this.description,minutes:Number(this.minutes),seconds:Number(this.seconds)},this.vssId&&(a.vss_id=this.vssId),this.ytActionSenderBehavior.sendServiceRequestAction([b,a]),this.submitDisabled=!0))}; e.dataChanged=function(){var a=this;this.vssId=this.description=this.seconds=this.minutes="";this.submitDisabled=!1;var b=KM(this);b&&b.getPlayerPromise().then(function(c){var d=c.getOption("cc","track")||c.getOption("captions","track");d&&(a.vssId=d.vss_id);c=c.getCurrentTime();a.minutes=Math.floor(c/60).toString();a.seconds=(Math.floor(c)%60).toString()})}; e.updateSubmitButtonState=function(a,b,c){this.set("data.submitButton.buttonRenderer.isDisabled",c||""===a||""===b)}; e.onYtServiceRequestCompleted=function(){this.ytActionSenderBehavior.sendAction("yt-close-popup-action")}; e.onYtServiceRequestError=function(){this.submitDisabled=!1}; g.Object.defineProperties(K8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===Lrb){var a=document.createElement("template");a.innerHTML="
\n
\n

[[getSimpleString(data.title)]]

\n
\n
\n \n
\n \n \n \n \n \n
\n \n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Krb){var d=document.createElement("template");d.innerHTML=""; Krb=d}d=Krb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Lrb=a}a=Lrb;return a}}}); var L8=K8;L8.prototype.onYtServiceRequestError=L8.prototype.onYtServiceRequestError;L8.prototype.onYtServiceRequestCompleted=L8.prototype.onYtServiceRequestCompleted;L8.prototype.updateSubmitButtonState=L8.prototype.updateSubmitButtonState;w([P(Z),x("design:type",Object)],L8.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],L8.prototype,"ytRendererBehavior",void 0); w([P(W.YtActionSenderBehavior),x("design:type",Object)],L8.prototype,"ytActionSenderBehavior",void 0);w([R({observer:"dataChanged"}),x("design:type",Object)],L8.prototype,"data",void 0);w([R(),x("design:type",Boolean)],L8.prototype,"submitDisabled",void 0);w([R(),x("design:type",String)],L8.prototype,"minutes",void 0);w([R(),x("design:type",String)],L8.prototype,"seconds",void 0);w([R(),x("design:type",String)],L8.prototype,"description",void 0); w([R(),x("design:type",String)],L8.prototype,"vssId",void 0);w([U("minutes","seconds","submitDisabled"),x("design:type",Function),x("design:paramtypes",[String,String,Boolean]),x("design:returntype",void 0)],L8.prototype,"updateSubmitButtonState",null);w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L8.prototype,"onYtServiceRequestCompleted",null); w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],L8.prototype,"onYtServiceRequestError",null);L8=w([fO({is:"yt-report-details-form-renderer",noInjection:!0,notifyObserversOnUndefined:!1})],L8);var Mrb;var Nrb;var M8=function(){var a=O.apply(this,arguments)||this;a.submitting=!1;a.submitButtonDisabled=!0;a.command=null;a.canShowCheckbox=!1;a.canShowAdditionalDetailCheckbox=!1;a.canShowNextButton=!1;a.additionalDetailCheckboxChecked=!1;a.refitJob=0;a.keepDropdownFocusedAfterSelection=!0;a.actionMap={"yt-report-form-update":"handleReportFormEndpointUpdateAction","yt-report-form-endpoint-update":"handleReportFormEndpointUpdateAction","yt-confirm-dialog-close-action":"handleConfirmDialogCloseAction","yt-modify-report-form-command":"handleModifyReportFormCommand", "yt-additional-detail-checkbox-update":"handleAdditionalDetailCheckboxUpdateAction"};return a}; p(M8,O);e=M8.prototype;e.configureRendererStamper=function(){return{"data.legalReportCheckbox":{id:"checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}},"data.additionalDetailCheckbox":{id:"additional-detail-checkbox-container",mapping:{booleanFormFieldV2Renderer:{component:"yt-boolean-form-field-v2-renderer",noInjection:!0}}}}}; e.created=function(){this.refitJob=0}; e.attached=function(){this.scroller&&(this.scroller.dialogElement=this.parentNode,this.scroller.attached&&"function"===typeof this.scroller.attached&&this.scroller.attached());this.hasAttribute("dialog")||this.setAttribute("dialog","true")}; e.dataChanged=function(a){a&&(this.toggleSubmitButton(!!this.get("data.submitButton.buttonRenderer.isDisabled")),this.set("data.submitButton.buttonRenderer.isDisabled",void 0),this.set("data.nextButton.buttonRenderer.isDisabled",void 0),this.command=null,this.additionalDetailCheckboxChecked=this.canShowNextButton=this.canShowAdditionalDetailCheckbox=this.canShowCheckbox=this.hideReportForm=this.submitting=!1,a.legalReportCheckbox&&this.set("data.legalReportCheckbox.booleanFormFieldV2Renderer.value", !1),a.additionalDetailCheckbox&&this.set("data.additionalDetailCheckbox.booleanFormFieldV2Renderer.value",!1))}; e.onYtPopupOpened=function(){var a=KM(this);a&&a.getPlayerPromise().then(function(b){b.pauseVideo()})}; e.onYtNavigate=function(a){var b=a.detail.endpoint;b&&b.confirmDialogEndpoint&&(a.stopPropagation(),this.hideReportForm=!0)}; e.onYtServiceRequestSent=function(){this.toggleSubmitButton(!0)}; e.onYtServiceRequestCompleted=function(a,b){var c=b.actions;if(c)for(var d=0,f=c.length;d\n\n\n \n\n
\n \n \n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Mrb){var d=document.createElement("template");d.innerHTML=""; Mrb=d}d=Mrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);Nrb=a}a=Nrb;return a}}}); var N8=M8;N8.prototype.onYtServiceRequestError=N8.prototype.onYtServiceRequestError;N8.prototype.onYtServiceRequestCompleted=N8.prototype.onYtServiceRequestCompleted;N8.prototype.onYtServiceRequestSent=N8.prototype.onYtServiceRequestSent;N8.prototype.onYtNavigate=N8.prototype.onYtNavigate;N8.prototype.onYtPopupOpened=N8.prototype.onYtPopupOpened;w([P(LO.YtOpenPopupBehavior),x("design:type",Object)],N8.prototype,"openPopupBehavior",void 0); w([P(Z),x("design:type",Object)],N8.prototype,"ytRendererstamperBehavior",void 0);w([P(X.YtRendererBehavior),x("design:type",Object)],N8.prototype,"ytRendererBehavior",void 0);w([P(xO.YtActionHandlerBehavior),x("design:type",Object)],N8.prototype,"ytActionHandlerBehavior",void 0);w([P(OP.YtEventForwardingBehavior),x("design:type",Object)],N8.prototype,"eventForwardingBehavior",void 0);w([P(Polymer.IronResizableBehavior),x("design:type",Object)],N8.prototype,"ironResizableBehavior",void 0); w([R({observer:"dataChanged"}),x("design:type",Object)],N8.prototype,"data",void 0);w([R(),x("design:type",Object)],N8.prototype,"submitting",void 0);w([R({observer:"submitButtonDisabledChanged"}),x("design:type",Object)],N8.prototype,"submitButtonDisabled",void 0);w([R(),x("design:type",Object)],N8.prototype,"command",void 0);w([R({reflectToAttribute:!0}),x("design:type",Boolean)],N8.prototype,"hideReportForm",void 0);w([R(),x("design:type",Object)],N8.prototype,"canShowCheckbox",void 0); w([R(),x("design:type",Object)],N8.prototype,"canShowAdditionalDetailCheckbox",void 0);w([R(),x("design:type",Object)],N8.prototype,"canShowNextButton",void 0);w([R(),x("design:type",Object)],N8.prototype,"additionalDetailCheckboxChecked",void 0);w([R(),x("design:type",Object)],N8.prototype,"refitJob",void 0);w([R(),x("design:type",Object)],N8.prototype,"keepDropdownFocusedAfterSelection",void 0);w([CE("#scroller"),x("design:type",Object)],N8.prototype,"scroller",void 0); w([S("yt-popup-opened"),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],N8.prototype,"onYtPopupOpened",null);w([S("yt-navigate"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],N8.prototype,"onYtNavigate",null);w([S("yt-service-request-sent"),x("design:type",Function),x("design:paramtypes",[CustomEvent,JO]),x("design:returntype",void 0)],N8.prototype,"onYtServiceRequestSent",null); w([S("yt-service-request-completed"),x("design:type",Function),x("design:paramtypes",[CustomEvent,KO]),x("design:returntype",void 0)],N8.prototype,"onYtServiceRequestCompleted",null);w([S("yt-service-request-error"),x("design:type",Function),x("design:paramtypes",[CustomEvent]),x("design:returntype",void 0)],N8.prototype,"onYtServiceRequestError",null);N8=w([fO({is:"yt-report-form-modal-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],N8);var Orb;var Prb;Polymer({is:"yt-boolean-form-field-v2-renderer",_template:function(){if(void 0!==Prb)return Prb;var a=document.createElement("template");a.innerHTML="\n\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Orb){var d=document.createElement("template");d.innerHTML=""; Orb=d}d=Orb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Prb=a}, behaviors:[X.YtRendererBehavior,xO.YtActionHandlerBehavior],properties:{data:Object},onCheckedChanged_:function(){if(this.data){var a=this.$.checkbox.checked;"yt-external-links-checkbox"===this.data.identifier?this.sendAction("yt-additional-detail-checkbox-update",[a]):a&&this.data.enableCommand?this.sendAction("yt-modify-report-form-command",[this.data.enableCommand.modifyReportFormCommand]):!a&&this.data.disableCommand&&this.sendAction("yt-modify-report-form-command",[this.data.disableCommand.modifyReportFormCommand])}}, onLabelTap_:function(a){"A"!=a.target.tagName&&(this.$.checkbox.checked=!this.$.checkbox.checked)}});var Qrb;var Rrb;var Srb={},Trb=(Srb.WEB_REMIX="music.youtube.com",Srb); Polymer({is:"yt-sharing-embed-renderer",_template:function(){if(void 0!==Rrb)return Rrb;var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n \n
\n \n
\n \n
\n \n
\n
\n \n
\n
\n \n \n \n
\n \n
\n
\n
\n
\n";a.content.insertBefore(Y().content.cloneNode(!0), a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Qrb){var d=document.createElement("template");d.innerHTML=""; Qrb=d}d=Qrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Rrb=a}, hostAttributes:{dialog:!0},behaviors:[Z,X.YtRendererBehavior,xO.YtActionHandlerBehavior],properties:{data:Object,embedCode_:{type:String,computed:"computeEmbedCode_(data, startAtTimeStamp_, startAtChecked_, isPlayerControlsOptionChecked_, isPrivacyModeOptionChecked_)"},isPlayerControlsOptionChecked_:{type:Boolean,value:!0},isPrivacyModeOptionChecked_:{type:Boolean,value:!1},startAtChecked_:{type:Boolean,value:!1,notify:!0},startAtTimeStamp_:{type:String,value:0},isSquareAspectRatio_:{type:Boolean, computed:"computeIsSquareAspectRatio_(data)",reflectToAttribute:!0}},listeners:{"yt-popup-closed":"onYtPopupClosed_"},actionMap:{"yt-signal-action-copy-share-embed-url":"handleSignalActionCopyShareEmbedUrl_","yt-share-panel-set-timestamp-action":"handleSetTimestamp_"},stampDom:{"data.actionButtons":{id:"action-buttons",mapping:{buttonRenderer:"yt-button-renderer"}},"data.startAt":{id:"start-at",mapping:{startAtRenderer:"yt-start-at-renderer"}}},created:function(){this.embedHost_=Trb[A("INNERTUBE_CLIENT_NAME")]|| "www.youtube.com"}, ready:function(){this.$["embed-code"].addEventListener("tap",this.onEmbedCode_.bind(this))}, computeEmbedCode_:function(a,b,c,d,f){if(!a)return"";var h=a.videoId,l=a.fullListId,m=[];d||m.push("controls=0");c&&0"}, handleSignalActionCopyShareEmbedUrl_:function(){this.$["embed-code"].inputElement.textarea.select();document.execCommand("copy");this.trackEmbedCopyUrl_()}, handleSetTimestamp_:function(a){this.startAtTimeStamp_=(this.startAtChecked_=a.isSet)?a.timestamp:0}, closePanel_:function(){this.sendAction("yt-close-popup-action",["yt-sharing-embed-renderer"])}, onEmbedCode_:function(){this.$["embed-code"].inputElement.textarea.select();this.trackEmbedCopyUrl_()}, onYtPopupClosed_:function(){pg(this.$["video-preview"])}, trackEmbedCopyUrl_:function(){this&&this.data&&this.data.actionButtons&&0
[[menuStrings_.SHARE_LABEL]]
\n
\n \n \n \n \n \n
\n\n\n
\n \n \n \n \n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Urb){var d=document.createElement("template");d.innerHTML=""; Urb=d}d=Urb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Vrb=a}, behaviors:[TP,OP.YtEventForwardingBehavior,Z,xO.YtActionHandlerBehavior,X.YtRendererBehavior],properties:{data:Object,player_:{type:Object,value:null},startAtChecked_:{type:Boolean,value:!1,notify:!0},currentTime_:Number,startAtTimeStamp_:{type:String,computed:"computeHumanReadableTimeStamp_(currentTime_)",notify:!0},timeStampParam_:{type:String,computed:"computeTimeStampParam_(startAtTimeStamp_)"},shareUrl_:{type:String,computed:"computeShareURL_(data.sharingRenderer.shortUrl, timeStampParam_, startAtChecked_)"}, url_:{type:String,computed:"computeURL_(data)"},menuStrings_:{type:Object,value:{SHARE_LABEL:YK("SHARE_LABEL",void 0,"Share")}},emailTarget_:{type:String,computed:"computeEmailShareLink_(shareUrl_)"}},listeners:{"yt-popup-opened":"onPopupOpened_","yt-popup-closed":"onPopupClosed_"},actionMap:{"yt-signal-action-copy-share-url":"handleSignalActionCopyShareUrl_"},stampDom:{"data.sharingRenderer.actionButtons":{id:"action-buttons",mapping:UO("sharingRendererButtons")}},ready:function(){this.$["share-url"].addEventListener("tap", this.onShareUrlTap_.bind(this));this.$.email.addEventListener("tap",this.onEmailTap_.bind(this))}, attached:function(){this.currentTime_=0}, getInputElement_:function(a){return"INPUT"===this.$[a].inputElement.tagName?this.$[a].inputElement:this.$[a].inputElement.querySelector("input")}, onPopupOpened_:function(){var a=this;this.getInputElement_("share-url").select();var b=KM(this);b&&(this.disposePlayerEvents_(),b.getPlayerPromise().then(function(c){a.listenToPlayerEvent(c,"onVideoProgress",a.updateTime_);a.updateTime_(c.getCurrentTime());a.player_=c}))}, onPopupClosed_:function(){this.disposePlayerEvents_();this.$["start-at-option"].checked=!1}, updateTime_:function(a){this.currentTime_=a}, computeHumanReadableTimeStamp_:function(a){a+="";var b=Math.floor(a/3600),c=Math.floor(a%3600%60);return(0\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Xrb){var d=document.createElement("template");d.innerHTML=""; Xrb=d}d=Xrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return Yrb=a}, hostAttributes:{dialog:!0},behaviors:[OP.YtEventForwardingBehavior,Z,Wrb,X.YtRendererBehavior],properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1}},listeners:{"yt-navigate":"onYtNavigate_","yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-sent":"onYtServiceRequestSent_","yt-popup-opened":"openPopupHandler_","yt-popup-closed":"closePopupHandler_"},stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer", attributes:{"footer-button":!0}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}}},attached:function(){this.sendAction("yt-register-create-family-dialog");this.$.thumbnail.onShow()}, fireOnCloseCommand_:function(){this.data.onCloseCommand&&this.sendInnerTubeActions([this.data.onCloseCommand],this)}, onYtNavigate_:function(a){var b=a.detail.endpoint;b.unlimitedCreateFamilyEndpoint?(this.loading=!0,this.sendAction("yt-open-create-family-dialog",[b.unlimitedCreateFamilyEndpoint,this.unicornReadyCallback_.bind(this)]),a.stopPropagation()):this.maybeCloseDialogOnFooterButtonTap(a)}, onYtServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.signalServiceEndpoint||(this.loading=!0)}, onYtServiceRequestCompleted_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}, openPopupHandler_:function(a){a.detail==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)}, closePopupHandler_:function(a,b){this.fireOnCloseCommand_();(b&&!0===b.canceled||b&&!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)}, dataChanged_:function(){this.loading=!1}, unicornReadyCallback_:function(){this.parentElement.close&&this.parentElement.close();this.loading=!1}});var Zrb;var $rb;Polymer({is:"yt-unlimited-family-profile-interstitial-renderer",_template:function(){if(void 0!==$rb)return $rb;var a=document.createElement("template");a.innerHTML="

[[getSimpleString(data.additionalInfoHeader)]]

[[getSimpleString(data.memberInfo)]][[getSimpleString(data.memberTitle)]]
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===Zrb){var d=document.createElement("template");d.innerHTML=""; Zrb=d}d=Zrb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return $rb=a}, hostAttributes:{dialog:!0},properties:{data:Object,mainThumbnailWidth_:{type:Number,computed:"computeMainThumbnailWidth_(data.secondaryThumbnails)"},boundButtonTap_:{type:Function,value:function(){return this.onButtonTap_.bind(this)}}}, behaviors:[Z,X.YtRendererBehavior,Wrb],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"footer-button":!0},properties:{"on-tap":"[[boundButtonTap_]]"}}}},"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0,"footer-button":!0}}}},"data.manageButton":{id:"manage-button",mapping:{buttonRenderer:"yt-button-renderer"}}},attached:function(){Polymer.dom(this.root).querySelectorAll(".secondary-thumbnail").forEach(function(a){a.onShow()}); this.$["main-thumbnail"].onShow()}, onButtonTap_:function(a){this.maybeCloseDialogOnFooterButtonTap(a)}, computeMainThumbnailWidth_:function(a){return a&&0!==a.length?72:96}});var asb;var bsb;Polymer({is:"yt-unplugged-pause-membership-dialog-renderer",_template:function(){if(void 0!==bsb)return bsb;var a=document.createElement("template");a.innerHTML="
[[getSimpleString(data.title)]]
\n [[getSimpleString(selectedData_.pausePeriodMessage)]]\n
\n [[getSimpleString(selectedData_.pauseEndMessage)]]\n
"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===asb){var d=document.createElement("template");d.innerHTML=""; asb=d}d=asb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return bsb=a}, hostAttributes:{dialog:!0},behaviors:[xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,X.YtRendererBehavior,Z],listeners:{"yt-popup-closed":"closePopupHandler_","yt-popup-opened":"onPopupOpened_","yt-service-request-completed":"onYtServiceRequestCompleted","yt-service-request-sent":"onYtServiceRequestSent"},properties:{data:{type:Object,observer:"dataChanged_"},loading:{reflectToAttribute:!0,type:Boolean,value:!1},selectIndexMax_:Number,selectedData_:Object,sliderAriaLabel_:{type:String,value:null}, onButtonTap_:{type:Function,value:function(){return this.onSubmitTap_.bind(this)}}, onSecondaryTap_:{type:Function,value:function(){return this.onExitButtonTap_.bind(this)}}}, stampDom:{"data.primaryButton":{id:"primary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[onButtonTap_]]"}}}},"data.secondaryButton":{id:"secondary-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},properties:{"on-tap":"[[onSecondaryTap_]]"}}}}},onPopupOpened_:function(a){a.detail==this&&N("enable_premium_voluntary_pause")&&(this.sendAction("yt-close-popup-action",["yt-confirm-dialog-renderer"]),this.handleOnOpenCommands_())}, created:function(){this.selectedIndex_=0}, setDialogData:function(a){this.data=a;this.resetSlider_()}, dataChanged_:function(){this.data&&this.resetSlider_()}, onSubmitTap_:function(){if(this.data.confirmCommand){var a=this.data.confirmCommand;a.ypcPauseSubscriptionCommand&&this.sendServiceRequestAction([a,{resume_time_ms:parseInt(this.selectedData_.resumeTimeMs,10)}])}}, onExitButtonTap_:function(){this.sendAction("yt-close-popup-action",["yt-unplugged-pause-membership-dialog-renderer"])}, closePopupHandler_:function(a,b){(b&&!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.handleOnDismissCommands_()}, onSliderChange_:function(){this.selectedIndex_=this.$["id-pause-slider"].immediateValue;this.updateUiState_()}, updateUiState_:function(){this.data&&(this.selectedData_=this.data.endOptions[this.selectedIndex_],this.setSliderAriaLabel_())}, setSliderAriaLabel_:function(){this.selectedData_&&(this.sliderAriaLabel_=this.selectedData_.accessibilityData.label)}, resetSlider_:function(){if(this.data){var a=this.data.defaultEndOptionIndex||0,b=this.$["id-pause-slider"];if(b.immediateValue
\n\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===csb){var d=document.createElement("template");d.innerHTML=""; csb=d}d=csb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);dsb=a}a=dsb;return a}}}); var P8=O8;w([P(X.YtRendererBehavior),x("design:type",Object)],P8.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],P8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],P8.prototype,"data",void 0);P8=w([fO({is:"yt-vc-offer-layout-header-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],P8);var esb;var fsb;var Q8=function(){return O.apply(this,arguments)||this}; p(Q8,O);Q8.prototype.configureRendererStamper=function(){return{"data.header":{id:"header",mapping:{vcOfferLayoutHeaderRenderer:{component:"yt-vc-offer-layout-header-renderer"}}},"data.offers":{id:"offers",mapping:{vcOfferRenderer:{component:"yt-vc-offer-renderer",attributes:{"dialog-dismiss":!0}}}}}}; g.Object.defineProperties(Q8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===fsb){var a=document.createElement("template");a.innerHTML="
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===esb){var d=document.createElement("template");d.innerHTML=""; esb=d}d=esb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);fsb=a}a=fsb;return a}}}); var R8=Q8;w([P(X.YtRendererBehavior),x("design:type",Object)],R8.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],R8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],R8.prototype,"data",void 0);R8=w([fO({is:"yt-vc-offer-layout-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],R8);var gsb;var hsb;var S8=function(){return O.apply(this,arguments)||this}; p(S8,O);S8.prototype.configureRendererStamper=function(){return{"data.vcIcon":{id:"vc-icon",mapping:{themedImageRenderer:{component:"yt-themed-image-renderer"}}}}}; g.Object.defineProperties(S8.prototype,{ariaLabel:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.accessibilityText?this.data.accessibilityText:""}}, vcOfferStyle:{configurable:!0,enumerable:!0,get:function(){return this.data&&this.data.style?this.data.style:"VC_OFFER_STYLE_STANDARD"}}, showTitleText:{configurable:!0,enumerable:!0,get:function(){return!(!this.data||"VC_OFFER_STYLE_HERO"!==this.data.style||!this.data.titleText)}}}); g.Object.defineProperties(S8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===hsb){var a=document.createElement("template");a.innerHTML="\n
\n
\n \n \n \n
\n \n \n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===gsb){var d=document.createElement("template");d.innerHTML=""; gsb=d}d=gsb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);hsb=a}a=hsb;return a}}}); var T8=S8;w([P(X.YtRendererBehavior),x("design:type",Object)],T8.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],T8.prototype,"ytRendererstamperBehavior",void 0);w([P(TV.YtTappableItemBehavior),x("design:type",Object)],T8.prototype,"ytTappableItemBehavior",void 0);w([R(),x("design:type",Object)],T8.prototype,"data",void 0);w([R({reflectToAttribute:!0}),BE("data.accessibilityText"),x("design:type",String),x("design:paramtypes",[])],T8.prototype,"ariaLabel",null); w([R({reflectToAttribute:!0}),BE("data.style"),x("design:type",String),x("design:paramtypes",[])],T8.prototype,"vcOfferStyle",null);w([BE("data.style","data.titleText"),x("design:type",Boolean),x("design:paramtypes",[])],T8.prototype,"showTitleText",null);T8=w([fO({is:"yt-vc-offer-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],T8);var isb;var jsb;var U8=function(){return O.apply(this,arguments)||this}; p(U8,O);U8.prototype.configureRendererStamper=function(){return{"data.topBar":{id:"top-bar",mapping:{ypcOffersModalTopBarRenderer:{component:"yt-ypc-offers-modal-top-bar-renderer"}}},"data.content":{id:"content",mapping:{vcOfferLayoutRenderer:{component:"yt-vc-offer-layout-renderer"}}}}}; U8.prototype.ready=function(){this.setAttribute("dialog","")}; U8.prototype.attached=function(){this.scrollable.dialogElement=this.parentNode;var a=this.scrollable;a.attached&&"function"===typeof a.attached&&a.attached()}; g.Object.defineProperties(U8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===jsb){var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===isb){var d=document.createElement("template");d.innerHTML=""; isb=d}d=isb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);jsb=a}a=jsb;return a}}}); var V8=U8;w([P(X.YtRendererBehavior),x("design:type",Object)],V8.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],V8.prototype,"ytRendererstamperBehavior",void 0);w([CE("#scrollable"),x("design:type",Object)],V8.prototype,"scrollable",void 0);w([R(),x("design:type",Object)],V8.prototype,"data",void 0);V8=w([fO({is:"yt-ypc-offers-modal-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],V8);var ksb;var lsb;var W8=function(){return O.apply(this,arguments)||this}; p(W8,O);W8.prototype.configureRendererStamper=function(){return{"data.dismiss":{id:"dismiss",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0},params:{noink:!0}}}},"data.helpLink":{id:"help-link",mapping:{buttonRenderer:{component:"yt-button-renderer",params:{noink:!0}}}}}}; g.Object.defineProperties(W8,{template:{configurable:!0,enumerable:!0,get:function(){if(void 0===lsb){var a=document.createElement("template");a.innerHTML="
\n\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ksb){var d=document.createElement("template");d.innerHTML=""; ksb=d}d=ksb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);lsb=a}a=lsb;return a}}}); var X8=W8;w([P(X.YtRendererBehavior),x("design:type",Object)],X8.prototype,"ytRendererBehavior",void 0);w([P(Z),x("design:type",Object)],X8.prototype,"ytRendererstamperBehavior",void 0);w([R(),x("design:type",Object)],X8.prototype,"data",void 0);X8=w([fO({is:"yt-ypc-offers-modal-top-bar-renderer",notifyObserversOnUndefined:!1,noInjection:!0})],X8);var msb;var nsb;Polymer({is:"yt-ypc-upgrade-dialog-renderer",_template:function(){if(void 0!==nsb)return nsb;var a=document.createElement("template");a.innerHTML="\n
\n
\n
\n \n \n
\n \n
\n\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===msb){var d=document.createElement("template");d.innerHTML=""; msb=d}d=msb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return nsb=a}, hostAttributes:{dialog:!0},behaviors:[X.YtRendererBehavior,Z,$V],properties:{data:{type:Object},showSpinner:{type:Boolean,value:!1},continueButtonTapped:{type:Boolean,value:!1},bindOnContinueTapped_:{type:Function,value:function(){return this.onContinueTapped_.bind(this)}}}, listeners:{"yt-service-request-completed":"onYtServiceRequestCompleted_","yt-service-request-error":"onYtServiceRequestError_","yt-popup-closed":"onYtPopupClosed_","yt-popup-opened":"onYtPopupOpened_"},stampDom:{"data.continueButton":{id:"continue-button",mapping:{buttonRenderer:{component:"yt-button-renderer",properties:{"on-tap":"[[bindOnContinueTapped_]]"}}}},"data.cancelButton":{id:"cancel-button",mapping:{buttonRenderer:{component:"yt-button-renderer",attributes:{"dialog-dismiss":!0}}}}},attached:function(){this.$.scrollable.dialogElement= this.parentNode}, onYtServiceRequestCompleted_:function(){this.set("showSpinner",!1);this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"])}, onYtPopupOpened_:function(a,b){b==this&&this.data.onOpenCommands&&this.sendInnerTubeActions(this.data.onOpenCommands,this)}, onYtPopupClosed_:function(a,b){this.continueButtonTapped||b&&(!0===b.canceled||!1===b.canceled&&!1===b.confirmed)&&this.data.onDismissCommands&&this.sendInnerTubeActions(this.data.onDismissCommands,this)}, onYtServiceRequestError_:function(a){this.set("showSpinner",!1);this.openToast(a.detail.error.message)}, onContinueTapped_:function(){this.set("continueButtonTapped",!0);N("enable_ypc_spinners")?this.sendAction("yt-close-popup-action",["yt-ypc-upgrade-dialog-renderer"]):this.set("showSpinner",!0)}});var osb;var psb;Polymer({is:"yt-bubble-hint-renderer",_template:function(){if(void 0!==psb)return psb;var a=document.createElement("template");a.innerHTML="
\n
\n \n
\n
\n \n
\n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===osb){var d=document.createElement("template");d.innerHTML=""; osb=d}d=osb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return psb=a}, behaviors:[X.YtRendererBehavior,OP.YtEventForwardingBehavior,Z],properties:{data:Object,positionType:{type:String,reflectToAttribute:!0},hasButtons_:{type:Boolean,value:!1,reflectToAttribute:!0,computed:"computeHasButtons_(data)"},style_:{type:Boolean,computed:"computeStyle_(data.style)",reflectToAttribute:!0}},stampDom:{"data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}},"data.confirmButton":{id:"accept-button",mapping:{buttonRenderer:"yt-button-renderer"}}}, computeHasButtons_:function(a){return!(!a.dismissButton&&!a.confirmButton)}, computeStyle_:function(a){return a||"BUBBLE_HINT_STYLE_UNKNOWN"}});var qsb;var rsb;Polymer({is:"yt-fancy-dismissible-dialog-renderer",_template:function(){if(void 0!==rsb)return rsb;var a=document.createElement("template");a.innerHTML="\n\n \n \n\n
\n \n \n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===qsb){var d=document.createElement("template");d.innerHTML=""; qsb=d}d=qsb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return rsb=a}, hostAttributes:{dialog:!0},behaviors:[X.YtRendererBehavior],properties:{data:Object,showTitle:{type:Boolean,computed:"computeShowTitle_(data)"}},attached:function(){this.$.scroller.dialogElement=this.parentNode}, computeConfirmButton_:function(a){var b={text:a.confirmLabel,size:"SIZE_DEFAULT",style:"STYLE_BLUE_TEXT"};a.confirmNavigationEndpoint?b.navigationEndpoint=a.confirmNavigationEndpoint:a.confirmServiceEndpoint&&(b.serviceEndpoint=a.confirmServiceEndpoint);return b}, computeShowTitle_:function(a){return!(!a||!a.title)}});var ssb;var tsb;Polymer({is:"yt-loading-renderer",_template:function(){if(void 0!==tsb)return tsb;var a=document.createElement("template");a.innerHTML="\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===ssb){var d=document.createElement("template");d.innerHTML="";ssb=d}d=ssb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return tsb=a}, behaviors:[X.YtRendererBehavior,Polymer.IronOverlayBehavior],properties:{data:Object},listeners:{"iron-overlay-opened":"onIronOverlayOpened_","iron-overlay-closed":"onIronOverlayClosed_"},created:function(){nIa(2201)}, onIronOverlayOpened_:function(){this.$.spinner&&(this.$.spinner.active=!0)}, onIronOverlayClosed_:function(){this.$.spinner&&(this.$.spinner.active=!1)}});var usb;var vsb;Polymer({is:"yt-upsell-dialog-renderer",_template:function(){if(void 0!==vsb)return vsb;var a=document.createElement("template");a.innerHTML="\n
\n \n \n \n
\n \n \n \n \n
\n
\n
\n
\n
\n
\n"; a.content.insertBefore(HXa().content.cloneNode(!0),a.content.firstChild);a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===usb){var d=document.createElement("template");d.innerHTML=""; usb=d}d=usb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return vsb=a}, hostAttributes:{dialog:!0},properties:{data:{type:Object,observer:"dataChanged_"},hasHeader:{type:Boolean,computed:"computeHasHeader_(data)"},layoutStyle:{type:String,computed:"computeLayoutStyle_(data.layout)",reflectToAttribute:!0},popupSize:{type:String,computed:"computePopupSize_(data.popupSize)",reflectToAttribute:!0},hasLogo:{type:Boolean,computed:"computeIsLogo_(data)",reflectToAttribute:!0}},behaviors:[Z,X.YtRendererBehavior],stampDom:{"data.actionButton":{id:"action-button",mapping:{buttonRenderer:"yt-button-renderer"}}, "data.dismissButton":{id:"dismiss-button",mapping:{buttonRenderer:"yt-button-renderer"}}},created:function(){this.closeOnDismissButton_=new Set;this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnDismissButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_DISMISS_BUTTON_TAP");this.closeOnAcceptButton_=new Set;this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN");this.closeOnAcceptButton_.add("UPSELL_DIALOG_DISMISS_STRATEGY_ONLY_ACTION_BUTTON_TAP");this.defaultDismissStrategy_= "UPSELL_DIALOG_DISMISS_STRATEGY_UNKNOWN"}, dataChanged_:function(a){this.hidden=!a.isVisible;a.isVisible||this.impressionLog()}, onDismissButtonTap_:function(){this.closeOnDismissButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))}, onAcceptButtonTap_:function(){this.closeOnAcceptButton_.has(this.data.dismissStrategy||this.defaultDismissStrategy_)&&(this.set("data.isVisible",!1),this.sendAction("yt-close-popup-action",["yt-upsell-dialog-renderer"]))}, computeHasHeader_:function(a){return!!a.headerBackgroundImage}, computeLayoutStyle_:function(a){return a}, computePopupSize_:function(a){return a}, computeIconType_:function(a){return a.dialogIcon&&a.dialogIcon.iconType?"YOUTUBE_LOGO"===a.dialogIcon.iconType?"yt-logos-ext:yt-logo":a.dialogIcon.iconType:""}, computeIsLogo_:function(a){return!!a.dialogIcon&&!!a.dialogIcon.iconType&&"YOUTUBE_LOGO"===a.dialogIcon.iconType}, computeImageHeight_:function(a){return a&&a.thumbnails?a.thumbnails[0].height||0:0}, computeImageWidth_:function(a){return a&&a.thumbnails?a.thumbnails[0].width||0:0}});var wsb;var xsb;var ysb=[xO.YtActionHandlerBehavior,{created:function(){this.logFlowCommandsMap_={"yt-log-ypc-flow-start-command":"handleLogYpcFlowStart_","yt-log-ypc-flow-dismiss-command":"handleLogYpcFlowDismiss_"}}, attached:function(){this.registerActionMap(this.logFlowCommandsMap_)}, detached:function(){this.unregisterActionMap(this.logFlowCommandsMap_)}, handleLogYpcFlowStart_:function(a){a.logYpcFlowStartCommand&&a.logYpcFlowStartCommand&&(a=a.logYpcFlowStartCommand,a.serializedTransactionFlowLoggingParams?iWa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&XN("ypcCancelFlowStarted","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&XN("ypcResumeFlowStarted","serializedYpcResumeFlowLoggingParams", a):a.serializedYpcPauseFlowLoggingParams&&(a=a.serializedYpcPauseFlowLoggingParams)&&XN("ypcPauseFlowStarted","serializedYpcPauseFlowLoggingParams",a))}, handleLogYpcFlowDismiss_:function(a){a.logYpcFlowDismissCommand&&(a=a.logYpcFlowDismissCommand,a.serializedTransactionFlowLoggingParams?jWa(a.serializedTransactionFlowLoggingParams):a.serializedYpcCancelFlowLoggingParams?(a=a.serializedYpcCancelFlowLoggingParams)&&XN("ypcCancelFlowCancelled","serializedYpcCancelFlowLoggingParams",a):a.serializedYpcResumeFlowLoggingParams?(a=a.serializedYpcResumeFlowLoggingParams)&&XN("ypcResumeFlowCancelled","serializedYpcResumeFlowLoggingParams",a):a.serializedYpcPauseFlowLoggingParams&&( a=a.serializedYpcPauseFlowLoggingParams)&&XN("ypcPauseFlowCancelled","serializedYpcPauseFlowLoggingParams",a))}}];var zsb={};zsb.YtCancelRecurrenceBehavior=[kO.YtComponentBehavior,IO.YtEndpointHandlerBehavior,W.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCancelRecurrenceHandler(b,c)})}, ypcCancelRecurrenceHandler:function(a,b){var c=this;if(!b||!b.ypcCancelRecurrenceEndpoint)return!1;if(!b.ypcCancelRecurrenceEndpoint.params)return ud(Error("params not provided for ypcCancelRecurrenceEndpoint")),!0;var d=YL(),f=this.getInterface(FM);d&&jM(d,b)?Xi(ZL(d,b).then(function(h){c.ypcCancelRecurrenceSuccess_(a,b,{data:h})},function(h){c.ypcCancelRecurrenceFailure_(a,b,h)}),function(){ud(Error("Error occurred in ypc cancel recurrence response handling."))}):f?Xi(f.requestDataForServiceEndpoint(b).then(function(h){c.ypcCancelRecurrenceSuccess_(a, b,h)},function(h){c.ypcCancelRecurrenceFailure_(a,b,h)}),function(){ud(Error("Error occurred in ypc cancel recurrence response handling."))}):ud(Error("Network Manager not initialized")); return!0}, ypcCancelRecurrenceSuccess_:function(a,b,c){c.data||(c={data:c});c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,this);c.data.messageRenderer?mWa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams):(b=b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams)&&XN("ypcCancelFlowSucceeded","serializedYpcCancelFlowLoggingParams",b);a.fire("yt-service-request-completed",c)}, ypcCancelRecurrenceFailure_:function(a,b,c){mWa(b.ypcCancelRecurrenceEndpoint.serializedYpcCancelFlowLoggingParams);a.fire("yt-service-request-error",{error:c,params:[a,b]})}}];var Asb=function(a,b){ab.call(this,b);this.errorSupportedRenderers=a}; p(Asb,Nab);function Bsb(a){N("enable_ypc_spinners")&&rL(a,"yt-open-popup-action",[{openPopupAction:{popupType:"FULLSCREEN_OVERLAY",popup:{loadingRenderer:{hack:!0}}}},a])} function Y8(a){N("enable_ypc_spinners")&&rL(a,"yt-close-popup-action",["yt-loading-renderer"])} ;var Csb={};Csb.YtCompleteTransactionBehavior=[kO.YtComponentBehavior,IO.YtEndpointHandlerBehavior,W.YtActionSenderBehavior,{attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c){return a.ypcCompleteTransactionHandler(b,c)})}, completeTransaction:function(a,b){var c=this;b={payments_payload:window.btoa(b.integratorData),buybucket_params:a.data.buybucketParams,offer_params:a.data.offerParams};var d=this.getInterface(FM),f=a.data.completeTransactionEndpoint,h=this.get("ypcCompleteTransactionEndpoint.actions",f);h&&this.sendInnerTubeActions(h,this);return(h=YL())&&jM(h,f)?ZL(h,f,b).then(function(l){return{data:l}}).then(this.handleCompleteTransactionSuccess_,function(){return c.handleCompleteTransactionFailure_(a)}):d.requestDataForServiceEndpoint(f, b).then(this.handleCompleteTransactionSuccess_,function(){return c.handleCompleteTransactionFailure_(a)})}, handleCompleteTransactionSuccess_:function(a){a.data||(a={data:a});if(a.data.messageRenderer)return Ri(new Asb(a.data.messageRenderer));if(a.data.trackingParams){var b=Tn(),c=Sn();b&&c&&yJ(b,c,Nn(a.data.trackingParams))}return Qi(a)}, handleCompleteTransactionFailure_:function(a){a=this.get("data.serializedTransactionFlowLoggingParams",a);ZN("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a);return Ri(new cO("TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE",a))}, ypcCompleteTransactionHandler:function(a,b){var c=this;if(!b.ypcCompleteTransactionEndpoint)return!1;if(!b.ypcCompleteTransactionEndpoint.transactionParams)return ud(Error("transactionParams not provided for ypcCompleteTransactionEndpoint")),!0;b.ypcCompleteTransactionEndpoint&&b.ypcCompleteTransactionEndpoint.gtmData&&bO(b.ypcCompleteTransactionEndpoint.gtmData);var d=this.getInterface(FM);if(d){Bsb(this);var f=YL();f&&jM(f,b)?ZL(f,b).then(function(h){return{data:h}}).then(function(h){a.fire("yt-service-request-completed"); c.ypcCompleteTransactionSuccess_(b,h)},function(){return c.ypcCompleteTransactionFailure_(b)}):d.requestDataForServiceEndpoint(b).then(function(h){a.fire("yt-service-request-completed"); c.ypcCompleteTransactionSuccess_(b,h)},function(){return c.ypcCompleteTransactionFailure_(b)})}return!0}, ypcCompleteTransactionSuccess_:function(a,b){Y8(this);b.data||(b={data:b});this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);b.data.messageRenderer||"YPC_RESPONSE_CODE_ERROR"===b.data.ypcResponseCode?this.ypcCompleteTransactionFailure_(a):(bO("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}"),this.logTransactionEvent_("transactionFlowSucceeded",a));b.data.actions&&(a=uWa(b.data.actions),b=vWa(b.data.actions),a.length&&this.sendServiceRequestAction(a),b.length&&this.sendInnerTubeActions(b, this))}, ypcCompleteTransactionFailure_:function(a){Y8(this);this.sendAction("yt-close-popup-action",["yt-loading-renderer"]);this.logTransactionEvent_("transactionFlowFailed",a,"TRANSACTION_ERROR_TYPE_YPC_COMPLETE_TRANSACTION_RPC_FAILURE")}, logTransactionEvent_:function(a,b,c){if(b=this.get("ypcCompleteTransactionEndpoint.serializedTransactionFlowLoggingParams",b))b={serializedTransactionFlowLoggingParams:b},c&&(b.errorType=c),Bm(a,b),gl()}}];var Dsb={};Dsb.YtUpdateFopBehavior=[{listeners:{"yt-service-request-completed":"onUpdateFopServiceRequestCompleted_"},onUpdateFopServiceRequestCompleted_:function(a,b){a=this.get("data.nativeFlowEndpoint",b);b=this.get("data.fallbackEndpoint",b);a?this.sendServiceRequestAction([a]):b&&this.fire("yt-navigate",{endpoint:b})}}, W.YtActionSenderBehavior];var Esb={};Esb.YtWalletPaymentBehavior=[{openWalletDialog:function(a,b,c,d,f,h){var l=this,m=Ui();b=b.replace(/-/g,"+").replace(/_/g,"/");var n=eJ.getInstance().get("hl");oWa(aO.getInstance(),b,m.resolve,f,m.reject,n,function(r){return l.onServerBackendAnalyticEvent_(a,c,r)},this.onDialogClose_.bind(this),d,h); return m.promise}, openFixFlowDialog:function(a,b,c,d){a=a.replace(/-/g,"+").replace(/_/g,"/");aO.getInstance().openFixFlowDialog(a,b,c,d)}, onDialogClose_:function(){this.sendAction("yt-wallet-dialog-closed")}, onServerBackendAnalyticEvent_:function(a,b,c){a.fire("yt-commerce-action-init-done");b&&this.sendServiceRequestAction([b,{backend_analytics:c}])}}, W.YtActionSenderBehavior];function Fsb(a,b,c){var d=[b];c&&d.push(c);return uL(a,d).then(function(f){var h=b.ypcHandleTransactionEndpoint.serializedTransactionFlowLoggingParams;"YPC_RESPONSE_CODE_ERROR"===f.data.ypcResponseCode&&(ZN("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",h),f=Ri(new cO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",h)));return f},function(){var f=b.ypcHandleTransactionEndpoint.serializedTransactionFlowLoggingParams; ZN("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",f);return Ri(new cO("TRANSACTION_ERROR_TYPE_YPC_HANDLE_TRANSACTION_RPC_FAILURE",f))})} ;function Z8(a,b,c){var d;d||(d={bubbles:!0,cancelable:!1,composed:!0});c&&(d.detail=c);b=new CustomEvent(b,d);a.dispatchEvent(b)} ;function Gsb(a,b,c){var d=YL(),f=tWa(),h=new yWa().init(),l=AWa(),m=c.getPaymentInstrumentsParamsCommand.languageCode;void 0===m?Zm(Error("language code not exist"),"ERROR"):Ti([h,f]).then(function(){var n={ctk:payments.business.integration.ClientTokenFactory.createClientToken(m,l)};d&&jM(d,c)?ZL(d,c,n).then(function(r){return{data:r}}).then(function(r){Z8(b,"yt-service-request-completed",r); "ERROR"!==r.code&&(r=r.data.command)&&tL(a,[r],b)}):Zm(Error("InnertubeTransportService not initialized"),"ERROR")})} ;function Hsb(a,b,c,d){var f=YL();f&&jM(f,c)?ZL(f,c,d).then(function(h){return{data:h}}).then(function(h){return Isb(a,b,c,h)},function(){return Jsb(c)}):(f=eL(FM))&&f.requestDataForServiceEndpoint(c,d).then(function(h){return Isb(a,b,c,h)},function(){return Jsb(c)})} function Isb(a,b,c,d){Z8(b,"yt-service-request-completed",d);d.code&&"ERROR"==d.code?Jsb(c):((d=d.data.commands)&&tL(a,d,b),(a=c.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&a&&XN("ypcPauseFlowSucceeded","serializedYpcPauseFlowLoggingParams",a))} function Jsb(a){(a=a.ypcPauseSubscriptionCommand.serializedYpcPauseFlowLoggingParams)&&a&&XN("ypcPauseFlowFailed","serializedYpcPauseFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")} ;function Ksb(a,b,c){var d=YL();d&&jM(d,c)?ZL(d,c).then(function(f){return{data:f}}).then(function(f){return Lsb(a,b,c,f)},function(){return Msb(c)}):(d=eL(FM))&&d.requestDataForServiceEndpoint(c).then(function(f){return Lsb(a,b,c,f)},function(){return Msb(c)})} function Lsb(a,b,c,d){Z8(b,"yt-service-request-completed",d);d.code&&"ERROR"==d.code?Msb(c):((d=d.data.commands)&&tL(a,d,b),(a=c.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&a&&XN("ypcResumeFlowSucceeded","serializedYpcResumeFlowLoggingParams",a))} function Msb(a){(a=a.ypcResumeSubscriptionCommand.serializedYpcResumeFlowLoggingParams)&&a&&XN("ypcResumeFlowFailed","serializedYpcResumeFlowLoggingParams",a,void 0,"YPC_ERROR_REASON_INNERTUBE_RESPONSE_FAILURE")} ;var Nsb={}; Nsb.YtEndpointHandlerWithYpcBehavior=[IO.YtEndpointHandlerBehavior,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,Esb.YtWalletPaymentBehavior,LO.YtOpenPopupBehavior,Dsb.YtUpdateFopBehavior,zsb.YtCancelRecurrenceBehavior,Csb.YtCompleteTransactionBehavior,{listeners:{"yt-service-request-sent":"onServiceRequestSent_","yt-service-request-completed":"onGetCartServiceRequestCompleted_","yt-service-request-error":"onServiceRequestError_"},created:function(){this.buyFlowActionMap_={};this.ypcRegisterActionMapJobId_=0}, attached:function(){var a=this;this.registerServiceEndpointHandler(function(b,c,d){return a.handleYPCEndpoint(b,c,d)}); this.ypcRegisterActionMapJobId_=Bk(Fk,function(){a.registerActionMap(a.buyFlowActionMap_)})}, detached:function(){var a=this;Fk.cancelJob(this.ypcRegisterActionMapJobId_);Bk(Fk,function(){a.unregisterActionMap(a.buyFlowActionMap_)})}, handleYPCEndpoint:function(a,b,c){var d=b.ypcGetCartEndpoint;if(d){var f=d.gtmId;f&&wWa(f);(d=d.gtmData)&&bO(d)}return null!=this.get("ypcGetCartEndpoint.prefetchConfig.ypcGetCartPrefetchResponseDataConfig.encryptedPurchaseParams",b)?(this.handleYPCGetCartEndpointWithPrefetch_(a,b),!0):null!=this.get("ypcFixInstrumentEndpoint.encryptedFixInstrumentParameters",b)?(this.handleYPCFixInstrumentEndpoint_(a,b),!0):N("enable_premium_voluntary_pause")&&b.ypcPauseSubscriptionCommand?(Hsb(this,a,b,c),!0):N("enable_premium_voluntary_pause")&& b.ypcResumeSubscriptionCommand?(Ksb(this,a,b),!0):b.getPaymentInstrumentsParamsCommand?(Gsb(this,a,b),!0):!1}, handleYPCGetCartEndpointWithPrefetch_:function(a,b){var c=this,d=b.ypcGetCartEndpoint;b=d.prefetchConfig.ypcGetCartPrefetchResponseDataConfig;var f=b.encryptedPurchaseParams,h=d.offerParams;d=b.serializedTransactionFlowLoggingParams;var l=b.serializedPaymentsClientParams,m=this.createGetCartResponseFromParams_(b,h,d);h={offerParams:h};this.changeButtonState(a,!0);Bm("buyFlowStarted",h);Wi(this.openWalletDialog(a,f,b.ypcLogWalletAnalyticDataEndpoint,d,function(){c.changeButtonState(a,!1)},l).then(function(n){return c.handleBuyFlowCompleteCallback_(a, m,n)},function(){return c.handleOnLoadError(m)}).then(function(n){return void c.handlePostPurchaseSuccess_(a,m,n)},function(n){return void c.handlePostPurchaseError_(n)}),function(){c.changeButtonState(a,!1); a.fire("yt-commerce-action-done")})}, createGetCartResponseFromParams_:function(a,b,c){var d=a.completeTransactionEndpoint;a=a.handleTransactionEndpoint;b={data:{offerParams:window.btoa(b),serializedTransactionFlowLoggingParams:c}};a?b.data.handleTransactionEndpoint=a:b.data.completeTransactionEndpoint=d;return b}, onGetCartServiceRequestCompleted_:function(a,b){var c=this,d=a.target;if(b&&b.data&&b.data.messageRenderer)Y8(this),this.handleMessageRenderer_(b.data.messageRenderer),this.changeButtonState(d,!1);else{var f=this.get("data.offerParams",b),h=this.get("data.encryptedPurchaseParams",b),l=this.get("data.upgradeDialogRenderer.ypcUpgradeDialogRenderer",b),m=this.get("data.ypcLogWalletAnalyticDataEndpoint",b),n=this.get("data.serializedPaymentsClientParams",b);if(h||l)a.stopPropagation(),Y8(this),this.changeButtonState(d, !1),l?this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:A("openPopupConfig").popupTypeMap.ypcUpgradeDialogRenderer,popup:{ypcUpgradeDialogRenderer:l}}},this]):(f&&Bm("buyFlowStarted",{offerParams:f}),a=this.getLoggingParams_(b),this.changeButtonState(d,!0),Wi(this.openWalletDialog(d,h,m,a,function(){c.changeButtonState(d,!1)},n).then(function(r){return c.handleBuyFlowCompleteCallback_(d,b,r)},function(){return c.handleOnLoadError(b)}).then(function(r){return c.handlePostPurchaseSuccess_(d, b,r)},function(r){return c.handlePostPurchaseError_(r)}),function(){c.changeButtonState(d,!1); d.fire("yt-commerce-action-done")}))}}, onServiceRequestSent_:function(a,b){b&&b.endpoint&&b.endpoint.ypcGetCartEndpoint&&!b.endpoint.ypcGetCartEndpoint.prefetchConfig&&(Bsb(this),this.changeButtonState(a.target,!0))}, onServiceRequestError_:function(a,b){if(b&&b.params&&b.params.length){b=k(b.params);for(var c=b.next();!c.done;c=b.next())if((c=c.value)&&c.ypcGetCartEndpoint){Y8(this);this.changeButtonState(a.target,!1);break}}}, handleBuyFlowCompleteCallback_:function(a,b,c){a=c.integratorData;return null==a||""===a||null!=c.error?(b=this.getLoggingParams_(b),"-1"===String(c.error)?Ri(new cO("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",b,!0)):Ri(new cO("TRANSACTION_ERROR_TYPE_YPC_BUYFLOW_COMPLETE_FAILURE",b))):b.data.handleTransactionEndpoint?Fsb(this,b.data.handleTransactionEndpoint,{payments_payload:a}):this.completeTransaction(b,c)}, handlePostPurchaseSuccess_:function(a,b,c){b=this.getLoggingParams_(b);kWa(b);(b=c.data)&&b.gtmDatas&&b.gtmDatas.length?bO(b.gtmDatas[0]):bO("{\"event\": \"purchased\", \"purchaseStatus\": \"success\"}");c.data&&c.data.actions&&this.sendInnerTubeActions(c.data.actions,a)}, handlePostPurchaseError_:function(a){a&&a.payload.isUserDismiss||Zm(Error("Error occurred during buyflow."))}, handleOnLoadError:function(a){a=this.getLoggingParams_(a);return Ri(new cO("TRANSACTION_ERROR_TYPE_LOAD_FAILURE",a))}, getLoggingParams_:function(a){return this.get("data.serializedTransactionFlowLoggingParams",a)}, handleMessageRenderer_:function(a){var b=lL(a,"renderer"),c=A("openPopupConfig");"confirmDialogRenderer"===b&&c&&this.sendAction("yt-open-popup-action",[{openPopupAction:{popupType:c.popupTypeMap[b],popup:a}},this])}, handleYPCFixInstrumentEndpoint_:function(a,b){var c=this,d=b.ypcFixInstrumentEndpoint;b=d.encryptedFixInstrumentParameters;this.logFixFopEvent_(d,"FIX_FOP_EVENT_TYPE_START");this.changeButtonState(a,!0);this.openFixFlowDialog(b,function(f,h){c.onFixFlowCompleteCallback_(d,f,h)},function(){return c.changeButtonState(a,!1)},function(){c.changeButtonState(a,!1); c.logFixFopEvent_(d,"FIX_FOP_EVENT_TYPE_FAILURE","FIX_FOP_ERROR_TYPE_LOAD_FAILURE")})}, onFixFlowCompleteCallback_:function(a,b,c){var d=Ka("payments.business.integration.scenario.FixInstrument");if(b==d.IntegratorCallbackType.ON_COMPLETE){b="FIX_FOP_EVENT_TYPE_CANCEL";var f=null;null!=c.error?c.error!=d.OnCompleteCallbackError.USER_CANCELLED&&(this.sendInnerTubeActions([a.errorAction],this),b="FIX_FOP_EVENT_TYPE_FAILURE",f="FIX_FOP_ERROR_TYPE_UNSPECIFIED"):(this.sendInnerTubeActions([a.successAction],this),b="FIX_FOP_EVENT_TYPE_SUCCESS");this.logFixFopEvent_(a,b,f)}}, logFixFopEvent_:function(a,b,c){(a=a.serializedFixFopLoggingParams)?(b={eventType:b,serializedFixFopLoggingParams:a},null!=c&&(b.errorType=c),Bm("fixFopFlow",b),gl()):Zm(Error("Fix Fop Logging params not provided."))}, changeButtonState:function(a,b){N("enable_ypc_spinners")&&a&&("yt-button-renderer"===a.is||"ytd-button-renderer"===a.is)&&(a.disabled=b)}}];var Osb=function(a,b){this.rootData=a;this.scrollTop=b};var Psb=function(a,b,c,d,f){this.endpoint=a;this.forward=b;this.historyEntry=c;this.savedComponentState=d;this.legacyBorder=void 0===f?!1:f};var $8=function(){}; e=$8.prototype;e.getCurrentEndpoint=function(){}; e.navigate=function(){}; e.navigateApp=function(){}; e.reload=function(){}; e.pageRequestFinished=function(){}; e.hasPendingNavigation=function(){}; e.cancelPendingNavigation=function(){}; e.resetChunkState=function(){};var a9=function(){}; a9.prototype.start=function(){}; a9.prototype.finish=function(){};rd("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS",{});rd("INNERTUBE_SUGGEST_CONFIG",{});function Qsb(a){return function(b,c){A(a)[b]=c}} var b9={},Rsb=(b9.CSI=Uo,b9.ECATCHER=Qsb("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS"),b9.SUGGEST=Qsb("INNERTUBE_SUGGEST_CONFIG"),b9);function Ssb(a){var b={};a=k(a);for(var c=a.next();!c.done;b={$jscomp$loop$prop$setter$2418:b.$jscomp$loop$prop$setter$2418},c=a.next()){var d=c.value;c=d.params;d=d.service;c&&d&&(b.$jscomp$loop$prop$setter$2418=Rsb[d],b.$jscomp$loop$prop$setter$2418&&c.forEach(function(f){return function(h){var l=h.key;h=h.value;l&&h&&f.$jscomp$loop$prop$setter$2418(l,h)}}(b)))}} ;var Tsb={}; Tsb.YtAppBehavior=[kO.YtComponentBehavior,xO.YtActionHandlerBehavior,W.YtActionSenderBehavior,{_noAccessors:!0,properties:{data:Object,hasError:{type:Boolean,value:!1},errorMessage:String,pauseVisibilityMonitor:Boolean},listeners:{"yt-history-load":"onYtHistoryLoad_","yt-history-pop":"onYtHistoryPop_","yt-navigate":"onYtNavigate_","yt-navigate-set-page-offset":"onYtNavigateSetPageOffset_","yt-update-title":"onYtUpdateTitle_","yt-update-unseen-notification-count":"onYtUpdateUnseenNotificationCount_"},actionRouterIsRoot:!0, created:function(){this.actionMap_={"yt-update-notifications-unseen-count-action":"handleUpdateNotificationsUnseenCountAction_","yt-clear-cookie-action":"handleClearCookieAction_","yt-store-grafted-ve-action":"onStoreGraftedVeAction_"};this.pageTitle_="";this.titleSuffix_="YouTube";this.unseenNotificationCount_=0;"complete"==document.readyState?this.handleDocumentLoaded_():window.addEventListener("load",this.handleDocumentLoaded_.bind(this));if(N("web_lifecycles")){N("web_lifecycles")&&window.addEventListener("beforeunload", c9a);var a=this.onDisposeApp_.bind(this);JV[0].push(a);JV[1].push(Gja)}else window.addEventListener("beforeunload",this.onUnload_.bind(this));this.initCsi_();this.initScraperAttributes_();this.hasSetScrollTopForNavigation_=this.hasNavigated_=!1;this.pagePreparer_=null;this.zwiebackInitJobId_=0;this.dataUpdatePromise_=null;N("enable_navigation_requests_streamz")&&(this.navigationRequestSentCounter_=new cu(new cn()));N("kevlar_enable_slis")&&(this.sessionPartition_=new Ndb,this.sessionPartition_.start()); this.loadDepsPromise=Qi();this.hasPendingNavigation_=!1;this.viewportLoadCalculationJobId_=0;QUa();aOa||(Mk(),KJ("FOREGROUND_HEARTBEAT_TRIGGER_ON_FOREGROUND"),xk(Va(KJ,"FOREGROUND_HEARTBEAT_TRIGGER_ON_INTERVAL"),ik("web_foreground_heartbeat_interval_ms",3E4)),bOa.push(sk(document,"visibilitychange",fOa)),aOa=!0);(a=Tn())&&"UNDEFINED_CSN"!==a&&Aka(a);N("enable_3p_cookie_tracking_streamz")&&Bk(Fk,this.report3pApisidCookieStatus_);N("enable_cookie_reissue_iframe")&&Bk(Fk,this.reset3pApisidCookieIfBroken_); N("enable_browser_cookie_status_monitoring")&&Bk(Fk,this.reportBrowserCookieSetting_)}, report3pApisidCookieStatus_:function(){if(A("ID_TOKEN",void 0)){var a=new au,b=!!Al("__Secure-3PAPISID");a.increment(b)}}, reset3pApisidCookieIfBroken_:function(){if(A("ID_TOKEN",void 0)&&!Al("__Secure-3PAPISID")){var a=void 0===a?"WEB":a;new $t().increment(a);a=ng("IFRAME");a.src="/signin?go=true";a.style.display="none";document.body.appendChild(a)}}, reportBrowserCookieSetting_:function(){new bu().increment(cia())}, handleDocumentLoaded_:function(){Wo("dl");Zn.getInstance().processSignal("pcl")}, attached:function(){this.registerNavigationManagerListenersWhenAvailable_();this.listen(document,"yt-navigate-cache","onYtNavigateCache_");this.registerActionMap(this.actionMap_)}, registerNavigationManagerListenersWhenAvailable_:function(a){var b=this;a=void 0===a?0:a;var c=this.getInterface($8);if(c)this.registerNavigationManagerListeners_(c);else{if(5<=a)throw Error("Unable to find the Navigation manager");setTimeout(function(){b.registerNavigationManagerListenersWhenAvailable_(a+1)},0)}}, registerNavigationManagerListeners_:function(a){this.listen(a,"yt-navigate-start","onYtNavigateStart_");this.listen(a,"yt-navigate-finish","onYtNavigateFinish_");this.listen(a,"yt-navigate-error","onYtNavigateError_");this.listen(a,"yt-page-data-fetched","onYtPageDataFetched_");this.listen(a,"yt-navigate-redirect","onYtNavigateRedirect_")}, detached:function(){var a=this.getInterface($8);this.unlisten(a,"yt-navigate-start","onYtNavigateStart_");this.unlisten(a,"yt-navigate-finish","onYtNavigateFinish_");this.unlisten(a,"yt-navigate-error","onYtNavigateError_");this.unlisten(document,"yt-navigate-cache","onYtNavigateCache_");this.unlisten(a,"yt-page-data-fetched","onYtPageDataFetched_");this.unlisten(a,"yt-navigate-redirect","onYtNavigateRedirect_");this.unregisterActionMap(this.actionMap_)}, setPageOffset:function(a,b){a?this.sendAction("yt-set-page-offset",[a,b]):Zm(Error("setPageOffset missing page"))}, setPageOffsetForNavigation_:function(a,b){this.hasSetScrollTopForNavigation_||(this.hasSetScrollTopForNavigation_=!0,this.setPageOffset(a,b))}, onYtNavigateSetPageOffset_:function(a,b){this.setPageOffsetForNavigation_(b.page,b.offset)}, getPageOffset:function(){var a=this.$["page-manager"].getCurrentPage(),b=0;a&&(b=this.sendAction("yt-get-page-offset",[a])[0]);return b}, initCsi_:function(){this.CSI_SERVICE_NAME&&(rd("CSI_SERVICE_NAME",this.CSI_SERVICE_NAME),Uo("yt_lt","cold"))}, initScraperAttributes_:function(){var a=Kd(document.location.href,"enable");a&&-1c&&(c=f);Wo("vptl",c);a.reportViewportLoad_(c)})},(N("kevlar_tuner_should_test_visibility_time_between_jobs")?ik("kevlar_tuner_visibility_time_between_jobs_ms",100):A("VISIBILITY_TIME_BETWEEN_JOBS_MS",500))+50)}, onYtNavigateFinish_:function(a,b){var c=this;this.dataUpdatePromise_.then(function(){c.finishNavigation_(b.navigationDoneMs);var d=c.getInterface(IM);!b.fromHistory&&c.hasNavigated_&&((d=d.getCurrentPage())?c.setPageOffsetForNavigation_(d,0):Am(Error("no pageManager.getCurrentPage()")));c.onYtNavigateFinishHandler();c.async(function(){c.async(function(){Wo("pda");c.collectViewportLoadTime_()})})})}, onYtNavigateRedirect_:function(a){a.detail.url&&this.$.historyManager.replaceUrl(a.detail.url)}, onYtNavigate_:function(a){a.detail.endpoint||Zm(new Ul("Error: Missing yt-navigate endpoint from target:",a.target,a.target.nodeName));var b=this.$.historyManager;N("cold_missing_history")&&!b.init(!1)&&(rd("DISABLE_WARM_LOADS",!0),b=new Ul("Failed to initialize history manager",b.getDebugString()),navigator.userAgent&&navigator.userAgent.contains("Version/11.1.2 Safari")?Am(b):Zm(b));if(N("kevlar_command_handler"))this.handleNavigate({type:2,command:a.detail.endpoint,form:{params:a.detail.params, tempData:a.detail.tempData||{},requestType:a.detail.type,createScreenConfig:a.detail.createScreenConfig}});else{this.hasSetScrollTopForNavigation_=!1;b=this.getInterface($8);var c=a.detail.tempData||{};b.navigate(a.detail.endpoint,!1,a.detail.params,c,a.detail.type,a.detail.createScreenConfig)&&this.tryOnYtEndpointChangeHandler_(a.detail.endpoint,c)}}, handleNavigate:function(a){this.hasSetScrollTopForNavigation_=!1;var b=this.getInterface($8),c=a.form||{};b.navigate(a.command,!1,c.params,c.tempData,c.requestType,c.createScreenConfig)&&this.tryOnYtEndpointChangeHandler_(a.command,c.tempData)}, waitForViewportLoad_:function(){ap("vpl")}, onYtPageDataFetched_:function(a,b){try{ON.getInstance().reset();ap("cpt");this.waitForViewportLoad_();this.data=b.pageData;this.dataUpdatePromise_&&(this.dataUpdatePromise_.cancel("canceled dataUpdatePromise_"),this.dataUpdatePromise_=null);var c=this.get("response.frameworkUpdates.entityBatchUpdate",this.data);if(c)this.onEntitiesUpdated(c);this.dataUpdatePromise_=this.getInterface(IM).updatePageData(this.data);var d=this.get("playerResponse.responseContext.serviceTrackingParams",this.data);d&&Ssb(d); var f=this.get("response.responseContext.serviceTrackingParams",this.data);f&&Ssb(f);var h=this.get("playerResponse.onResponseReceivedActions",this.data);h&&this.sendInnerTubeActions(h,this);var l=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData",this.data);l&&this.handleYtConfigData_(l)}catch(m){Zm(m)}}, reportViewportLoad_:function(a){ON.getInstance();Wo("vpl",a);XUa()}, handleYtConfigData_:function(a){void 0!=a.delegatedSessionId&&rd("DELEGATED_SESSION_ID",a.delegatedSessionId);void 0!=a.sessionIndex&&rd("SESSION_INDEX",a.sessionIndex);var b;(b=a.visitorData)&&!(b=!N("clear_visitor_id_in_ytconfig_before_consent"))&&(b=Al("CONSENT"),b=!b||b.startsWith("YES+"));b&&rd("VISITOR_DATA",a.visitorData)}, tryOnYtEndpointChangeHandler_:function(a,b){try{this.onYtEndpointChangeHandler(a,b)}catch(c){Zm(c)}}, onYtEndpointChangeHandler:function(){}, onYtNavigateFinishHandler:function(){}, setPageTitle:function(a){a=(this.pageTitle_=a)?a+" - "+this.titleSuffix_:this.titleSuffix_;document.title=this.getNotificationTitlePrefix_()+a}, onYtUpdateTitle_:function(a,b){this.setPageTitle(b)}, getNotificationTitlePrefix_:function(){return this.unseenNotificationCount_?"("+this.unseenNotificationCount_+") ":""}, setUnseenNotificationCount:function(a){this.unseenNotificationCount_=a;this.setPageTitle(this.pageTitle_)}, handleUpdateNotificationsUnseenCountAction_:function(a){a.updateNotificationsUnseenCountAction&&(a.updateNotificationsUnseenCountAction.unseenCount?this.setUnseenNotificationCount(a.updateNotificationsUnseenCountAction.unseenCount):this.setUnseenNotificationCount(0))}, handleClearCookieAction_:function(a){a.clearCookieAction&&a.clearCookieAction.cookieName&&Bl(a.clearCookieAction.cookieName)}, onYtUpdateUnseenNotificationCount_:function(a,b){this.setUnseenNotificationCount(b)}, loadData:function(a,b){var c=this;this.loadDepsPromise.then(function(){var d=c.getInterface($8);d||Zm(Error("Load data called with no navigation manager."));if(b&&b.response){if(!a){var f=Dd(window.document.location.href)||"/",h="";if("/"==f||f.startsWith("/?"))h="WEB_PAGE_TYPE_BROWSE";a={commandMetadata:{webCommandMetadata:{url:f,webPageType:h,rootVe:3854}}}}d=d.pageRequestFinished(a,b,5,{});b.filler||c.createClientSideScreen_(b);d.then(function(){N("enable_navigation_requests_streamz")&&c.navigationRequestSentCounter_&& c.navigationRequestSentCounter_.increment(b.page||"null","COLD")})}else a?d.navigate(a):d.navigate(PL); Fk.cancelJob(c.zwiebackInitJobId_);c.zwiebackInitJobId_=Ck(Fk,aVa)})}, isDataExpired_:function(a){return!a||isNaN(a.expirationTime)?!1:Zk()>a.expirationTime}, logHistoryNav_:function(a,b){var c=this.get("response.trackingParams",b),d=Sn(),f=Tn();if(c&&d&&f&&(c=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",b),!c&&b.rootVe&&(c=b.rootVe),d=this.getHistoryButtonVe_(a),a=zL(),f=[Qi(b)],AL(a,c,d,{dataPromises:f,csnToClone:b.csn}),b.graftedVes))for(b=k(b.graftedVes),c=b.next();!c.done;c=b.next())BL(a,c.value)}, getHistoryButtonVe_:function(a){var b=a?"forwardButton":"backButton";a=this.get("playerResponse.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);b=this.get("response.topbar.desktopTopbarRenderer."+b+".buttonRenderer.command.clickTrackingParams",this.data);if(a=a||b)return Nn(a)}, onStoreGraftedVeAction_:function(a){this.data?(this.data.graftedVes||(this.data.graftedVes=[]),this.data.graftedVes.push(a)):Am(Error("this.data missing"))}, createClientSideScreen_:function(a){var b;N("kevlar_better_cold_ve")&&a.endpoint&&!a.endpoint.urlEndpoint&&(b=this.get("endpoint.commandMetadata.webCommandMetadata.rootVe"));b||(b=this.get("response.responseContext.webResponseContextExtensionData.ytConfigData.rootVisualElementType",a));if(b){var c=zL();a.endpoint&&a.previousCsn?YQa(c,a.endpoint,{parentCsn:a.previousCsn}):AL(c,b);a.response&&a.response.trackingParams&&CL(c,a.response.trackingParams);a.playerResponse&&a.playerResponse.trackingParams&& CL(c,a.playerResponse.trackingParams)}}, onEntitiesUpdated:function(){}}];var Usb={};Usb.YtFeedbackCollectorBehavior=[xO.YtActionHandlerBehavior,{_noAccessors:!0,created:function(){this.feedbackCollectorActionMap_={"yt-help-dialog-requested":"handleHelpDialogRequested_","yt-feedback-dialog-requested":"handleFeedbackDialogRequested_","yt-signal-action-help":"handleSignalActionHelp_","yt-signal-action-send-feedback":"handleSignalActionSendFeedback_","yt-send-feedback-action":"handleSendFeedbackAction_","yt-user-feedback-endpoint":"handleUserFeedbackEndpoint_"}}, attached:function(){this.registerActionMap(this.feedbackCollectorActionMap_)}, detached:function(){this.unregisterActionMap(this.feedbackCollectorActionMap_)}, handleFeedbackDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(i4).showFeedbackDialog(a.customProductData,a.feedbackContent,a.onFeedbackSubmitted,a.bucket)}, handleHelpDialogRequested_:function(a){a=void 0===a?{}:a;this.getInterface(i4).showHelpDialog(a.helpContext,a.articleId,a.productData)}, handleSignalActionHelp_:function(){this.handleHelpDialogRequested_()}, handleSignalActionSendFeedback_:function(){this.handleFeedbackDialogRequested_()}, handleSendFeedbackAction_:function(a,b,c){a.sendFeedbackAction&&a.sendFeedbackAction.productId?OI({productId:a.sendFeedbackAction.productId,bucket:a.sendFeedbackAction.bucket,enableAnonymousFeedback:!0,allowNonLoggedInFeedback:!0},{feedbackChoice:c.feedbackChoice}):this.handleFeedbackDialogRequested_({bucket:a.sendFeedbackAction.bucket})}, handleUserFeedbackEndpoint_:function(a){if(a.userFeedbackEndpoint){a=a.userFeedbackEndpoint;var b={bucket:a.bucketIdentifier};a.additionalDatas&&(b.customProductData={},a.additionalDatas.forEach(function(c){if(c=c.userFeedbackEndpointProductSpecificValueData)b.customProductData[c.key]=c.value})); this.handleFeedbackDialogRequested_(b)}}}];var c9=function(){this.registrationCompletedPromise_=null;this.isFirstWarmTransitionRequested_=!1},Vsb=function(a){if(a.registrationCompletedPromise_)return a.registrationCompletedPromise_; a.registrationCompletedPromise_=Qi();return a.registrationCompletedPromise_},Wsb=function(){var a=c9.getInstance(); a=Vsb(a);a.then(function(){rd("IS_HOMEPAGE_COLD",!1);rd("IS_RESULTS_PAGE_COLD",!1);rd("IS_WATCH_PAGE_COLD",!1)}); return a}; Ma(c9);Ha("yt.logging.errors.log",Zm,void 0);eb(A("ERRORS")||[],function(a){Zm.apply(null,a)}); rd("ERRORS",[]); var d9={messageWeights:[{messageRegExp:/.*(window.customElements|HTMLTemplateElement).* is undefined/,weight:500},{messageRegExp:/.*property '(configurable|polyfillWrapFlushCallback)'.*/,weight:500},{messageRegExp:/.*__shady_(native_addEventListener|getRootNode).*/,weight:500},{messageRegExp:/ytsignals missing/,weight:500},{messageRegExp:/.*(MutationObserver|ShadowRoot|ErrorEvent) is not defined/,weight:100},{messageRegExp:/Cannot call 'patch'/,weight:500},{messageRegExp:/ShadyDOM.patch is not a function/,weight:500}, {messageRegExp:/Illegal invocation/,weight:500},{messageRegExp:/no such interface supported/,weight:500},{messageRegExp:/play.*request was interrupted/,weight:500},{messageRegExp:/Failed to .* ServiceWorker.*/,weight:500},{messageRegExp:/(DOMPurify|vid_mate_check) is not defined/,weight:0},{messageRegExp:/A network error occurred/,weight:500},{messageRegExp:/Ticking CPT when CPT already ticked/,weight:100},{messageRegExp:/Unexpected end of .*(input|data)/,weight:500},{messageRegExp:/JSON .* unexpected/, weight:500},{messageRegExp:/Unexpected token ")|| b.startsWith("load@")||b.startsWith("global code@")||b.startsWith("@https://")))return!1;return!0}, weight:500},{callback:function(a){return"Cannot read property 'experiments'"===a.message&&a.stack.includes("/s/player/")}, weight:500},{callback:function(a){return a.stack.includes("/embed.js")?(a.params&&a.params&&(a.params.name="56"),!0):!1}, weight:1}]},e9=Tm();d9.messageWeights&&(e9.messageWeights=e9.messageWeights.concat(d9.messageWeights));d9.callbackWeights&&(e9.callbackWeights=e9.callbackWeights.concat(d9.callbackWeights)); window.onerror=function(a,b,c,d,f,h){b=void 0===b?"Unknown file":b;c=void 0===c?0:c;var l=!1,m;if((m=(m=qd.EXPERIMENT_FLAGS)?m.log_window_onerror_fraction:void 0)&&Math.random()=this.MAX_SIZE_){var c=this.timeToDataCache_.keys().next();this.timeToDataCache_.delete(c.value)}this.timeToDataCache_.set(a,b)}; f9.prototype.clear=function(){this.timeToDataCache_.clear()};var Xsb=function(a,b,c){this.entryTime=a;this.endpoint=b;this.savedComponentState=void 0===c?null:c};var Ysb={pushState:window.history.pushState,replaceState:window.history.replaceState}; Polymer({is:"yt-history-manager",behaviors:[kO.YtComponentBehavior,W.YtActionSenderBehavior],properties:{noIframe:Boolean},created:function(){this.historyEntryTime_=0;this.historyEntryTimeToDataMap_={};this.historySnapshotCache_=(this.USE_HISTORY_SNAPSHOT_CACHE_=N("web_enable_history_cache_map"))?new f9:null;this.global=window;this.iframe_=null;this.initialized_=!1;this.boundHistoryPushState_=this.boundHistoryReplaceState_=void 0;this.entryIndex_=0;this.debugInfo_={}}, hasBoundFunctions_:function(){return!!this.boundHistoryReplaceState_&&!!this.boundHistoryPushState_}, init:function(a){if(this.initialized_)return this.hasBoundFunctions_();this.initialized_=!0;if(!this.noIframe){var b=ng("IFRAME");b.src="about:blank";b.style.display="none";this.iframe_=b;document.body.appendChild(b)}this.bindHistoryStateFunctions_();a||this.replaceState(null,null,0);return this.hasBoundFunctions_()}, bindHistoryStateFunctions_:function(){var a=[];if(this.iframe_&&this.iframe_.contentWindow.history){var b=this.iframe_.contentWindow.history;b&&(a.push(b),b.__proto__&&a.push(b.__proto__))}this.global.history&&a.push(this.global.history);this.global.history.__proto__&&a.push(this.global.history.__proto__);a.push(Ysb);b=function(d){for(var f=null,h=0;hthis.historyEntryTime_,this.historyEntryTime_=a.entryTime,b=a.endpoint,f=a.savedComponentState);c?this.entryIndex_++:this.entryIndex_--;this.fire("yt-history-load",new Psb(b,c,d,f,h))}}, saveSnapshot_:function(a,b,c){b=new Osb(b,c);this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.set(a,b):this.historyEntryTimeToDataMap_[a]=b}, clearSavedStates:function(){this.USE_HISTORY_SNAPSHOT_CACHE_?this.historySnapshotCache_.clear():this.historyEntryTimeToDataMap_={}}, safeReplaceState_:function(a,b,c){this.boundHistoryReplaceState_||this.bindHistoryStateFunctions_();this.boundHistoryReplaceState_?this.boundHistoryReplaceState_(a,b,c):Zm(new Ul("history.replaceState is not a function",this.getDebugString_()))}, safePushState_:function(a,b,c){this.entryIndex_++;this.boundHistoryPushState_||this.bindHistoryStateFunctions_();this.boundHistoryPushState_?this.boundHistoryPushState_(a,b,c):Zm(new Ul("history.pushState is not a function",this.getDebugString_()))}, replaceState:function(a,b,c,d){this.init(!0);var f=this.global.history.state&&this.global.history.state.entryTime?this.global.history.state.entryTime:window.performance.now();a=new Xsb(f,a,d);this.saveSnapshot_(f,b,c);this.historyEntryTime_=f;this.safeReplaceState_(a,"",this.global.location.href)}, replaceUrl:function(a){this.init(!0);this.safeReplaceState_(this.global.history.state,"",XM(a))}, replaceSavedComponentState:function(a){this.init(!0);var b=this.global.history.state;b.savedComponentState=a;this.safeReplaceState_(b,"",Dd(this.global.location.href))}, saveAndPush:function(a,b,c,d,f){this.init();this.maybeCacheTime_(c);c.csn=Tn();this.saveSnapshot_(this.historyEntryTime_,c,d);b=new Xsb(window.performance.now(),b,f);this.historyEntryTime_=b.entryTime;this.safePushState_(b,"",XM(a))}, maybeCacheTime_:function(a){var b=KM(this);if(a&&"watch"==a.page&&this.get("player.args",a)&&!this.get("player.args.live_playback",a)&&b&&(b=b.getPlayer())){var c=b.getDuration()-b.getCurrentTime()>ik("kevlar_time_caching_end_threshold")&&b.getCurrentTime()>ik("kevlar_time_caching_start_threshold");a.player.args.start=c?b.getCurrentTime():0}}});var g9=function(){}; p(g9,HO);e=g9.prototype;e.getApiPaths=function(){return LMa}; e.getExtension=function(a){return a.watchEndpoint}; e.isNavigationCommand=function(){return!0}; e.getStoreKey=function(a){if(N("kevlar_cache_on_ttl_player")&&(a=this.getExtension(a))&&a.videoId){var b={videoId:a.videoId};a.playlistId&&(b.playlistId=a.playlistId);a.playerParams&&(b.params=a.playerParams);return vSa("player",b)}}; e.getClientScreen=function(a){var b;return 2===(null===(b=a.contentPlaybackContext)||void 0===b?void 0:b.vis)?"WATCH_FULL_SCREEN":"WATCH"}; e.buildRequest=function(a,b,c){b.videoId&&(a.videoId=b.videoId);b.playlistId&&(a.playlistId=b.playlistId);void 0!==b.index&&(a.playlistIndex=b.index+1);b.playerParams&&(a.params=b.playerParams);b.startTimeSeconds&&(a.startTimeSecs=b.startTimeSeconds);c.contentPlaybackContext&&(a.playbackContext={contentPlaybackContext:c.contentPlaybackContext});c.prefetchPlaybackContext&&(a.playbackContext=Object.assign(Object.assign({},a.playbackContext),{prefetchPlaybackContext:c.prefetchPlaybackContext}),a.context.request||( a.context.request={}),a.context.request.isPrefetch=!0)}; e.getRequestConfig=function(a){a=this.getStoreKey(a);var b;a&&(b={storeStrategy:{storeKey:a}});return b};var h9=function(){}; p(h9,HO);e=h9.prototype;e.getApiPaths=function(){return jNa}; e.getExtension=function(a){return a.watchEndpoint}; e.isNavigationCommand=function(){return!0}; e.getClientScreen=function(a){var b;return 2===(null===(b=a.contentPlaybackContext)||void 0===b?void 0:b.vis)?"WATCH_FULL_SCREEN":"WATCH"}; e.buildRequest=function(a,b,c){b.videoId&&(a.videoId=b.videoId);b.playlistId&&(a.playlistId=b.playlistId);b.params&&(a.params=b.params);void 0!==b.index&&(a.playlistIndex=b.index);c.consentBumpParams&&(a.consentBumpParams=c.consentBumpParams);a.racyCheckOk=!1;a.contentCheckOk=!1;c.contentPlaybackContext&&(a.autonavState=c.contentPlaybackContext.autonavState,a.playbackContext={vis:c.contentPlaybackContext.vis,lactMilliseconds:c.contentPlaybackContext.lactMilliseconds})}; var i9=function(){}; p(i9,HO);i9.prototype.getApiPaths=function(){return jNa}; i9.prototype.getExtension=function(a){return a.continuationCommand}; i9.prototype.buildRequest=function(a,b){b.token&&(a.continuation=b.token)};function Zsb(a,b){var c=window.location.href,d,f,h,l;if(a.watchEndpoint&&(null===(f=null===(d=a.commandMetadata)||void 0===d?void 0:d.webCommandMetadata)||void 0===f?0:f.url)){var m=new VI;b={contentPlaybackContext:wTa(b,null===(l=null===(h=a.commandMetadata)||void 0===h?void 0:h.webCommandMetadata)||void 0===l?void 0:l.url,c),consentBumpParams:YM()};(c=new h9().getRequest(a,b))&&$sb(m,c.innerTubeRequest,"WatchUIService.GetWatchNext");(a=new g9().getRequest(a,b))&&$sb(m,a.innerTubeRequest,"WatchService.GetPlayer"); return Le(m.serializeBinary())}} function $sb(a,b,c){var d=new UI;b=JSON.stringify(b);sf(d,2,b);d.setName(c);Lf(a,2,d,UI,void 0)} ;function atb(a){if(!a.urlEndpoint)return!1;var b=a.urlEndpoint.url;if(!b)return Zm(Error("UrlEndpoint with no url specified.")),!1;if("TARGET_NEW_WINDOW"===a.urlEndpoint.target)return N("resolve_url_parent_tracking_params")&&(!Ad(b)||Fd(window.location.href,b))&&cJ(b,{endpoint:a,itct:a.clickTrackingParams}),sga(b,{target:"_blank",noopener:!0}),!0;var c=Bd(b);c=c&&c.includes("/parent_tools");var d=!(!Ad(b)||Fd(window.location.href,b)),f=0<=b.indexOf("disable_polymer=1");if(d||f||c)Zo("n"),SN(b,void 0, void 0,window.top);else return Am(new Ul("UrlEndpoint should not be used for same origin navigations. Use a better typed command instead",a)),!1;return!0} function btb(a){if(!(a.signOutEndpoint||a.signInEndpoint||a.urlEndpoint&&a.urlEndpoint.url)||!a.clickTrackingParams)return!1;var b=a.clickTrackingParams,c=Tn();if(c&&b){var d;a=(null===(d=a.urlEndpoint)||void 0===d?0:d.url)?{externalLinkData:{url:a.urlEndpoint.url}}:null;BJ(c,Nn(b),a);return!0}return!1} ;var ctb="/account /account_advanced /account_billing /account_notifications /account_playback /account_privacy /account_sharing /channel/ /feed/ /gaming /gaming/ /hashtag /learning /manage_red /musicpremium /new /originals /paid_memberships /playlist /post/ /premium /results /search /show/ /user/ /watch /youtuberedoriginals".split(" "),dtb=[];Polymer({is:"yt-navigation-manager",provides:$8,behaviors:[kO.YtComponentBehavior,{_noAccessors:!0,created:function(){this.pendingNavigationPromise_=null}, hasPendingNavigation:function(){return!!this.pendingNavigationPromise_}, cancelPendingNavigation:function(){this.pendingNavigationPromise_&&(this.pendingNavigationPromise_=null)}}, xO.YtActionHandlerBehavior,W.YtActionSenderBehavior],actionMap:{"yt-signal-action-history-back":"handleSignalActionHistoryBack_","yt-signal-action-reload-page":"handleSignalActionReloadPage_","yt-signal-action-soft-reload-page":"handleSignalActionSoftReloadPage_","yt-signal-action-reset-warm-loads":"handleSignalActionResetWarmLoads_","yt-signal-action-close-window":"handleSignalActionCloseWindow_"},created:function(){this.logger_=null;this.numNavigations_=-1;this.chunksReceived_=0;this.lastNavigationUrl_= this.pendingNavigationPromise_=null;this.initClientStreamzObjects_();this.autoplayCount=1;this.hasSeenSwfConfigChunk_=this.resetWarmLoads_=!1}, initClientStreamzObjects_:function(){N("enable_servlet_streamz")&&(this.requestCounter_=new Ot,this.responsesCounter_=new Pt);N("debug_servlet_streamz")&&(this.navigatePageTypeCounter_=new Rt,this.awayFromAppEndpointCounter_=new St,this.cannotGenerateURLCounter_=new Tt,this.forcedColdLoadCounter_=new Ut,this.pageRequestFailCounter_=new Vt,this.loadPageRequestCounter_=new Wt,this.pageChunkReceivedCounter_=new Xt,this.pageRequestFinishedCounter_=new Yt,this.pageUpdateFinishCounter_=new Zt);N("enable_navigation_requests_streamz")&&( this.navigationRequestSentCounter_=new cu(cn()));N("enable_servlet_errors_streamz")&&(this.servletResponseErrorsCounter_=new Qt)}, factoryImpl:function(){}, currentEndpoint_:null,getPageTypeForEndpoint_:function(a){var b="";if(!a)return null;a.commandMetadata&&a.commandMetadata.webCommandMetadata&&a.commandMetadata.webCommandMetadata.webPageType?b=uTa(a.commandMetadata.webCommandMetadata.webPageType.toLowerCase()):a.browseEndpoint||a.watchPlaylistEndpoint?b="browse":a.searchEndpoint?b="search":a.watchEndpoint&&(b="watch");return b}, getCurrentEndpoint:function(){return this.currentEndpoint_}, reload:function(){window.location.reload()}, reloadData:function(){this.currentEndpoint_&&this.navigate(this.currentEndpoint_,!0)}, navigate:function(a,b,c,d,f,h){var l=this;b=void 0===b?!1:b;c=void 0===c?{}:c;d=void 0===d?{}:d;var m=this.getPageTypeForEndpoint_(a);this.navigatePageTypeCounter_&&this.navigatePageTypeCounter_.increment(m||"null",f||"null");var n="1"==d.autonav,r=Tn(),v;if("watch"===m&&(N("kevlar_prefetch")&&!N("block_all_player_prefetch_requests")&&(v=WTa(oN.getInstance(),a,n)),N("persistent_miniplayer")&&this.shouldLoadEndpointInMiniplayer_()))return this.endpointInMiniplayer_(a)?this.sendAction("yt-expand-watch-page-action"): this.sendAction("yt-miniplayer-load-endpoint",[a]),!1;v&&(c.frags=v.missingFragments_.join(","));var z=null;this.get("commandMetadata.webCommandMetadata.ignoreNavigation",a)||(z=N("kevlar_command_url")?this.get("commandMetadata.webCommandMetadata.url",a):hL(a,c));var C=!1;if(z&&this.pendingNavigationPromise_){if(this.lastNavigationUrl_&&z==this.lastNavigationUrl_)return Qla("nrsu")||Uo("nrsu",1),!1;this.pendingNavigationPromise_.cancel("canceled pendingNavigationPromise_");C=!0;this.recordNavigationCancelled_()}var J= window.location.href;C?this.lastNavigationReferer_&&(J=this.lastNavigationReferer_):this.lastNavigationReferer_=J;z&&(this.lastNavigationUrl_=z);var E=Wsb();a.loggingUrls&&a.loggingUrls.forEach(function(qa){qa.baseUrl&&Xn(qa.baseUrl)}); btb(a)&&N("kevlar_flush_logs_on_away_navigation")&&gl();if(atb(a))return this.awayFromAppEndpointCounter_&&this.awayFromAppEndpointCounter_.increment(m||"null"),!1;this.recordNavigationStart_(m,f);if(!z)return this.cannotGenerateURLCounter_&&this.cannotGenerateURLCounter_.increment(m||"null"),this.recordNavigationFailure_(),!1;VNa();var T=a&&a.hasOwnProperty("browseEndpoint")&&a.browseEndpoint.browseId.startsWith("UC");T=this.shouldRedirect_(z)&&!T;N("kevlar_next_cold_on_auth_change_detected")&&!sia().verifyUser()&&( T=!0);if(T||A("DISABLE_WARM_LOADS")||this.resetWarmLoads_)return SN(z,void 0,void 0,window.top),this.forcedColdLoadCounter_&&this.forcedColdLoadCounter_.increment(m||"null",this.shouldRedirect_(z),A("DISABLE_WARM_LOADS")),this.recordNavigationAborted_(),!1;this.resetChunkState();Nla("n");ap("nd");Pla("nr");n&&Uo("nr","an");C&&Uo("pnc",1);if(N("kevlar_mousedown_prefetch")&&!N("block_all_player_prefetch_requests")&&v&&v.completionPromise){var la=v.completionPromise;v.addPartCallback(function(qa){l.handleNavigatePart_(la, a,d,qa)})}else a.clickTrackingParams&&(d.itct=a.clickTrackingParams,d.csn=r),d.endpoint=JSON.stringify(a),y.isEmpty(d)||cJ(z,d),n={headers:{"X-YouTube-STS":N("web_player_enable_ipp")?A("STS",void 0):18660, "x-youtube-csoc":1}},f&&(n.type=f),N("web_forward_command_on_pbj")?(n.method="POST",n.postParams={command:JSON.stringify(a)}):N("web_post_search")&&this.get("commandMetadata.webCommandMetadata.sendPost",a)&&(n.method="POST"),this.requestCounter_&&this.requestCounter_.increment(m||"null"),N("kevlar_op_warm_diffing")&&n.postParams&&(r=Zsb(a,d))&&(n.postParams.cdiffdata=r),r=$M(ZM.instance,a),C=window.location.href,N("kevlar_use_pre_cancel_referer")&&(C=J),la=r?aN(ZM.instance,a,d,C,this.getPageTypeForEndpoint_(a), function(qa,Ea){l.loadPageChunk_(qa,Ea,d,h)},function(qa){return l.isNetworkPromiseStale_(qa)}):this.getInterface(FM).requestDataForEndpoint(a,c,function(qa){this.handleNavigatePart_(la,a,d,qa,h)}.bind(this),n,!!N("cancel_pending_navs")); this.pendingNavigationPromise_=la;c=E.then(function(){return la}).then(this.handleNavigateSuccess_.bind(this,la,a,v,d),this.handleNavigateFail_.bind(this,la,a)); JL.getInstance().navigationFinishPromise=c;b={endpoint:a,pageType:m,url:XM(z),reload:!!b};f&&(b.type=f);E.then(this.fire.bind(this,"yt-navigate-start",b));v&&E.then(this.loadPrefetchedData_.bind(this,a,v,d));return!0}, loadPrefetchedData_:function(a,b,c){if(b=LTa(b))N("kevlar_prefetched_data_set_csn_early")&&b.csn&&b.rootVe&&Vn(b.csn,b.rootVe),this.loadPageChunk_(a,b,c)}, navigateApp:function(){throw Error("Not implemented for this navigation manager.")}, isNetworkPromiseStale_:function(a){return a!=this.pendingNavigationPromise_}, pageRequestFail_:function(a,b,c,d){var f=this.getPageTypeForEndpoint_(a);this.pageRequestFailCounter_&&this.pageRequestFailCounter_.increment(f||"null");a={endpoint:a,pageType:f};d&&(a.errorMessage=d);Am(b);a.navigationDoneMs=Wo("nd");a.navigationErrorReason=c;this.responsesCounter_&&(c=this.get("params.error.0.code",b)||"null_error",this.responsesCounter_.increment("failure",f||"null",c));this.servletResponseErrorsCounter_&&(f=this.get("params.error.0.code",b)||"null_error_code",b=this.get("params.error.0.location", b)||"null_error_location",this.servletResponseErrorsCounter_.increment(f,b));this.fire("yt-navigate-error",a)}, handleNavigateFail_:function(a,b,c){var d=void 0;c instanceof Yi&&(d=c,c.sampleWeight=0);if(this.isNetworkPromiseStale_(a))return N("kevlar_track_mousedown_prefetch")&&hN.getInstance().resolve(!0),Ri(d);this.recordNavigationFailure_();this.pageRequestFail_(b,c,"101");return Ri(c)}, handleNavigatePart_:function(a,b,c,d,f){this.isNetworkPromiseStale_(a)||(d.reload?window.location.reload(!0):(Wo("nc"+this.chunksReceived_),this.chunksReceived_++,Vsb(c9.getInstance()).then(this.pageChunkReceived_.bind(this,b,c,d,f))))}, handleNavigateSuccess_:function(a,b,c,d,f){if(this.isNetworkPromiseStale_(a))return N("kevlar_track_mousedown_prefetch")&&hN.getInstance().resolve(!0),Qi();N("kevlar_track_mousedown_prefetch")&&hN.getInstance().resolve();this.pendingNavigationPromise_=null;if(!f)return b=new Ul("Missing data in response for navigation endpoint",b),Ri(b);if(f.reload)return window.location.reload(!0),Qi();c&&(a={},y.extend(a,LTa(c),f),f=a);c=this.get("timing.responseStart",f);null!=c&&Wo("srt",c);Wo("pdc");c=this.get("timing.info", f);if(null!=c)for(var h in c)Uo(h,c[h]);d.playnext?VM().count++:VM().count=1;N("enable_navigation_requests_streamz")&&this.incrementNavigationRequestsStreamz_(b);this.recordNavigationSuccess_();this.pageRequestFinished(b,f,1,d);return Qi()}, shouldRedirect_:function(a){if("/"==a||"/red"==a)return!1;var b=!0;ctb.forEach(function(c){0==a.indexOf(c)&&(b=!1)}); dtb.forEach(function(c){var d=c.url;N(c.expFlag)&&0==a.indexOf(d)&&(b=!1)}); return b}, publishPageData_:function(a){this.fire("yt-page-data-fetched",{pageData:a})}, updatePlayer_:function(a,b,c,d,f){var h=KM(this),l=this.get("args.el",a);if(!h)return l&&(a=new Ul("Player missing when attempting update from updatePlayer_","el="+l),Zm(a)),Qi();try{return h.update(a,h,b,c,d,f)}catch(m){Zm(m)}return Qi()}, loadPageChunk_:function(a,b,c,d){this.performChunkLoad_(a,b,!1,!0,c,d)}, resetChunkState:function(){this.chunksReceived_=0;this.chunkHandler_=void 0;this.hasSeenSwfConfigChunk_=!1}, makeChunkPayload_:function(a,b){return{endpoint:a,data:b}}, performChunkLoad_:function(a,b,c,d,f,h){if(!this.chunkHandler_){var l=this.getInterface(IM);"watch"==b.page?d||c?(c={clientParams:{miniplayer:!1,autoSaveToQueue:!0,fromHistory:c},tempData:f},this.chunkHandler_=new uM(this.playerProvider_.bind(this),l,c,h)):this.chunkHandler_=new JSa(this.playerProvider_.bind(this),l):this.chunkHandler_=new KSa(h)}b.player?this.hasSeenSwfConfigChunk_=!0:N("kevlar_player_response_swf_config_wrapper_killswitch_2")||this.hasSeenSwfConfigChunk_||!b.playerResponse||y.isEmpty(A("WEB_PLAYER_CONTEXT_CONFIGS"))||( b.player=NM(b.playerResponse));this.chunkHandler_.processChunk(this.makeChunkPayload_(a,b));return this.chunkHandler_.playerPromiseResolver.promise}, loadPageRequest_:function(a,b,c,d,f){var h=null;this.loadPageRequestCounter_&&this.loadPageRequestCounter_.increment(null!==a.player,a.page||"null",b,c);if("watch"!=a.page||c){if(a.player){if(this.get("response.contents.twoColumnWatchNextResults",a)){var l=this.get("response.playerOverlays.playerOverlayRenderer.endScreen.watchNextEndScreenRenderer",a);var m=this.get("response.contents.twoColumnWatchNextResults.autoplay.autoplay",a);var n=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs", a);var r=this.get("response.contents.twoColumnWatchNextResults.playlist.playlist",a)}else this.get("response.contents.singleColumnWatchNextResults",a)&&(n=this.get("response.webWatchNextResponseExtensionData.relatedVideoArgs",a));b&&iVa(a.player.args);b=this.updatePlayer_.bind(this,a.player,l,m,n,r);a.filler||(bp("cfg"),this.sendAction("player-update-pre",[a.page,a.player,a.playerResponse]));"browse"==a.page?this.asyncFrame(b,0):h=c?Qi():this.isMiniplayerActive_()&&this.isPlayerPlayingData_(a)?Qi(): b()}a.filler||this.sendAction("yt-stop-old-player",[a])}else h=this.performChunkLoad_(d,a,b,!1,f);if(h)return h.then(this.publishPageData_.bind(this,a));this.publishPageData_(a);return Qi()}, checkNetworkResponseErrors_:function(a,b){var c=null;if(!b)return c=new Ul("Empty data",this.is,a);var d=b.response;d||(c=new Ul("Response field missing from data",this.is,a));if((N("kevlar_op_search_sampling")||0=this.timeBetweenJobsMs_?this.doAfterRenderRequest_():this.doIdleRequest_(this.timeBetweenJobsMs_-a)}}, refreshVisibility_:function(){if(this.dirty_&&!this.pauseScan)if(this.dirty_=!1,this.isAttached){var a=this.visibilityRoot;if(a){var b=window.innerHeight,c=window.innerWidth;this.nodeCountNoPreload_=this.nodeCount_=0;this.screenRect_=new Vg(0,0,c,b);this.prescanRect_=new Vg(this.screenRect_.left,this.screenRect_.top+this.screenRect_.height,this.screenRect_.width,this.heightPrescan);b=new Set;this.traverseNodes_(a,this.screenRect_,b,0);a=YO.getInstance();c=k(b);for(var d=c.next();!d.done;d=c.next())d= d.value,this.lastVisibleSet_.has(d)||a.shown(d),this.lastVisibleSet_.delete(d);this.lastVisibleSet_.forEach(a.hidden.bind(a));this.lastVisibleSet_=b;this.fire("yt-visibility-monitor-refreshed")}else vd(Error("Cannot find root node for visibility monitor"))}else vd(Error("Visibility monitor is not attached"))}, isNodeVisible:function(a){return this.lastVisibleSet_.has(a)}, traverseNodes_:function(a,b,c,d){if(3!=a.visibilityLogging){var f=CJ.getInstance();d=a.screenLayer||d;var h=window.getComputedStyle(a);if(!h||"none"!=h.display&&"hidden"!=h.visibility){var l=a.getBoundingClientRect();if(l.top||l.right||l.bottom||l.left||l.width||l.height){l=new Vg(l.left,l.top,l.width,l.height);b=N("viewport_non_overlapping_intersect")?l.left=this.playlistComponent.data.totalVideos;if("NORMAL"!=a||"autoplayVideo"!=b||!d||!c)if(a=this.getVideoEndpoint_(a,b))c=this.getTempData_(a,c),this.fire("yt-navigate",{endpoint:a,tempData:c})}, getVideoEndpoint_:function(a,b){if(this.autoplayData&&this.autoplayData.sets)for(var c=0,d=this.autoplayData.sets.length;c\n
\n
\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===ltb){var d=document.createElement("template");d.innerHTML="";ltb=d}d=ltb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return mtb=a}, APP_IDS:{ytr:3,ytm:5},behaviors:[xO.YtActionHandlerBehavior],properties:{isMobile:{type:Boolean,reflectToAttribute:!0},onReadyCallback_:Function,observer_:Object},actionMap:{"yt-open-create-family-dialog":"open"},created:function(){this.timeoutId_=0;nIa(2200)}, detached:function(){this.observer_&&this.observer_.disconnect()}, open:function(a,b){var c=a.serializedYpcFamilyCreateLoggingParams;this.timeoutId_=setTimeout(this.abort_.bind(this,a.postFlowErrorEndpoint,c),3E4);b&&(this.onReadyCallback_=b);var d=this.$["unicorn-iframe"];c&&c&&hWa("ypcFamilyCreateFlowStarted",c);RLa("family_creation",function(){var f=Ka("gapi.config.update"),h=Ka("gapi.family_creation.render");f("iframes/family_creation/url",this.getFamilyCreationUrlWithUnicornParams_());f=3;a.appId&&a.appId in this.APP_IDS&&(f=this.APP_IDS[a.appId]);f={authUser:A("SESSION_INDEX")|| 0,clientId:f,darkmode:document.documentElement.hasAttribute("dark")?1:0,hl:A("HL",void 0),initialflow:[4,5,6,7],m:this.isMobile?1:0,onFlowComplete:this.onUnicornFlowComplete_.bind(this,a.postFlowSuccessEndpoint,c),onError:this.onUnicornFlowError_.bind(this,a.postFlowErrorEndpoint,c),onReady:this.onUnicornFlowReady_.bind(this,a.referencePcidParams)};h(d,f)}.bind(this))}, close:function(){this.$.dialog.close();this.observer_&&this.observer_.disconnect()}, onUnicornFlowComplete_:function(a,b){this.close();b&&b&&hWa("ypcFamilyCreateFlowSucceeded",b,void 0,void 0,void 0);this.fire("yt-navigate",{endpoint:a})}, onUnicornFlowError_:function(a,b){this.close();b&&hWa("ypcFamilyCreateFlowCancelled",b);this.fire("yt-navigate",{endpoint:a})}, onUnicornFlowReady_:function(a){this.clearTimeout_();if(this.onReadyCallback_)this.onReadyCallback_();a&&Ka("gapi.family_creation.setConfig")(0,a);this.observer_=new MutationObserver(function(){this.$.dialog.fit()}.bind(this)); this.observer_.observe(this.$["unicorn-iframe"].querySelector("iframe"),{atttributes:!0,attributeFilter:["style"]});this.$.dialog.open()}, getFamilyCreationUrlWithUnicornParams_:function(){return A("YTR_FAMILY_CREATION_URL",void 0)}, getCurrentUrl_:function(){return document.location.href}, abort_:function(a,b){this.clearTimeout_();this.onUnicornFlowError_(a,b)}, clearTimeout_:function(){clearTimeout(this.timeoutId_)}});var ntb;var otb;Polymer({is:"yt-page-navigation-progress",_template:function(){if(void 0!==otb)return otb;var a=document.createElement("template");a.innerHTML="
\n";a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild); var b=a.content,c=b.insertBefore;if(void 0===ntb){var d=document.createElement("template");d.innerHTML=""; ntb=d}d=ntb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return otb=a}, provides:a9,behaviors:[kO.YtComponentBehavior],factoryImpl:function(){}, STEP:1,BLOCK_ON:80,MIN_PROGESS:0,MAX_PROGESS:100,created:function(){this.boundNextProgress_=this.nextProgress_.bind(this)}, ready:function(){this.progress_=this.MIN_PROGESS;this.hidden=!0;this.setAttribute("aria-valuemin",this.MIN_PROGESS);this.setAttribute("aria-valuemax",this.MAX_PROGESS)}, set progress(a){this.progress_=a;var b="scaleX("+a/this.MAX_PROGESS+")",c=this.$.progress.style;c.transform=b;c.webkitTransform=b;this.setAttribute("aria-valuenow",a)},get progress(){return this.progress_},start:function(){this.progress=this.MIN_PROGESS;this.hidden=!1;window.requestAnimationFrame(this.boundNextProgress_)}, finish:function(){this.progress=this.MAX_PROGESS;this.asyncFrame(function(){this.progress==this.MAX_PROGESS&&(this.hidden=!0)}.bind(this),80)}, nextProgress_:function(){this.progress>=this.BLOCK_ON||(this.progress+=this.STEP,window.requestAnimationFrame(this.boundNextProgress_))}});var ptb=function(){this.innertubeTransportService=YL()},rtb=function(a){var b=ptb.instance; return a.runAttestationCommand?Xi(ZL(b.innertubeTransportService,a).then(function(c){if(!c)throw new Ul("Fetching RunAttestationCommand returned falsy",a);qtb(b,c)}),function(c){Zm(c)}):Ri(Error("Bad Command: no runAttestationCommand"))},qtb=function(a,b){if(!b.botguardData)throw Error("Bad AttestationChallengeResponse: no BG data"); if(!b.botguardData.program)throw Error("Bad AttestationChallengeResponse: no BG program");if(!b.botguardData.interpreterScript&&!b.botguardData.interpreterUrl)throw Error("Bad AttestationChallengeResponse: no BG script or url");if(!b.challenge)throw Error("Bad AttestationChallengeResponse: no attestation challenge string");var c=new XI;c.initialize(b.botguardData.interpreterScript,b.botguardData.interpreterUrl,b.botguardData.program,function(){TKa(c,{atr_challenge:b.challenge}).then(function(d){if(!d)throw Error("BG invocation returned null"); return stb(a,b.challenge,d)}).catch(function(d){Am(d); return stb(a,b.challenge,void 0)})},void 0,!0)},stb=function(a,b,c){b={challenge:b}; c&&(b.webResponse=c);return $L(a.innertubeTransportService,b,XL(EMa))};var ttb={padding:"10px 16px","font-size":"32px","font-weight":"bold",background:"linear-gradient(135deg, rgba(131, 58, 180, 1) 0%, rgba(253, 29, 29, 1) 50%, rgba(252, 176, 69, 1) 100%)",color:"#fff","text-shadow":"1px 1px 3px rgba(255, 255, 255, 0.3)","border-radius":"15px"},utb={"font-size":"12px","font-style":"italic"},vtb={padding:"8px 0","font-size":"14px","font-weight":"bold",color:"#f00"};function wtb(a){return Object.entries(a).map(function(b){return b.join(":")}).join(";")} ;var n9=function(){this.serviceMap=d2a}; n9.prototype.shouldPreferLocalResponse=function(a,b){var c=o9(this,a);return c?c.shouldPreferLocalResponse(a,b):!1}; n9.prototype.localInnertubeResponse=function(a,b){return Za(this,function d(){var f=this,h;return za(d,function(l){return(h=o9(f,a))?l.return(h.localInnertubeResponse(a,b)):l.return(Promise.reject(Error("No local service avaiable.")))})})}; n9.prototype.canProvideFallbackResponse=function(a,b){var c=o9(this,a);return c?c.canProvideFallbackResponse(a,b):!1}; n9.prototype.localFallbackInnertubeResponse=function(a,b){return Za(this,function d(){var f=this,h;return za(d,function(l){return(h=o9(f,a))?l.return(h.localFallbackInnertubeResponse(a,b)):l.return(Promise.reject(Error("No local service available.")))})})}; var o9=function(a,b){if(!N("kevlar_local_innertube_response"))return null;b=Bd("string"===typeof b?b:b.url);return b?(a=a.serviceMap[b])?a:null:null};var xtb=function(){gQ.apply(this,arguments);this.responseStore=new Map}; p(xtb,gQ);e=xtb.prototype;e.get=function(a){return Za(this,function c(){var d=this,f;return za(c,function(h){return(f=d.responseStore.get(a))?h.return(new hQ(f.entryData)):h.return(void 0)})})}; e.putInternal=function(a,b){return Za(this,function d(){var f=this,h,l,m;return za(d,function(n){h=f;l=f.defaultExpirationDelayMs;b.expireTimestampMs&&(l=Number(b.expireTimestampMs)-Math.round(Zk()));m=setTimeout(function(){h.remove(a)},l); f.responseStore.set(a,{entryData:b,timer:m});ra(n)})})}; e.remove=function(a){return Za(this,function c(){var d=this,f;return za(c,function(h){if(f=d.responseStore.get(a))clearTimeout(f.timer),d.responseStore.delete(a);ra(h)})})}; e.removeAll=function(){return Za(this,function b(){var c=this;return za(b,function(d){c.responseStore.forEach(function(f){clearTimeout(f.timer)}); c.responseStore.clear();ra(d)})})}; e.has=function(a){return!!this.responseStore.get(a)};var ytb=function(a){this.responseStore=a}; ytb.prototype.handleResponse=function(a,b){var c,d,f;b=null===(d=null===(c=b.config)||void 0===c?void 0:c.storeStrategy)||void 0===d?void 0:d.storeKey;var h=null===(f=a.responseContext)||void 0===f?void 0:f.maxAgeSeconds;if(b&&h&&0\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n
\n \n \n
\n\n"; a.content.insertBefore(Y().content.cloneNode(!0),a.content.firstChild);var b=a.content,c=b.insertBefore;if(void 0===wsb){var d=document.createElement("template");d.innerHTML=""; wsb=d}d=wsb;c.call(b,d.content.cloneNode(!0),a.content.firstChild);return xsb=a}, behaviors:[l1a.YtdAutonavPauseBehavior,DQ.YtdReduxBehavior,o2a.YtdPlaylistHandlerBehavior,i2a.YtdDownloadManagerBehavior,OP.YtEventForwardingBehavior,LO.YtOpenPopupBehavior,xO.YtActionHandlerBehavior,{_noAccessors:!0,actionRouterIsRoot:!1,created:function(){this.actionRouter_=oL.getInstance();this.actionRouterNode=this.actionRouterIsRoot?document:this;this.onYtActionBoundListener_=this.onYtAction_.bind(this);this.actionRouterListenersRegistered_=!1;N("action_router_attached_only_killswitch")&&this.registerActionRouterEventListeners_()}, attached:function(){this.registerActionRouterEventListeners_()}, detached:function(){this.unregisterActionRouterEventListeners_()}, registerActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_||(this.actionRouterListenersRegistered_=!0,this.actionRouterNode.addEventListener("yt-action",this.onYtActionBoundListener_))}, unregisterActionRouterEventListeners_:function(){this.actionRouterListenersRegistered_=!1;this.actionRouterNode.removeEventListener("yt-action",this.onYtActionBoundListener_)}, onYtAction_:function(a){this.actionRouter_.handleAction(a.detail)}}, Tsb.YtAppBehavior,OO.YtEndpointBehavior,Nsb.YtEndpointHandlerWithYpcBehavior,ysb,Usb.YtFeedbackCollectorBehavior,X.YtRendererBehavior,rrb.YtSwatchBehavior],CSI_SERVICE_NAME:"youtube",properties:{renderGuide:Boolean,guidePersistentAndVisible:{type:Boolean,reflectToAttribute:!0},standalone:{type:Boolean,value:!1,reflectToAttribute:!0},miniGuideVisible_:{type:Boolean,reflectToAttribute:!0},miniplayerActive_:{type:Boolean,reflectToAttribute:!0},mastheadHidden_:{type:Boolean,reflectToAttribute:!0,value:function(){return sd("START_IN_FULL_WINDOW_MODE")}}, playerFullscreen_:{type:Boolean,reflectToAttribute:!0},hideHeaderShadow:{type:Boolean,value:!1,reflectToAttribute:!0},menuStrings_:{type:Object,value:{GUIDE_ALT_LABEL:YK("GUIDE_ALT_LABEL",void 0,"Guide")}},topbarData_:{type:Object,computed:"computeTopbarData_(data)"},isWatchPage:{type:Boolean,value:!1,reflectToAttribute:!0},useVimio_:{type:Boolean,value:N("kevlar_use_vimio_behavior")},scrollbarRework:{type:Boolean,reflectToAttribute:!0,value:N("kevlar_scrollbar_rework")},scrolling_:{type:Boolean, reflectToAttribute:!0},guideScrolledByTouch:{type:Boolean,reflectToAttribute:!0,value:!1},scrollbarColor:{type:Boolean,value:function(){return N("kevlar_standard_scrollbar_color")}, reflectToAttribute:!0}},listeners:{"app-drawer-transitioned":"onDrawerIronSelect_",attached:"onYtdPageManagerAttached_","yt-add-element-to-app":"onAddElementToApp_","yt-guide-hover":"onGuideOpenButtonHover_","yt-masthead-height-changed":"onYtMastheadHeightChanged_","yt-page-type-changed":"onPageChanged_","yt-request-panel-mode-change":"onRequestPanelModeChange_","yt-set-theater-mode-enabled":"onSetTheaterModeEnabled_","yt-set-fullerscreen-styles":"setFullscreen_","yt-focus-searchbox":"onFocusSearchBox_", "yt-open-hotkey-dialog":"onOpenHotkeyDialog_",touchstart:"onTouchStart_"},observers:["updateMastheadData_(data)","observeGuideVisibility_(guidePersistentAndVisible, miniGuideVisible_)"],actionMap:{"yt-command-executor-command":"onYtCommandExecutorCommand_","yt-dark-mode-toggled-action":"onDarkModeToggledAction_","yt-dark-theme-action":"onDarkThemeAction_","yt-edu-dismiss-action":"handleEduDismissAction_","yt-edu-impression-action":"handleEduImpressionAction_","yt-light-theme-action":"onLightThemeAction_", "yt-navigate-action":"onYtNavigateAction","yt-player-fullscreen":"onPlayerFullscreen_","yt-register-create-family-dialog":"onYtRegisterCreateFamilyDialog_","yt-select-country-command":"handleSelectCountryCommand_","yt-select-language-command":"handleSelectLanguageCommand_","yt-clear-url-param-command":"handleClearUrlParamCommand_","yt-set-cookie-command":"onSetCookieCommand_","yt-set-local-storage-command":"onSetLocalStorageCommand_","yt-set-push-notifications-enabled-command":"onSetPushNotificationsEnabledCommand_", "yt-signal-action-enable-chrome-notifications":"onYtSignalActionEnableChromeNotifications_","yt-signal-action-toggle-restricted-mode-on":"onYtSignalActionToggleRestrictedModeOnAction_","yt-signal-action-toggle-restricted-mode-off":"onYtSignalActionToggleRestrictedModeOffAction_","yt-signal-action-copy-link-address":"handleSignalActionCopyLinkAddress_","yt-signal-action-confirm-mentions-edu":"onYtSignalActionConfirmMentionsEdu_","yt-signal-action-record-mentions-edu-impression":"onYtSignalActionRecordMentionsEduImpression_", "yt-signal-action-show-keyboard-shortcut-dialog":"onYtSignalActionShowKeyboardShortcutDialog_","yt-signal-action-skip-navigation":"onYtSignalActionSkipNavigation_","yt-window-resized":"onWindowResized_","yt-miniplayer-active-changed-action":"handleMiniplayerActiveChangedAction_","yt-persist-subscriptions-display-preferences-command":"handlePersistSubscriptionsDisplayPreferencesCommand_","yt-invoke-instrument-manager-action":"onInvokeInstrumentManagerAction_"},dynamicActionMap:{"yt-run-attestation-command":function(a){return rtb(a)}}, created:function(){var a=this;this.SVG_NAMESPACE_="http://www.w3.org/2000/svg";this.pageManagerAttachedPromise_=Ui();this.loadDepsPromise=Ti([this.loadDepsPromise,this.pageManagerAttachedPromise_.promise]);this.optOutButtonPromise_=Ui();this.scrollAtTop_=!0;this.scrollThrottle_=new Oq(this.onThrottledScroll_,200,this);this.isTheaterModeSession_=sd("START_IN_THEATER_MODE");this.isFullWindowSession_=sd("START_IN_FULL_WINDOW_MODE");this.hasCreateFamilyDialog_=!1;this.forcedTheme_=null;this.autoShellPurgeRateLimitKey_= "yt-shell-auto-purge-triggered";N("external_fullscreen")&&(this.fullscreen_=!1);this.mastheadHeight_=56;this.ephemeralResponseStore_=null;tia();(0,ym.registerLogger)();pLa=!!Ka("ytappsettings.initialized");gJ=Ka("ytappsettings.previousValue");hJ=Ka("ytappsettings.previousSnapshotTime");pLa||(pLa=!0,qLa());hVa();qVa();rd("DEFERRED_DETACH",N("kevlar_tuner_should_defer_detach"));rd("REUSE_COMPONENTS",!0);rd("STAMPER_STABLE_LIST",!0);rd("SCHEDULED_LAZY_LIST",!0);rd("openPopupConfig",Ldb);N("kevlar_command_handler")&& this.initCommandHandler_();var b=mia(),c;N("kevlar_enable_slis")&&!N("kevlar_network_sli_killswitch")&&(c=Rka());n9.instance=new n9;p9.instance=new p9(n9.instance,c);N("kevlar_persistent_response_store")&&(jQ.instance=new jQ("WEB",5184E6),f2a());p9.instance||(p9.instance=new p9);c=p9.instance;var d=N("web_enable_client_location_service")?qSa():void 0,f=[oSa()];d&&f.push(d);N("kevlar_cache_on_ttl")||N("kevlar_masthead_store")?(this.ephemeralResponseStore_=new xtb(A("INNERTUBE_CONTEXT_CLIENT_NAME", "WEB"),3E5),f.push(new ytb(this.ephemeralResponseStore_)),hM.instance=new hM(c,b,f,this.ephemeralResponseStore_),N("kevlar_masthead_store")&&g2a(this.ephemeralResponseStore_)):hM.instance=new hM(c,b,f,void 0);ZM.instance=new ZM(wSa.watchEndpointMap||{},YL());N("nwl_init_killswitch")||yja();ztb();ptb.instance=new ptb;N("kevlar_shell_cleanup")&&Ck(Fk,Ijb.bind(this,t.caches));sd("IS_SHELL_LOAD")&&(N("web_appshell_purge_trigger")&&Jjb().then(function(h){h&&(h=new Dj(new Hj()),h.get(a.autoShellPurgeRateLimitKey_)? Zm(Error("Auto shell purge too frequent")):(h.set(a.autoShellPurgeRateLimitKey_,!0,Zk()+3E4),a.hardReloadWithShellPurge_()))}),Uo("ssdm",Math.round(Zk()-Ao()))); N("ytidb_clear_data_for_other_users_killswitch")||(0,ym.clearDataForOtherUsers)();N("cache_utc_offset_minutes_in_pref_cookie")&&(ZNa()||WNa());N("kevlar_is_hiring")&&(console.log("%cYouTube.com is hiring!",wtb(ttb)),console.log("%cYouTube.com is the second largest website in the world, with hundreds of\nmillions of users and watch-hours per day. It makes you laugh, learn, and leaves\nyou amazed. Are there things that you love about YouTube? Things that you don't?\nHelp us make it better!",wtb(utb)), console.log("%cVisit http://go/join-youtube-web to apply today.",wtb(vtb)));N("web_ua_ch_polyfill_enabled")&&Itb()}, ready:function(){this.$.guide.addEventListener("transitionend",this.processDrawerIronSelect_.bind(this));this.$["guide-inner-content"].addEventListener("scroll",this.markDirty.bind(this));var a=LLa();a&&N("external_fullscreen")&&document.addEventListener(a,this.setFullscreen_.bind(this));(a=window.matchMedia("(prefers-color-scheme: dark)"))&&a.addEventListener&&a.addEventListener("change",this.onDeviceThemeChanged_.bind(this));this.onDeviceThemeChanged_()}, attached:function(){var a=this;this.initialLoad_();N("kevlar_enable_slis")&&Yja().recordEnd("SUCCESS");Polymer.RenderStatus.afterNextRender(this,this.updateIconSet_.bind(this));MLa(this.$["guide-inner-content"],!1);this.useVimio_||(this.$["visibility-monitor"].visibilityRoot=this);var b=this.getInterface(tN);b&&dUa(b);this.$["guide-service"].guideElement=this.$.guide;b=document.createElement("ytd-miniplayer");Polymer.dom(this.root).appendChild(b);N("kevlar_network_banner")&&(b=document.createElement("ytd-network-status-banner"), Polymer.dom(this.root).appendChild(b));N("kevlar_right_click_on_lockups")&&Polymer.IronOverlayManager._onCaptureClick&&document.addEventListener("contextmenu",Polymer.IronOverlayManager._onCaptureClick.bind(Polymer.IronOverlayManager),!0);var c=function(){var d=mo("yt-page-navigation-progress");Polymer.dom(a.root).appendChild(d)}; N("enable_signals")?setTimeout(function(){Zn.getInstance().parkOrScheduleJob(c,0,"eocs",16)},0):Bk(Fk,c,200); N("service_worker_push_enabled")&&Bk(Fk,QVa);UQa(oL.getInstance(),this.dynamicActionMap,this);this.fire("ytd-app-attached");Zn.getInstance().processSignal("aa");lTa(this);Ha("gapi.load",RLa,void 0);N("kevlar_offline_aware_ui")&&(b=Jm(),b.isMonitoring=!0,b.listen("ytnetworkstatus-online",this.onlineHandler_.bind(this)),b.listen("ytnetworkstatus-offline",this.offlineHandler_.bind(this)),b.isNetworkAvailable()||this.offlineHandler_());this.reset_()}, detached:function(){OLa(this.$["guide-inner-content"]);Fk.cancelJob(RM);RM=0;Fk.cancelJob(SM);SM=0;tk(QM);QM.length=0;kTa=PM=null;uN.getInstance().dispose()}, onlineHandler_:function(){document.documentElement.removeAttribute("offline")}, offlineHandler_:function(){document.documentElement.setAttribute("offline",!0)}, initIconDefs_:function(a,b,c){var d=document.createElement("iron-iconset-svg");d.name=a;a=document.createElementNS(this.SVG_NAMESPACE_,"svg");d.appendChild(a);a.appendChild(b);if(c)for(var f in c)d[f]=c[f];document.body.appendChild(d);return d}, handleSignalActionCopyLinkAddress_:function(a,b){if(b=new kq(this.getLink_(b)).toString()){a=document.createElement("textarea");var c=document.location.href;c instanceof kq||(c=mr(c));b instanceof kq||(b=mr(b));b=c.resolve(b);a.value=b;document.body.appendChild(a);a.select();document.execCommand("copy");document.body.removeChild(a)}}, onWindowResized_:function(){this.sendAction("yt-close-popup-action",["yt-tooltip-renderer"]);AM.getInstance().setWidth(document.body.clientWidth)}, handleMiniplayerActiveChangedAction_:function(a){this.miniplayerActive_=a}, observeGuideVisibility_:function(){var a=AM.getInstance(),b=this.miniGuideVisible_;a.guidePersistentAndVisible_=this.guidePersistentAndVisible;a.miniGuideVisible_=b;PSa(a)}, handleEduDismissAction_:function(a){a&&a.eduDismissAction&&(this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]),xM.getInstance().dismissEdu(a.eduDismissAction.key))}, handleEduImpressionAction_:function(a){a&&a.eduImpressionAction&&xM.getInstance().recordEduImpression(a.eduImpressionAction.key)}, onYtSignalActionConfirmMentionsEdu_:function(){this.sendAction("yt-close-popup-action",["yt-bubble-hint-renderer"]);CM.getInstance().dismissEdu()}, onYtSignalActionRecordMentionsEduImpression_:function(){CM.getInstance().recordEduImpression()}, onYtdPageManagerAttached_:function(a){"page-manager"==Polymer.dom(a).rootTarget.id&&this.pageManagerAttachedPromise_.resolve()}, onInvokeInstrumentManagerAction_:function(a,b){Jtb(b,a)}, updateIconSet_:function(){var a=Polymer.dom(this).querySelector("#masthead"),b=Polymer.dom(a),c=b.querySelector("g#yt-logo");c&&(a=document.createElementNS(this.SVG_NAMESPACE_,"defs"),a.appendChild(c.cloneNode(!0)),(b=b.querySelector("g#yt-logo-red"))&&a.appendChild(b.cloneNode(!0)),this.initIconDefs_("yt-logos-ext",a))}, updateMastheadData_:function(a){var b=this,c=Polymer.dom(this).querySelector("#masthead");c&&(Polymer.RenderStatus.afterNextRender(this,function(){c.data=b.topbarData_}),N("kevlar_masthead_store")&&this.ephemeralResponseStore_&&this.get("response.topbar",a)&&0!==this.get("response.topbar.responseContext.maxAgeSeconds",a)&&this.ephemeralResponseStore_.put("service:topbar:fallback",new hQ({innertubeResponse:this.get("response.topbar",a)})))}, loadDesktopData_:function(a,b){setTimeout(function(){var c="adl";b&&b.filler&&(c="afl");Wo(c)},0); this.loadData(a,b);N("kevlar_enable_slis")&&b&&b.response&&nka().recordEnd("SUCCESS");this.$["page-manager"].lazyPrepareCriticalPages(b&&b.page,a);b&&"watch"==b.page&&(this.isWatchPage=!0)}, prepareDesktopLoad_:function(a,b){var c=this;sd("IS_SHELL_LOAD")&&N("kevlar_eager_shell_boot_via_one_platform")?this.shellDataRequested_||(N("kevlar_lazy_init_watch_in_shell_load_killswitch")||this.$["page-manager"].lazyPrepareCriticalPages(b&&b.page||"browse",a),BTa(function(){return 0},function(){return!1}).then(function(d){c.loadDesktopData_(d.endpoint,d)}),this.shellDataRequested_=!0):(b&&b.url&&N("web_appshell_purge_trigger")&&(b.url=Ld(b.url,"purge_shell")),this.loadDesktopData_(a,b))}, initialLoad_:function(){if(window.getPageData){var a=window.getPageData();window.getPageData=null;this.prepareDesktopLoad_(a.endpoint,a.data)}else window.loadDataHook=this.prepareDesktopLoad_.bind(this)}, computeTopbarData_:function(a){return a?a.response?this.get("topbar.desktopTopbarRenderer",a.response):null:null}, reset_:function(){var a=rLa();a?this.forcedTheme_=a:(this.forcedTheme_=null,a=iJ());this.setThemeMarkup_("USER_INTERFACE_THEME_DARK"==a);this.setMastheadTheme_()}, onSetTheaterModeEnabled_:function(a,b){this.isTheaterModeSession_=b.enabled;this.setTheaterModeStyles_(b.enabled)}, setTheaterModeStyles_:function(){this.setMastheadTheme_()}, onDarkModeToggledAction_:function(){var a=Bd(window.location.href);tLa(a)||(N("kevlar_legacy_browsers")&&N("polymer2_not_shady_build")&&!nl(window.location.href).themeRefresh&&(qLa(),SN(ol(window.location.href,{themeRefresh:1}))),N("web_appshell_purge_trigger")&&t.caches&&(Bjb(),Hjb()),a=Dd(window.location.href),this.$.historyManager.replaceUrl(Ld(a,"theme")),a=this.isAppDarkTheme_(),this.setThemeMarkup_(!a),this.setMastheadTheme_(),Polymer.updateStyles(),qLa())}, onThemeAction_:function(a){switch(a){case"USER_INTERFACE_THEME_DARK":this.onDarkThemeAction_();break;case"USER_INTERFACE_THEME_LIGHT":this.onLightThemeAction_();break;default:throw Error("Invalid theme.");}}, onDarkThemeAction_:function(){this.setThemeMarkup_(!0);this.setDocumentBackgroundColor_(this.DARKMODE_DOCUMENT_BACKGROUND_COLOR);this.setSwatch(this.THEATER_MODE_BASE_COLOR);Polymer.updateStyles()}, onLightThemeAction_:function(){this.isTheaterMode_()?(this.setSwatch(this.DEFAULT_MODE_BASE_COLOR),this.querySelector("#masthead").setSwatch(this.THEATER_MODE_BASE_COLOR)):this.setSwatch(this.DEFAULT_MODE_BASE_COLOR);this.setThemeMarkup_(!1);this.setDocumentBackgroundColor_(this.DEFAULT_DOCUMENT_BACKGROUND_COLOR);Polymer.updateStyles()}, onYtSignalActionToggleRestrictedModeOnAction_:function(){this.setRestrictedMode_(!0)}, onYtSignalActionToggleRestrictedModeOffAction_:function(){this.setRestrictedMode_(!1)}, onPlayerFullscreen_:function(a){qJ();this.playerFullscreen_=a}, setRestrictedMode_:function(a){var b=eJ.getInstance();fJ(0,58,a);b.save();this.getInterface($8).reload()}, onPageChanged_:function(a){this.isWatchPage="ytd-watch-flexy"==a.detail.newPageType||"ytd-watch-fixie"==a.detail.newPageType;a.detail.oldPageType&&this.reset_();this.isFullWindowSession_&&this.setFullscreen_()}, onSetCookieCommand_:function(a){if(a=a.setCookieCommand){var b=eJ.getInstance();a.flagNum&&"boolean"==typeof a.value?(fJ(0,a.flagNum,a.value),b.save()):a.key&&"string"==typeof a.stringValue&&(b.set(a.key,a.stringValue),b.save())}}, onSetLocalStorageCommand_:function(a){(a=a.setLocalStorageCommand)&&window.localStorage&&"string"===typeof a.key&&"string"===typeof a.value&&(window.localStorage[a.key]=a.value)}, onGuideToggleTap_:function(){this.fire("yt-guide-toggle")}, onGuideToggleHover_:function(){this.fire("yt-guide-hover")}, setThemeMarkup_:function(a){a?document.documentElement.setAttribute("dark",!0):document.documentElement.removeAttribute("dark");var b=document.querySelector("meta[name=\"theme-color\"]");b&&(b.content=this.metaThemeColor_(a))}, isTheaterMode_:function(){return this.isWatchPage&&this.isTheaterModeSession_}, isAppDarkTheme_:function(){return document.documentElement.hasAttribute("dark")}, setMastheadTheme_:function(){var a=this.queryEffectiveChildren("#masthead");a&&(a.dark=a.isDarkThemeForced||this.isTheaterMode_()||this.isAppDarkTheme_(),a.isDarkThemeForced=!1)}, onRequestPanelModeChange_:function(a,b){this.hideHeaderShadow="seamed"!=b.mode}, onGuideOpenButtonHover_:function(){var a=this;Vsb(c9.getInstance()).then(function(){a.renderGuide=!0})}, onDrawerIronSelect_:function(a){"guide"==Polymer.dom(a).rootTarget.id&&this.processDrawerIronSelect_()}, processDrawerIronSelect_:function(){this.markDirty();var a="closed",b=this.$.guide;b.opened&&(this.renderGuide=!0,b.persistent||(a="opened"));this.fire("yt-autonav-pause-guide-"+a)}, onAddElementToApp_:function(a){Polymer.dom(this.root).appendChild(a.detail)}, onThrottledScroll_:function(){var a=this.getInterface(IM).getCurrentPage();a&&(this.scrollAtTop_=0>=a.getScrollTop());this.mastheadHidden_=this.canHideMasthead_()}, canHideMasthead_:function(){return this.scrollAtTop_&&this.fullscreen_}, setFullscreen_:function(){var a=N("kevlar_fullerscreen_root_only_killswitch")?!!qJ():!!qJ()&&qJ()==document.documentElement;a=this.isWatchPage&&(a||this.isFullWindowSession_);this.fullscreen_!=a&&((this.fullscreen_=a)&&this.sendOptionalAction("yt-close-all-popups-action"),this.toggleFullscreenStyles_(this.fullscreen_),this.sendAction("yt-fullscreen-change-action",[this.fullscreen_]))}, updateMastheadCssHeight_:function(){var a=this.mastheadHeight_;this.fullscreen_&&(a=0);this.updateStyles({"--ytd-masthead-height":a+"px"})}, toggleFullscreenStyles_:function(a){var b=this.getInterface(IM).getCurrentPage();a?(document.body.classList.add("no-scroll"),b.pageScrollElement=this,this.scrolling_=!0,this.listen(this,"scroll","onScroll_"),b.setScrollTop(0),this.updateStyles({"--ytd-app-fullerscreen-scrollbar-width":pN()+"px"})):(document.body.classList.remove("no-scroll"),b.pageScrollElement=null,this.scrolling_=!1,this.unlisten(this,"scroll","onScroll_"));this.mastheadHidden_=a;this.updateMastheadCssHeight_()}, onScroll_:function(){this.markDirty();this.scrollThrottle_.fire()}, onYtMastheadHeightChanged_:function(a,b){this.mastheadHeight_=b.height;this.updateMastheadCssHeight_()}, onYtNavigateAction:function(a){a=this.get("navigateAction.endpoint",a);this.fire("yt-navigate",{endpoint:a})}, setDocumentBackgroundColor_:function(a){document.documentElement.style.backgroundColor=a}, onYtRegisterCreateFamilyDialog_:function(){if(!this.hasCreateFamilyDialog_){var a=document.createElement("yt-create-family-dialog");Polymer.dom(this.root).appendChild(a);this.hasCreateFamilyDialog_=!0}}, onSetPushNotificationsEnabledCommand_:function(a){var b=this;a.setPushNotificationsEnabledCommand&&"boolean"===typeof a.setPushNotificationsEnabledCommand.enabled&&("granted"!=Notification.permission?EVa().then(function(){"granted"==Notification.permission?(sVa(!a.setPushNotificationsEnabledCommand.enabled).then(UN),a.setPushNotificationsEnabledCommand.successAction&&b.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.successAction])):a.setPushNotificationsEnabledCommand.failureAction&& b.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.failureAction])}):(sVa(!a.setPushNotificationsEnabledCommand.enabled).then(UN),a.setPushNotificationsEnabledCommand.successAction&&this.sendServiceRequestAction([a.setPushNotificationsEnabledCommand.successAction])))}, onYtSignalActionEnableChromeNotifications_:function(){BVa(!0)}, onFocusSearchBox_:function(){var a=this.querySelector("ytd-searchbox");a&&a.focus()}, onOpenHotkeyDialog_:function(){this.topbarData_.hotkeyDialog&&this.openPopup({openPopupAction:{popupType:"DIALOG",popup:{hotkeyDialogRenderer:this.topbarData_.hotkeyDialog.hotkeyDialogRenderer}}})}, onYtSignalActionShowKeyboardShortcutDialog_:function(){this.sendAction("yt-close-popup-action",["ytd-multi-page-menu-renderer"]);this.onOpenHotkeyDialog_()}, onYtEndpointChangeHandler:function(a,b){var c=oN.getInstance();c.pendingPrefetchJob_&&(b=!(!b||"1"!=b.autonav),c.pendingPrefetchJob_.resolve(a&&a.watchEndpoint?WM(a,b):""),c.pendingPrefetchJob_=null);this.sendAction("yt-pause-active-page-context");this.sendAction("ytd-log-youthere-nav");this.sendAction("yt-prepare-page-dispose")}, handleClearUrlParamCommand_:function(a){if(a.clearUrlParamCommand&&a.clearUrlParamCommand.paramKeys){var b=a.clearUrlParamCommand.paramKeys;a=mr(window.location.href);b=k(b);for(var c=b.next();!c.done;c=b.next())a.removeParameter(c.value);window.history.replaceState(window.history.state,document.title,a.toString())}}, onYtCommandExecutorCommand_:function(a,b){a.commandExecutorCommand.commands&&this.sendInnerTubeActions(a.commandExecutorCommand.commands,b)}, onYtSignalActionSkipNavigation_:function(){var a=this.getInterface(IM).getCurrentPage();nk(a)}, onEntitiesUpdated:function(a){a.mutations&&0